summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorPreston Gurd <preston.gurd@intel.com>2012-10-03 15:55:13 +0000
committerPreston Gurd <preston.gurd@intel.com>2012-10-03 15:55:13 +0000
commit35fcb54cdd28e5b548a5f2f805a507ca58206be4 (patch)
tree8ebd8d2bcc3e03155e8d748840477e9c93e6db41 /llvm
parent0f0a50da56dae4a219aee55b17bc71f5079b01a4 (diff)
downloadbcm5719-llvm-35fcb54cdd28e5b548a5f2f805a507ca58206be4.tar.gz
bcm5719-llvm-35fcb54cdd28e5b548a5f2f805a507ca58206be4.zip
Set up MCSchedModel after detecting the CPU type in X86SubTarget.
Corrects a problem whereby MCSchedModel was not being set up when the CPU type was auto-detected. Patch by Andy Zhang. llvm-svn: 165122
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index 0d7b664e8e0..24b551d21ce 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -401,6 +401,10 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
}
}
+ // CPUName may have been set by the CPU detection code. Make sure the
+ // new MCSchedModel is used.
+ InitMCProcessorInfo(CPUName, FS);
+
if (X86ProcFamily == IntelAtom)
PostRAScheduler = true;
OpenPOWER on IntegriCloud