aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-03-24 23:35:21 +0000
committerEric Christopher <echristo@apple.com>2010-03-24 23:35:21 +0000
commit0623e90398153be61226ad19f1b40d3817874526 (patch)
tree5cca292b1705f9ab75978b8bef12ed3ac9573c3c
parent014dc4e7202f88fdd9c255837bf125f891f2f6b6 (diff)
Temporarily revert this, it's causing an issue with an internal project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99451 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Instructions.h14
-rw-r--r--include/llvm/Support/CallSite.h4
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp4
-rw-r--r--lib/VMCore/Instructions.cpp15
-rw-r--r--test/Transforms/Inline/noinline.ll18
5 files changed, 3 insertions, 52 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 413a595ab3..2fe1abba13 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -971,13 +971,6 @@ public:
unsigned getParamAlignment(unsigned i) const {
return AttributeList.getParamAlignment(i);
}
-
- /// @brief Return true if the call should not be inlined.
- bool isNoInline() const { return paramHasAttr(~0, Attribute::NoInline); }
- void setIsNoInline(bool Value) {
- if (Value) addAttribute(~0, Attribute::NoInline);
- else removeAttribute(~0, Attribute::NoInline);
- }
/// @brief Determine if the call does not access memory.
bool doesNotAccessMemory() const {
@@ -2463,13 +2456,6 @@ public:
return AttributeList.getParamAlignment(i);
}
- /// @brief Return true if the call should not be inlined.
- bool isNoInline() const { return paramHasAttr(~0, Attribute::NoInline); }
- void setIsNoInline(bool Value) {
- if (Value) addAttribute(~0, Attribute::NoInline);
- else removeAttribute(~0, Attribute::NoInline);
- }
-
/// @brief Determine if the call does not access memory.
bool doesNotAccessMemory() const {
return paramHasAttr(~0, Attribute::ReadNone);
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index 9d9a30e6ad..4c6689fffd 100644
--- a/include/llvm/Support/CallSite.h
+++ b/include/llvm/Support/CallSite.h
@@ -76,10 +76,6 @@ public:
/// @brief Extract the alignment for a call or parameter (0=unknown).
uint16_t getParamAlignment(uint16_t i) const;
- /// @brief Return true if the call should not be inlined.
- bool isNoInline() const;
- void setIsNoInline(bool Value = true);
-
/// @brief Determine if the call does not access memory.
bool doesNotAccessMemory() const;
void setDoesNotAccessMemory(bool doesNotAccessMemory = true);
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index 599fe33aa0..17f8827fd5 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -229,9 +229,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD,
const Function *CalledFunc = CS.getCalledFunction();
if (CalledFunc == 0 || // Can't inline external function or indirect
CalledFunc->isDeclaration() || // call, or call to a vararg function!
- CalledFunc->getFunctionType()->isVarArg() ||
- CS.isNoInline()) // Call site is marked noinline.
- return false;
+ CalledFunc->getFunctionType()->isVarArg()) return false;
// If the call to the callee is not a tail call, we must clear the 'tail'
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 11e218c49e..171e0211dd 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,17 +66,6 @@ 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());
}
diff --git a/test/Transforms/Inline/noinline.ll b/test/Transforms/Inline/noinline.ll
deleted file mode 100644
index dc3f6e0030..0000000000
--- a/test/Transforms/Inline/noinline.ll
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: opt %s -inline -S | FileCheck %s
-; PR6682
-declare void @foo() nounwind
-
-define void @bar() nounwind {
-entry:
- tail call void @foo() nounwind
- ret void
-}
-
-define void @bazz() nounwind {
-entry:
- tail call void @bar() nounwind noinline
- ret void
-}
-
-; CHECK: define void @bazz()
-; CHECK: call void @bar()