diff options
author | Paul Robinson <paul_robinson@playstation.sony.com> | 2013-11-22 19:11:24 +0000 |
---|---|---|
committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2013-11-22 19:11:24 +0000 |
commit | 16c7e0b48cd0a34565aae663caee83e5a641823a (patch) | |
tree | 80db529e381349ec5d477ab2757249ba649c64a5 /lib/Target/TargetMachine.cpp | |
parent | 09f1b252af316c3edff5ab07de20ca8eeedb648d (diff) | |
download | llvm-16c7e0b48cd0a34565aae663caee83e5a641823a.tar.gz llvm-16c7e0b48cd0a34565aae663caee83e5a641823a.tar.bz2 llvm-16c7e0b48cd0a34565aae663caee83e5a641823a.tar.xz |
Teach ISel not to optimize 'optnone' functions (revised).
Improvements over r195317:
- Set/restore EnableFastISel flag instead of just running FastISel within
SelectAllBasicBlocks; the flag is checked in various places, and
FastISel won't run properly if those places don't do the right thing.
- Test looks for normal ISel versus FastISel behavior, and not
something more subtle that doesn't work everywhere.
Based on work by Andrea Di Biagio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetMachine.cpp')
-rw-r--r-- | lib/Target/TargetMachine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index b367287b53..9ba78bce7f 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -164,6 +164,11 @@ CodeGenOpt::Level TargetMachine::getOptLevel() const { return CodeGenInfo->getOptLevel(); } +void TargetMachine::setOptLevel(CodeGenOpt::Level Level) const { + if (CodeGenInfo) + CodeGenInfo->setOptLevel(Level); +} + bool TargetMachine::getAsmVerbosityDefault() { return AsmVerbosityDefault; } |