[PATCH] D19904: XRay: Add entry and exit sleds
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 21:03:28 PDT 2016
majnemer added inline comments.
================
Comment at: include/llvm/Target/TargetInstrInfo.h:155-166
@@ -154,1 +154,14 @@
+ /// This returns true if the given instruction is a "normal return" as opposed
+ /// to special kinds of returns. On platforms where there may be multiple
+ /// OpCodes that signify 'normal' return instructions (like in X86), this
+ /// return true for those instructions. The default implementation excludes
+ /// known non-normal instructions.
+ virtual bool isNormalReturn(const MachineInstr *MI) const {
+ if (!MI->isReturn()) return false;
+ auto OpCode = MI->getOpcode();
+ bool IsCatchReturn = OpCode == getCatchReturnOpcode();
+ bool IsFrameDestroy = OpCode == getCallFrameDestroyOpcode();
+ return !IsCatchReturn && !IsFrameDestroy;
+ }
+
----------------
The same way it is handled for `X86::ADJCALLSTACKDOWN64` vs `X86::ADJCALLSTACKDOWN32`:
https://github.com/llvm-mirror/llvm/blob/master/lib/Target/X86/X86InstrInfo.cpp#L105
http://reviews.llvm.org/D19904
More information about the llvm-commits
mailing list