summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp')
-rw-r--r--contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp
index 435a5e7..f7bf86b 100644
--- a/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp
+++ b/contrib/llvm/lib/CodeGen/TargetOptionsImpl.cpp
@@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/IR/Function.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/Target/TargetOptions.h"
@@ -21,7 +22,8 @@ using namespace llvm;
bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
// Check to see if we should eliminate non-leaf frame pointers and then
// check to see if we should eliminate all frame pointers.
- if (NoFramePointerElimNonLeaf && !NoFramePointerElim) {
+ if (MF.getFunction()->hasFnAttribute("no-frame-pointer-elim-non-leaf") &&
+ !NoFramePointerElim) {
const MachineFrameInfo *MFI = MF.getFrameInfo();
return MFI->hasCalls();
}
@@ -49,30 +51,3 @@ bool TargetOptions::HonorSignDependentRoundingFPMath() const {
StringRef TargetOptions::getTrapFunctionName() const {
return TrapFuncName;
}
-
-bool TargetOptions::operator==(const TargetOptions &TO) {
-#define ARE_EQUAL(X) X == TO.X
- return
- ARE_EQUAL(UnsafeFPMath) &&
- ARE_EQUAL(NoInfsFPMath) &&
- ARE_EQUAL(NoNaNsFPMath) &&
- ARE_EQUAL(HonorSignDependentRoundingFPMathOption) &&
- ARE_EQUAL(UseSoftFloat) &&
- ARE_EQUAL(NoZerosInBSS) &&
- ARE_EQUAL(JITExceptionHandling) &&
- ARE_EQUAL(JITEmitDebugInfo) &&
- ARE_EQUAL(JITEmitDebugInfoToDisk) &&
- ARE_EQUAL(GuaranteedTailCallOpt) &&
- ARE_EQUAL(DisableTailCalls) &&
- ARE_EQUAL(StackAlignmentOverride) &&
- ARE_EQUAL(RealignStack) &&
- ARE_EQUAL(SSPBufferSize) &&
- ARE_EQUAL(EnableFastISel) &&
- ARE_EQUAL(PositionIndependentExecutable) &&
- ARE_EQUAL(EnableSegmentedStacks) &&
- ARE_EQUAL(UseInitArray) &&
- ARE_EQUAL(TrapFuncName) &&
- ARE_EQUAL(FloatABIType) &&
- ARE_EQUAL(AllowFPOpFusion);
-#undef ARE_EQUAL
-}
OpenPOWER on IntegriCloud