[PATCH] Move Post RA Scheduling flag bit into SchedMachineModel

Sanjay Patel spatel at rotateright.com
Wed Jul 9 15:49:57 PDT 2014


Completed patch to update all targets to use the new interface. This is purely a refactoring job; no functional changes are intended.

Summary:
1. Removed PostRAScheduler bits from subtargets (X86, ARM).
2. Added PostRAScheduler bit to MCSchedModel class.
3. This bit is set by a CPU's scheduling model (if it exists).
4. Removed enablePostRAScheduler() function from TargetSubtargetInfo and subclasses.
5. Fixed the existing enablePostMachineScheduler() method to use the MCSchedModel (was just returning false!).
6. Added methods to TargetSubtargetInfo to allow overrides for AntiDepBreakMode, CriticalPathRCs, and OptLevel for PostRAScheduling.
7. Added enablePostRAScheduler() function to PostRAScheduler class which queries the subtarget for the above values.
8. Preserved existing scheduler behavior for ARM, MIPS, PPC, and X86:
   a. ARM overrides the CPU's postRA settings by enabling postRA for any non-Thumb or Thumb2 subtarget.
   b. MIPS overrides the CPU's postRA settings by enabling postRA for everything.
   c. PPC overrides the CPU's postRA settings by enabling postRA for everything.
   d. X86 is the only target that actually has postRA specified via sched model info.

http://reviews.llvm.org/D4217

Files:
  include/llvm/MC/MCSchedule.h
  include/llvm/Target/TargetSchedule.td
  include/llvm/Target/TargetSubtargetInfo.h
  lib/CodeGen/PostRASchedulerList.cpp
  lib/Target/ARM/ARMSubtarget.cpp
  lib/Target/ARM/ARMSubtarget.h
  lib/Target/Mips/MipsSubtarget.cpp
  lib/Target/Mips/MipsSubtarget.h
  lib/Target/PowerPC/PPCSubtarget.cpp
  lib/Target/PowerPC/PPCSubtarget.h
  lib/Target/TargetSubtargetInfo.cpp
  lib/Target/X86/X86Schedule.td
  lib/Target/X86/X86ScheduleAtom.td
  lib/Target/X86/X86ScheduleSLM.td
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/X86/X86Subtarget.h
  utils/TableGen/SubtargetEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4217.11224.patch
Type: text/x-patch
Size: 19186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140709/4e8c0f8f/attachment.bin>


More information about the llvm-commits mailing list