Skip to content

Commit 35fcb54

Browse files
committed
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
1 parent 0f0a50d commit 35fcb54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/X86/X86Subtarget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,10 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
401401
}
402402
}
403403

404+
// CPUName may have been set by the CPU detection code. Make sure the
405+
// new MCSchedModel is used.
406+
InitMCProcessorInfo(CPUName, FS);
407+
404408
if (X86ProcFamily == IntelAtom)
405409
PostRAScheduler = true;
406410

0 commit comments

Comments
 (0)