summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetOptionsImpl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-05 21:52:40 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-05 21:52:40 +0000
commiteb108bad50bb5198867544b773bd55c44cb3d2fe (patch)
tree972b5063a7ab42aced3e86d743b52da988629fd6 /llvm/lib/CodeGen/TargetOptionsImpl.cpp
parent81c46d0809b3734d8ecc1a8969c9f071d6439632 (diff)
downloadbcm5719-llvm-eb108bad50bb5198867544b773bd55c44cb3d2fe.tar.gz
bcm5719-llvm-eb108bad50bb5198867544b773bd55c44cb3d2fe.zip
Use the target options specified on a function to reset the back-end.
During LTO, the target options on functions within the same Module may change. This would necessitate resetting some of the back-end. Do this for X86, because it's a Friday afternoon. llvm-svn: 178917
Diffstat (limited to 'llvm/lib/CodeGen/TargetOptionsImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetOptionsImpl.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/llvm/lib/CodeGen/TargetOptionsImpl.cpp
index 0f59d0169e1..435a5e7e0bf 100644
--- a/llvm/lib/CodeGen/TargetOptionsImpl.cpp
+++ b/llvm/lib/CodeGen/TargetOptionsImpl.cpp
@@ -50,3 +50,29 @@ 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