summaryrefslogtreecommitdiff
path: root/include/llvm/MC
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2013-11-21 06:33:32 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2013-11-21 06:33:32 +0000
commit6079f00035e029f12e4be0281aa2cbfbb4817141 (patch)
treeac873fda635180a25dbb8eb20f9d06f617622386 /include/llvm/MC
parent397afeb1fb76d38efc34fd8d0e4600d5d1d9423c (diff)
downloadllvm-6079f00035e029f12e4be0281aa2cbfbb4817141.tar.gz
llvm-6079f00035e029f12e4be0281aa2cbfbb4817141.tar.bz2
llvm-6079f00035e029f12e4be0281aa2cbfbb4817141.tar.xz
Teach ISel not to optimize 'optnone' functions.
Based on work by Andrea Di Biagio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCCodeGenInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/MC/MCCodeGenInfo.h b/include/llvm/MC/MCCodeGenInfo.h
index d1765e1240..84ce934d82 100644
--- a/include/llvm/MC/MCCodeGenInfo.h
+++ b/include/llvm/MC/MCCodeGenInfo.h
@@ -42,6 +42,9 @@ namespace llvm {
CodeModel::Model getCodeModel() const { return CMModel; }
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
+
+ // Allow overriding OptLevel on a per-function basis.
+ void setOptLevel(CodeGenOpt::Level Level) { OptLevel = Level; }
};
} // namespace llvm