mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Move the remaining attribute macros to systematic names based on the attribute
name and prefixed with 'LLVM_'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5117709a1d
commit
19e57025d4
@ -76,35 +76,35 @@
|
|||||||
#define TEMPLATE_INSTANTIATION(X)
|
#define TEMPLATE_INSTANTIATION(X)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// DISABLE_INLINE - On compilers where we have a directive to do so, mark a
|
// LLVM_ATTRIBUTE_NOINLINE - On compilers where we have a directive to do so,
|
||||||
// method "not for inlining".
|
// mark a method "not for inlining".
|
||||||
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||||
#define DISABLE_INLINE __attribute__((noinline))
|
#define LLVM_ATTRIBUTE_NOINLINE __attribute__((noinline))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define DISABLE_INLINE __declspec(noinline)
|
#define LLVM_ATTRIBUTE_NOINLINE __declspec(noinline)
|
||||||
#else
|
#else
|
||||||
#define DISABLE_INLINE
|
#define LLVM_ATTRIBUTE_NOINLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ALWAYS_INLINE - On compilers where we have a directive to do so, mark a
|
// LLVM_ATTRIBUTE_ALWAYS_INLINE - On compilers where we have a directive to do
|
||||||
// method "always inline" because it is performance sensitive.
|
// so, mark a method "always inline" because it is performance sensitive. GCC
|
||||||
// GCC 3.4 supported this but is buggy in various cases and produces
|
// 3.4 supported this but is buggy in various cases and produces unimplemented
|
||||||
// unimplemented errors, just use it in GCC 4.0 and later.
|
// errors, just use it in GCC 4.0 and later.
|
||||||
#if __GNUC__ > 3
|
#if __GNUC__ > 3
|
||||||
#define ALWAYS_INLINE __attribute__((always_inline))
|
#define LLVM_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define ALWAYS_INLINE __forceinline
|
#define LLVM_ATTRIBUTE_ALWAYS_INLINE __forceinline
|
||||||
#else
|
#else
|
||||||
#define ALWAYS_INLINE
|
#define LLVM_ATTRIBUTE_ALWAYS_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define NORETURN __attribute__((noreturn))
|
#define LLVM_ATTRIBUTE_NORETURN __attribute__((noreturn))
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define NORETURN __declspec(noreturn)
|
#define LLVM_ATTRIBUTE_NORETURN __declspec(noreturn)
|
||||||
#else
|
#else
|
||||||
#define NORETURN
|
#define LLVM_ATTRIBUTE_NORETURN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We provide definitions without the LLVM_ prefix briefly while transitioning
|
// We provide definitions without the LLVM_ prefix briefly while transitioning
|
||||||
@ -114,5 +114,8 @@
|
|||||||
#define ATTRIBUTE_UNUSED LLVM_ATTRIBUTE_UNUSED
|
#define ATTRIBUTE_UNUSED LLVM_ATTRIBUTE_UNUSED
|
||||||
#define ATTRIBUTE_READNONE LLVM_ATTRIBUTE_READNONE
|
#define ATTRIBUTE_READNONE LLVM_ATTRIBUTE_READNONE
|
||||||
#define ATTRIBUTE_READONLY LLVM_ATTRIBUTE_READONLY
|
#define ATTRIBUTE_READONLY LLVM_ATTRIBUTE_READONLY
|
||||||
|
#define NORETURN LLVM_ATTRIBUTE_NORETURN
|
||||||
|
#define DISABLE_INLINE LLVM_ATTRIBUTE_NOINLINE
|
||||||
|
#define ALWAYS_INLINE LLVM_ATTRIBUTE_ALWAYS_INLINE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,15 +72,16 @@ namespace llvm {
|
|||||||
/// standard error, followed by a newline.
|
/// standard error, followed by a newline.
|
||||||
/// After the error handler is called this function will call exit(1), it
|
/// After the error handler is called this function will call exit(1), it
|
||||||
/// does not return.
|
/// does not return.
|
||||||
NORETURN void report_fatal_error(const char *reason);
|
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason);
|
||||||
NORETURN void report_fatal_error(const std::string &reason);
|
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const std::string &reason);
|
||||||
NORETURN void report_fatal_error(const Twine &reason);
|
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const Twine &reason);
|
||||||
|
|
||||||
/// This function calls abort(), and prints the optional message to stderr.
|
/// This function calls abort(), and prints the optional message to stderr.
|
||||||
/// Use the llvm_unreachable macro (that adds location info), instead of
|
/// Use the llvm_unreachable macro (that adds location info), instead of
|
||||||
/// calling this function directly.
|
/// calling this function directly.
|
||||||
NORETURN void llvm_unreachable_internal(const char *msg=0,
|
LLVM_ATTRIBUTE_NORETURN void llvm_unreachable_internal(const char *msg=0,
|
||||||
const char *file=0, unsigned line=0);
|
const char *file=0,
|
||||||
|
unsigned line=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Prints the message and location info to stderr in !NDEBUG builds.
|
/// Prints the message and location info to stderr in !NDEBUG builds.
|
||||||
|
@ -1368,7 +1368,7 @@ SDNode *SelectionDAGISel::Select_UNDEF(SDNode *N) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// GetVBR - decode a vbr encoding whose top bit is set.
|
/// GetVBR - decode a vbr encoding whose top bit is set.
|
||||||
ALWAYS_INLINE static uint64_t
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static uint64_t
|
||||||
GetVBR(uint64_t Val, const unsigned char *MatcherTable, unsigned &Idx) {
|
GetVBR(uint64_t Val, const unsigned char *MatcherTable, unsigned &Idx) {
|
||||||
assert(Val >= 128 && "Not a VBR");
|
assert(Val >= 128 && "Not a VBR");
|
||||||
Val &= 127; // Remove first vbr bit.
|
Val &= 127; // Remove first vbr bit.
|
||||||
@ -1694,7 +1694,7 @@ MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// CheckPatternPredicate - Implements OP_CheckPatternPredicate.
|
/// CheckPatternPredicate - Implements OP_CheckPatternPredicate.
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckSame(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckSame(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N,
|
SDValue N,
|
||||||
const SmallVectorImpl<std::pair<SDValue, SDNode*> > &RecordedNodes) {
|
const SmallVectorImpl<std::pair<SDValue, SDNode*> > &RecordedNodes) {
|
||||||
@ -1705,20 +1705,20 @@ CheckSame(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// CheckPatternPredicate - Implements OP_CheckPatternPredicate.
|
/// CheckPatternPredicate - Implements OP_CheckPatternPredicate.
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckPatternPredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckPatternPredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SelectionDAGISel &SDISel) {
|
SelectionDAGISel &SDISel) {
|
||||||
return SDISel.CheckPatternPredicate(MatcherTable[MatcherIndex++]);
|
return SDISel.CheckPatternPredicate(MatcherTable[MatcherIndex++]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// CheckNodePredicate - Implements OP_CheckNodePredicate.
|
/// CheckNodePredicate - Implements OP_CheckNodePredicate.
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckNodePredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckNodePredicate(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SelectionDAGISel &SDISel, SDNode *N) {
|
SelectionDAGISel &SDISel, SDNode *N) {
|
||||||
return SDISel.CheckNodePredicate(N, MatcherTable[MatcherIndex++]);
|
return SDISel.CheckNodePredicate(N, MatcherTable[MatcherIndex++]);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckOpcode(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckOpcode(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDNode *N) {
|
SDNode *N) {
|
||||||
uint16_t Opc = MatcherTable[MatcherIndex++];
|
uint16_t Opc = MatcherTable[MatcherIndex++];
|
||||||
@ -1726,7 +1726,7 @@ CheckOpcode(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
return N->getOpcode() == Opc;
|
return N->getOpcode() == Opc;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N, const TargetLowering &TLI) {
|
SDValue N, const TargetLowering &TLI) {
|
||||||
MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
|
MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
|
||||||
@ -1736,7 +1736,7 @@ CheckType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
return VT == MVT::iPTR && N.getValueType() == TLI.getPointerTy();
|
return VT == MVT::iPTR && N.getValueType() == TLI.getPointerTy();
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckChildType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckChildType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N, const TargetLowering &TLI,
|
SDValue N, const TargetLowering &TLI,
|
||||||
unsigned ChildNo) {
|
unsigned ChildNo) {
|
||||||
@ -1746,14 +1746,14 @@ CheckChildType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckCondCode(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckCondCode(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N) {
|
SDValue N) {
|
||||||
return cast<CondCodeSDNode>(N)->get() ==
|
return cast<CondCodeSDNode>(N)->get() ==
|
||||||
(ISD::CondCode)MatcherTable[MatcherIndex++];
|
(ISD::CondCode)MatcherTable[MatcherIndex++];
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckValueType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckValueType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N, const TargetLowering &TLI) {
|
SDValue N, const TargetLowering &TLI) {
|
||||||
MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
|
MVT::SimpleValueType VT = (MVT::SimpleValueType)MatcherTable[MatcherIndex++];
|
||||||
@ -1764,7 +1764,7 @@ CheckValueType(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
return VT == MVT::iPTR && cast<VTSDNode>(N)->getVT() == TLI.getPointerTy();
|
return VT == MVT::iPTR && cast<VTSDNode>(N)->getVT() == TLI.getPointerTy();
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckInteger(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckInteger(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N) {
|
SDValue N) {
|
||||||
int64_t Val = MatcherTable[MatcherIndex++];
|
int64_t Val = MatcherTable[MatcherIndex++];
|
||||||
@ -1775,7 +1775,7 @@ CheckInteger(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
return C != 0 && C->getSExtValue() == Val;
|
return C != 0 && C->getSExtValue() == Val;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckAndImm(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckAndImm(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N, SelectionDAGISel &SDISel) {
|
SDValue N, SelectionDAGISel &SDISel) {
|
||||||
int64_t Val = MatcherTable[MatcherIndex++];
|
int64_t Val = MatcherTable[MatcherIndex++];
|
||||||
@ -1788,7 +1788,7 @@ CheckAndImm(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
|||||||
return C != 0 && SDISel.CheckAndMask(N.getOperand(0), C, Val);
|
return C != 0 && SDISel.CheckAndMask(N.getOperand(0), C, Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE static bool
|
LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
|
||||||
CheckOrImm(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
CheckOrImm(const unsigned char *MatcherTable, unsigned &MatcherIndex,
|
||||||
SDValue N, SelectionDAGISel &SDISel) {
|
SDValue N, SelectionDAGISel &SDISel) {
|
||||||
int64_t Val = MatcherTable[MatcherIndex++];
|
int64_t Val = MatcherTable[MatcherIndex++];
|
||||||
|
@ -35,7 +35,7 @@ namespace llvm {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
// Debuggers puts a breakpoint in this function.
|
// Debuggers puts a breakpoint in this function.
|
||||||
DISABLE_INLINE void __jit_debug_register_code() { }
|
LLVM_ATTRIBUTE_NOINLINE void __jit_debug_register_code() { }
|
||||||
|
|
||||||
// We put information about the JITed function in this global, which the
|
// We put information about the JITed function in this global, which the
|
||||||
// debugger reads. Make sure to specify the version statically, because the
|
// debugger reads. Make sure to specify the version statically, because the
|
||||||
|
@ -490,7 +490,7 @@ bool ARMBaseInstrInfo::isPredicable(MachineInstr *MI) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// FIXME: Works around a gcc miscompilation with -fstrict-aliasing.
|
/// FIXME: Works around a gcc miscompilation with -fstrict-aliasing.
|
||||||
DISABLE_INLINE
|
LLVM_ATTRIBUTE_NOINLINE
|
||||||
static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
|
static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
|
||||||
unsigned JTI);
|
unsigned JTI);
|
||||||
static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
|
static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
|
||||||
|
Loading…
Reference in New Issue
Block a user