mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user