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
This commit is contained in:
Preston Gurd 2012-10-03 15:55:13 +00:00
parent 6afc7cbdfe
commit bfcb4aa10b

View File

@ -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;