diff options
author | Eric Christopher <echristo@apple.com> | 2010-03-25 04:49:10 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-03-25 04:49:10 +0000 |
commit | f27e6088a3af277d5aeed7b554192cc62b7b40fd (patch) | |
tree | 7ca0b6f14a80866154443d116693c7b80c622363 /lib/VMCore/Instructions.cpp | |
parent | 3d7d07ef038696cefcaf3ce5335072964199a78d (diff) |
Reapply r99451 with a fix to move the NoInline check to the cost functions
instead of InlineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 171e0211dd..11e218c49e 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -31,13 +31,13 @@ using namespace llvm; //===----------------------------------------------------------------------===// #define CALLSITE_DELEGATE_GETTER(METHOD) \ - Instruction *II(getInstruction()); \ + Instruction *II = getInstruction(); \ return isCall() \ ? cast<CallInst>(II)->METHOD \ : cast<InvokeInst>(II)->METHOD #define CALLSITE_DELEGATE_SETTER(METHOD) \ - Instruction *II(getInstruction()); \ + Instruction *II = getInstruction(); \ if (isCall()) \ cast<CallInst>(II)->METHOD; \ else \ @@ -66,6 +66,17 @@ bool CallSite::paramHasAttr(uint16_t i, Attributes attr) const { uint16_t CallSite::getParamAlignment(uint16_t i) const { CALLSITE_DELEGATE_GETTER(getParamAlignment(i)); } + +/// @brief Return true if the call should not be inlined. +bool CallSite::isNoInline() const { + CALLSITE_DELEGATE_GETTER(isNoInline()); +} + +void CallSite::setIsNoInline(bool Value) { + CALLSITE_DELEGATE_GETTER(setIsNoInline(Value)); +} + + bool CallSite::doesNotAccessMemory() const { CALLSITE_DELEGATE_GETTER(doesNotAccessMemory()); } |