summaryrefslogtreecommitdiff
path: root/lib/Target/X86/MCTargetDesc
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-11-16 08:38:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-11-16 08:38:26 +0000
commitb95fc31aa2e5a0a0b9ee1909d1cb949577c5aa16 (patch)
treea891fa0a8cb7d5f75446fc0f0346eb55b18a715c /lib/Target/X86/MCTargetDesc
parentf1b41dd38d2b2713e3870f384525b020bbac05f6 (diff)
downloadllvm-b95fc31aa2e5a0a0b9ee1909d1cb949577c5aa16.tar.gz
llvm-b95fc31aa2e5a0a0b9ee1909d1cb949577c5aa16.tar.bz2
llvm-b95fc31aa2e5a0a0b9ee1909d1cb949577c5aa16.tar.xz
Sink codegen optimization level into MCCodeGenInfo along side relocation model
and code model. This eliminates the need to pass OptLevel flag all over the place and makes it possible for any codegen pass to use this information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc')
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
index 03c394896c..a8435152e2 100644
--- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
+++ b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
@@ -385,7 +385,8 @@ static MCAsmInfo *createX86MCAsmInfo(const Target &T, StringRef TT) {
}
static MCCodeGenInfo *createX86MCCodeGenInfo(StringRef TT, Reloc::Model RM,
- CodeModel::Model CM) {
+ CodeModel::Model CM,
+ CodeGenOpt::Level OL) {
MCCodeGenInfo *X = new MCCodeGenInfo();
Triple T(TT);
@@ -429,7 +430,7 @@ static MCCodeGenInfo *createX86MCCodeGenInfo(StringRef TT, Reloc::Model RM,
// 64-bit JIT places everything in the same buffer except external funcs.
CM = is64Bit ? CodeModel::Large : CodeModel::Small;
- X->InitMCCodeGenInfo(RM, CM);
+ X->InitMCCodeGenInfo(RM, CM, OL);
return X;
}