[llvm-commits] [llvm] r99451 - in /llvm/trunk: include/llvm/Instructions.h include/llvm/Support/CallSite.h lib/Transforms/Utils/InlineFunction.cpp lib/VMCore/Instructions.cpp test/Transforms/Inline/noinline.ll
Eric Christopher
echristo at apple.com
Wed Mar 24 16:35:22 PDT 2010
Author: echristo
Date: Wed Mar 24 18:35:21 2010
New Revision: 99451
URL: http://llvm.org/viewvc/llvm-project?rev=99451&view=rev
Log:
Temporarily revert this, it's causing an issue with an internal project.
Removed:
llvm/trunk/test/Transforms/Inline/noinline.ll
Modified:
llvm/trunk/include/llvm/Instructions.h
llvm/trunk/include/llvm/Support/CallSite.h
llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=99451&r1=99450&r2=99451&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Wed Mar 24 18:35:21 2010
@@ -971,13 +971,6 @@
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 @@
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);
Modified: llvm/trunk/include/llvm/Support/CallSite.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=99451&r1=99450&r2=99451&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CallSite.h (original)
+++ llvm/trunk/include/llvm/Support/CallSite.h Wed Mar 24 18:35:21 2010
@@ -76,10 +76,6 @@
/// @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);
Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=99451&r1=99450&r2=99451&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Wed Mar 24 18:35:21 2010
@@ -229,9 +229,7 @@
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'
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=99451&r1=99450&r2=99451&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Wed Mar 24 18:35:21 2010
@@ -31,13 +31,13 @@
//===----------------------------------------------------------------------===//
#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 @@
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());
}
Removed: llvm/trunk/test/Transforms/Inline/noinline.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/noinline.ll?rev=99450&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/Inline/noinline.ll (original)
+++ llvm/trunk/test/Transforms/Inline/noinline.ll (removed)
@@ -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()
More information about the llvm-commits
mailing list