[llvm] r190919 - 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.
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Sep 30 12:21:16 PDT 2013
testcase?
On 18 September 2013 01:54, Craig Topper <craig.topper at gmail.com> wrote:
> Author: ctopper
> Date: Wed Sep 18 00:54:09 2013
> New Revision: 190919
>
> URL: http://llvm.org/viewvc/llvm-project?rev=190919&view=rev
> Log:
> 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.
>
> Modified:
> llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
> llvm/trunk/lib/MC/MCSubtargetInfo.cpp
> llvm/trunk/lib/Target/X86/X86Subtarget.cpp
>
> Modified: llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSubtargetInfo.h?rev=190919&r1=190918&r2=190919&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/MC/MCSubtargetInfo.h (original)
> +++ llvm/trunk/include/llvm/MC/MCSubtargetInfo.h Wed Sep 18 00:54:09 2013
> @@ -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);
>
> Modified: llvm/trunk/lib/MC/MCSubtargetInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSubtargetInfo.cpp?rev=190919&r1=190918&r2=190919&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCSubtargetInfo.cpp (original)
> +++ llvm/trunk/lib/MC/MCSubtargetInfo.cpp Wed Sep 18 00:54:09 2013
> @@ -27,6 +27,11 @@ MCSubtargetInfo::InitMCProcessorInfo(Str
> FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
> ProcFeatures, NumFeatures);
>
> + InitCPUSchedModel(CPU);
> +}
> +
> +void
> +MCSubtargetInfo::InitCPUSchedModel(StringRef CPU) {
> if (!CPU.empty())
> CPUSchedModel = getSchedModelForCPU(CPU);
> else
>
> Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=190919&r1=190918&r2=190919&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Wed Sep 18 00:54:09 2013
> @@ -453,7 +453,7 @@ void X86Subtarget::resetSubtargetFeature
>
> // 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list