diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:25:46 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:25:46 +0000 |
commit | 7a7e6055035bfd93ab507051819373a6f171258b (patch) | |
tree | dc9ac22b4fea4f445748feaf7232a146623f0dfa /contrib/llvm/lib/Target/TargetMachine.cpp | |
parent | b96a714f453e7f5aeeb3c2df2c3e1e8ad749f96f (diff) | |
parent | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (diff) | |
download | src-7a7e6055035bfd93ab507051819373a6f171258b.tar.gz src-7a7e6055035bfd93ab507051819373a6f171258b.zip |
Merge llvm trunk r300422 and resolve conflicts.
Notes
Notes:
svn path=/projects/clang500-import/; revision=317029
Diffstat (limited to 'contrib/llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/TargetMachine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/llvm/lib/Target/TargetMachine.cpp b/contrib/llvm/lib/Target/TargetMachine.cpp index 8a6d28490e8c..e8fe0a2b218e 100644 --- a/contrib/llvm/lib/Target/TargetMachine.cpp +++ b/contrib/llvm/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()); }); } |