[llvm] r177122 - Prepare for adding InstrSchedModel annotations to X86 instructions.

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Mar 14 15:42:17 PDT 2013


Author: stoklund
Date: Thu Mar 14 17:42:17 2013
New Revision: 177122

URL: http://llvm.org/viewvc/llvm-project?rev=177122&view=rev
Log:
Prepare for adding InstrSchedModel annotations to X86 instructions.

The new InstrSchedModel is easier to use than the instruction
itineraries. It will be used to model instruction latency and throughput
in modern Intel microarchitectures like Sandy Bridge.

InstrSchedModel should be able to coexist with instruction itinerary
classes, but for cleanliness we should switch the Atom processor model
to the new InstrSchedModel as well.

Modified:
    llvm/trunk/lib/Target/X86/X86Schedule.td

Modified: llvm/trunk/lib/Target/X86/X86Schedule.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Schedule.td?rev=177122&r1=177121&r2=177122&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Schedule.td (original)
+++ llvm/trunk/lib/Target/X86/X86Schedule.td Thu Mar 14 17:42:17 2013
@@ -7,6 +7,32 @@
 //
 //===----------------------------------------------------------------------===//
 
+// InstrSchedModel annotations for out-of-order CPUs.
+//
+// These annotations are independent of the itinerary classes defined below.
+
+// Instructions with folded loads need to read the memory operand immediately,
+// but other register operands don't have to be read until the load is ready.
+// These are marked with ReadAfterLd.
+def ReadAfterLd : SchedRead;
+
+// Instructions with both a load and a store folded are modeled as a folded
+// load + WriteRMW.
+def WriteRMW : SchedWrite;
+
+// Most instructions can fold loads, so every SchedWrite comes in two variants:
+// With and without a folded load.
+
+// Arithmetic.
+def WriteALU     : SchedWrite; // Simple integer ALU op.
+def WriteALULd   : SchedWrite; // ALU op with folded load.
+def WriteIMul    : SchedWrite; // Integer multiplication.
+def WriteIMulLd  : SchedWrite;
+def WriteIDiv    : SchedWrite; // Integer division.
+def WriteIDivLd  : SchedWrite;
+def WriteLEA     : SchedWrite; // LEA instructions can't fold loads.
+
+
 //===----------------------------------------------------------------------===//
 // Instruction Itinerary classes used for X86
 def IIC_DEFAULT     : InstrItinClass;





More information about the llvm-commits mailing list