[llvm-commits] [llvm] r164105 - in /llvm/trunk: include/llvm/MC/MCSubtargetInfo.h lib/MC/MCSubtargetInfo.cpp utils/TableGen/SubtargetEmitter.cpp

Andrew Trick atrick at apple.com
Tue Sep 18 09:47:10 PDT 2012


Hi Sergei and others on llvm-commits, 

A heads up on MachineScheduler status:

I have two more checkins today (I'm waiting until SROA numbers are in because my change will introduce new code for latency computation), then the new machine model should be usable. Both MachineScheduler and PostRA scheduler will use the provided latencies under a temporary -schedmodel flag. Otherwise it falls back to the old itineraries.

After that, I'll start checking in logic and heuristics to MachineScheduler to account for the processor resources defined by the new model. So you'll see a gradual stream of checkins related to that for a few weeks. I don't expect to be "done" implementing the MachineScheduler any time soon, but I'll let you know when I reach a point where it would be worthwhile for you to experiment with the new infrastructure.

-Andy

On Sep 18, 2012, at 7:21 AM, Sergei Larin <slarin at codeaurora.org> wrote:
> 
>> -----Original Message-----
>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Andrew Trick
>> Sent: Tuesday, September 18, 2012 12:33 AM
>> To: llvm-commits at cs.uiuc.edu
>> Subject: [llvm-commits] [llvm] r164105 - in /llvm/trunk:
>> include/llvm/MC/MCSubtargetInfo.h lib/MC/MCSubtargetInfo.cpp
>> utils/TableGen/SubtargetEmitter.cpp
>> 
>> Author: atrick
>> Date: Tue Sep 18 00:33:15 2012
>> New Revision: 164105
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=164105&view=rev
>> Log:
>> Replaced ReInitMCSubtargetInfo with InitMCProcessor.
>> 
>> Now where we used to call ReInitMCSubtargetInfo, we actually recompute
>> the same information as InitMCSubtargetInfo instead of only setting the
>> feature bits.
>> 
>> Modified:
>>    llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
>>    llvm/trunk/lib/MC/MCSubtargetInfo.cpp
>>    llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
>> 
>> Modified: llvm/trunk/include/llvm/MC/MCSubtargetInfo.h
>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/include/llvm/MC/MCSubtargetInfo.h?rev=164105&r1=1641
>> 04&r2=164105&view=diff
>> =======================================================================
>> =======
>> --- llvm/trunk/include/llvm/MC/MCSubtargetInfo.h (original)
>> +++ llvm/trunk/include/llvm/MC/MCSubtargetInfo.h Tue Sep 18 00:33:15
>> +++ 2012
>> @@ -68,9 +68,9 @@
>>     return FeatureBits;
>>   }
>> 
>> -  /// ReInitMCSubtargetInfo - Change CPU (and optionally supplemented
>> with
>> -  /// feature string), recompute and return feature bits.
>> -  uint64_t ReInitMCSubtargetInfo(StringRef CPU, StringRef FS);
>> +  /// InitMCProcessorInfo - Set or change the CPU (optionally
>> + supplemented with  /// feature string). Recompute feature bits and
>> scheduling model.
>> +  void InitMCProcessorInfo(StringRef CPU, StringRef FS);
>> 
>>   /// ToggleFeature - Toggle a feature and returns the re-computed
>> feature
>>   /// bits. This version does not change the implied bits.
>> 
>> Modified: llvm/trunk/lib/MC/MCSubtargetInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/lib/MC/MCSubtargetInfo.cpp?rev=164105&r1=164104&r2=1
>> 64105&view=diff
>> =======================================================================
>> =======
>> --- llvm/trunk/lib/MC/MCSubtargetInfo.cpp (original)
>> +++ llvm/trunk/lib/MC/MCSubtargetInfo.cpp Tue Sep 18 00:33:15 2012
>> @@ -19,6 +19,20 @@
>> 
>> MCSchedModel MCSchedModel::DefaultSchedModel; // For unknown
>> processors.
>> 
>> +/// ReInitMCSubtargetInfo - Set or change the CPU (optionally
>> +supplemented /// with feature string). Recompute feature bits and
>> scheduling model.
>> +void
>> +MCSubtargetInfo::InitMCProcessorInfo(StringRef CPU, StringRef FS) {
>> +  SubtargetFeatures Features(FS);
>> +  FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
>> +                                        ProcFeatures, NumFeatures);
>> +
>> +  if (!CPU.empty())
>> +    CPUSchedModel = getSchedModelForCPU(CPU);
>> +  else
>> +    CPUSchedModel = &MCSchedModel::DefaultSchedModel; }
>> +
>> void
>> MCSubtargetInfo::InitMCSubtargetInfo(StringRef TT, StringRef CPU,
>> StringRef FS,
>>                                      const SubtargetFeatureKV *PF, @@
>> -45,20 +59,7 @@
>>   NumFeatures = NF;
>>   NumProcs = NP;
>> 
>> -  SubtargetFeatures Features(FS);
>> -  FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
>> -                                        ProcFeatures, NumFeatures);
>> -
>> -  CPUSchedModel = getSchedModelForCPU(CPU); -}
>> -
>> -/// ReInitMCSubtargetInfo - Change CPU (and optionally supplemented
>> with -/// feature string) and recompute feature bits.
>> -uint64_t MCSubtargetInfo::ReInitMCSubtargetInfo(StringRef CPU,
>> StringRef FS) {
>> -  SubtargetFeatures Features(FS);
>> -  FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
>> -                                        ProcFeatures, NumFeatures);
>> -  return FeatureBits;
>> +  InitMCProcessorInfo(CPU, FS);
>> }
>> 
>> /// ToggleFeature - Toggle a feature and returns the re-computed
>> feature
>> 
>> Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=164105&r1=16
>> 4104&r2=164105&view=diff
>> =======================================================================
>> =======
>> --- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
>> +++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Tue Sep 18 00:33:15
>> +++ 2012
>> @@ -1213,7 +1213,8 @@
>>     return;
>>   }
>> 
>> -  OS << "  uint64_t Bits = ReInitMCSubtargetInfo(CPU, FS);\n";
>> +  OS << "  InitMCProcessorInfo(CPU, FS);\n"
>> +     << "  uint64_t Bits = getFeatureBits();\n";
>> 
>>   for (unsigned i = 0; i < Features.size(); i++) {
>>     // Next record
>> 
>> 
>> _______________________________________________
>> 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