diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-10-04 20:46:43 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-10-04 20:46:43 +0000 |
commit | bfdbea6481a2247fcc63c27e3acd393000fd8d41 (patch) | |
tree | e7dfce8045101809ecdb13200171bdfab26beda5 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | |
parent | 0bb72c14240496d74f9263fad6aba830625499bd (diff) | |
download | bcm5719-llvm-bfdbea6481a2247fcc63c27e3acd393000fd8d41.tar.gz bcm5719-llvm-bfdbea6481a2247fcc63c27e3acd393000fd8d41.zip |
[Target] move reciprocal estimate settings from TargetOptions to TargetLowering
The motivation for the change is that we can't have pseudo-global settings for
codegen living in TargetOptions because that doesn't work with LTO.
Ideally, these reciprocal attributes will be moved to the instruction-level via
FMF, metadata, or something else. But making them function attributes is at least
an improvement over the current state.
The ingredients of this patch are:
Remove the reciprocal estimate command-line debug option.
Add TargetRecip to TargetLowering.
Remove TargetRecip from TargetOptions.
Clean up the TargetRecip implementation to work with this new scheme.
Set the default reciprocal settings in TargetLoweringBase (everything is off).
Update the PowerPC defaults, users, and tests.
Update the x86 defaults, users, and tests.
Note that if this patch needs to be reverted, the related clang patch checked in
at r283251 should be reverted too.
Differential Revision: https://reviews.llvm.org/D24816
llvm-svn: 283252
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 1bb6b674081..9b78739558c 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -204,23 +204,6 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, const Triple &TT, TargetABI(computeTargetABI(TT, Options)), Subtarget(TargetTriple, CPU, computeFSAdditions(FS, OL, TT), *this) { - // For the estimates, convergence is quadratic, so we essentially double the - // number of digits correct after every iteration. For both FRE and FRSQRTE, - // the minimum architected relative accuracy is 2^-5. When hasRecipPrec(), - // this is 2^-14. IEEE float has 23 digits and double has 52 digits. - unsigned RefinementSteps = Subtarget.hasRecipPrec() ? 1 : 3, - RefinementSteps64 = RefinementSteps + 1; - - this->Options.Reciprocals.setDefaults("sqrtf", true, RefinementSteps); - this->Options.Reciprocals.setDefaults("vec-sqrtf", true, RefinementSteps); - this->Options.Reciprocals.setDefaults("divf", true, RefinementSteps); - this->Options.Reciprocals.setDefaults("vec-divf", true, RefinementSteps); - - this->Options.Reciprocals.setDefaults("sqrtd", true, RefinementSteps64); - this->Options.Reciprocals.setDefaults("vec-sqrtd", true, RefinementSteps64); - this->Options.Reciprocals.setDefaults("divd", true, RefinementSteps64); - this->Options.Reciprocals.setDefaults("vec-divd", true, RefinementSteps64); - initAsmInfo(); } |