[PATCH] D19904: XRay: Add entry and exit sleds
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 16:27:18 PDT 2016
majnemer added inline comments.
================
Comment at: lib/CodeGen/XRayInstrumentation.cpp:72-77
@@ +71,8 @@
+ // FIXME: Handle tail calls here too?
+ if (Terminator.isReturn()) {
+ // Replace return instructions with:
+ // PATCHABLE_RET <Opcode>, <Operand>...
+ auto MIB = BuildMI(MBB, Terminator, Terminator.getDebugLoc(),
+ TII->get(TargetOpcode::PATCHABLE_RET))
+ .addImm(Terminator.getOpcode());
+ for (auto &MO : Terminator.operands()) {
----------------
I don't think you want to replace whacky constructs like `EH_RETURN` and `CLEANUPRET` with `PATCHABLE_RET`, do you? Just "normal" returns, right?
Repository:
rL LLVM
http://reviews.llvm.org/D19904
More information about the llvm-commits
mailing list