[PATCH] D57463: Add a module pass for order file instrumentation

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 8 09:02:13 PST 2019


davidxl added inline comments.


================
Comment at: lib/Transforms/Instrumentation/InstrOrderFile.cpp:147
+    // We need to wrap around the index to fit it inside the buffer.
+    Value *WrappedIdx = updateB.CreateAnd(
+        IdxVal, ConstantInt::get(Int32Ty, INSTR_ORDER_FILE_BUFFER_MASK));
----------------
manmanren wrote:
> davidxl wrote:
> > Why not having a runtime interface to flush the buffer here?
> Can you give an example of a runtime interface? Are you referring to helpers in another file maybe InstrProfiling.cpp?
something in compiler-rt like '__llvm_profile_orderfile_buffer_flush' which append the buffer data when the buffer overflows.

This can be done later if it is a needed in practice.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57463/new/

https://reviews.llvm.org/D57463





More information about the llvm-commits mailing list