[PATCH] D19904: XRay: Add entry and exit sleds
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Sun May 8 22:25:30 PDT 2016
majnemer added inline comments.
================
Comment at: lib/CodeGen/XRayInstrumentation.cpp:72-76
@@ -71,8 +71,7 @@
for (auto &Terminator : MBB.terminators()) {
// FIXME: Handle tail calls here too?
- if (Terminator.isReturn() &&
- (Terminator.getOpcode() != ISD::CATCHRET ||
- Terminator.getOpcode() != ISD::CLEANUPRET ||
- Terminator.getOpcode() != ISD::EH_RETURN)) {
+ if (Terminator.isReturn() && (Terminator.getOpcode() != ISD::CATCHRET ||
+ Terminator.getOpcode() != ISD::CLEANUPRET ||
+ Terminator.getOpcode() != ISD::EH_RETURN)) {
// Replace return instructions with:
// PATCHABLE_RET <Opcode>, <Operand>...
----------------
The typical way of doing this sort of thing, AFAICT, is to teach `TargetInstrInfo` about it.
For example, it implements `getCatchReturnOpcode` and `getCallFrameSetupOpcode`.
http://reviews.llvm.org/D19904
More information about the llvm-commits
mailing list