forked from OSchip/llvm-project
Fix X86 subtarget to not overwrite the autodetected features by calling InitMCProcessorInfo right after detecting them. Instead add a new function that only updates the scheduling model and call that.
llvm-svn: 190919
This commit is contained in:
parent
be3e01e61f
commit
a8442344ed
|
@ -72,6 +72,9 @@ public:
|
|||
/// feature string). Recompute feature bits and scheduling model.
|
||||
void InitMCProcessorInfo(StringRef CPU, StringRef FS);
|
||||
|
||||
/// InitCPUSchedModel - Recompute scheduling model based on CPU.
|
||||
void InitCPUSchedModel(StringRef CPU);
|
||||
|
||||
/// ToggleFeature - Toggle a feature and returns the re-computed feature
|
||||
/// bits. This version does not change the implied bits.
|
||||
uint64_t ToggleFeature(uint64_t FB);
|
||||
|
|
|
@ -27,6 +27,11 @@ MCSubtargetInfo::InitMCProcessorInfo(StringRef CPU, StringRef FS) {
|
|||
FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
|
||||
ProcFeatures, NumFeatures);
|
||||
|
||||
InitCPUSchedModel(CPU);
|
||||
}
|
||||
|
||||
void
|
||||
MCSubtargetInfo::InitCPUSchedModel(StringRef CPU) {
|
||||
if (!CPU.empty())
|
||||
CPUSchedModel = getSchedModelForCPU(CPU);
|
||||
else
|
||||
|
|
|
@ -453,7 +453,7 @@ void X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|||
|
||||
// CPUName may have been set by the CPU detection code. Make sure the
|
||||
// new MCSchedModel is used.
|
||||
InitMCProcessorInfo(CPUName, FS);
|
||||
InitCPUSchedModel(CPUName);
|
||||
|
||||
if (X86ProcFamily == IntelAtom || X86ProcFamily == IntelSLM)
|
||||
PostRAScheduler = true;
|
||||
|
|
Loading…
Reference in New Issue