diff options
Diffstat (limited to 'lib/Target/TargetMachine.cpp')
-rw-r--r-- | lib/Target/TargetMachine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index 8a6d28490e8c..e8fe0a2b218e 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -74,10 +74,10 @@ void TargetMachine::resetTargetOptions(const Function &F) const { Options.X = DefaultOptions.X; \ } while (0) - RESET_OPTION(LessPreciseFPMADOption, "less-precise-fpmad"); RESET_OPTION(UnsafeFPMath, "unsafe-fp-math"); RESET_OPTION(NoInfsFPMath, "no-infs-fp-math"); RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math"); + RESET_OPTION(NoSignedZerosFPMath, "no-signed-zeros-fp-math"); RESET_OPTION(NoTrappingFPMath, "no-trapping-math"); StringRef Denormal = @@ -156,8 +156,11 @@ bool TargetMachine::shouldAssumeDSOLocal(const Module &M, bool IsTLS = GV && GV->isThreadLocal(); bool IsAccessViaCopyRelocs = Options.MCOptions.MCPIECopyRelocations && GV && isa<GlobalVariable>(GV); - // Check if we can use copy relocations. - if (!IsTLS && (RM == Reloc::Static || IsAccessViaCopyRelocs)) + Triple::ArchType Arch = TT.getArch(); + bool IsPPC = + Arch == Triple::ppc || Arch == Triple::ppc64 || Arch == Triple::ppc64le; + // Check if we can use copy relocations. PowerPC has no copy relocations. + if (!IsTLS && !IsPPC && (RM == Reloc::Static || IsAccessViaCopyRelocs)) return true; } @@ -198,7 +201,7 @@ CodeGenOpt::Level TargetMachine::getOptLevel() const { return OptLevel; } void TargetMachine::setOptLevel(CodeGenOpt::Level Level) { OptLevel = Level; } TargetIRAnalysis TargetMachine::getTargetIRAnalysis() { - return TargetIRAnalysis([this](const Function &F) { + return TargetIRAnalysis([](const Function &F) { return TargetTransformInfo(F.getParent()->getDataLayout()); }); } |