From: Preston Gurd Date: Wed, 3 Oct 2012 15:55:13 +0000 (+0000) Subject: Set up MCSchedModel after detecting the CPU type in X86SubTarget. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bfcb4aa10b5948539f6ee59eecfe88faa9fc4e94;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165122 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 0d7b664e8e0..24b551d21ce 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/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;