OLD | NEW |
1 //===- X86InstrInfo.h - X86 Instruction Information ------------*- C++ -*- ===// | 1 //===- X86InstrInfo.h - X86 Instruction Information ------------*- C++ -*- ===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file contains the X86 implementation of the TargetInstrInfo class. | 10 // This file contains the X86 implementation of the TargetInstrInfo class. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 isLeaMem(MI, Op); | 124 isLeaMem(MI, Op); |
125 } | 125 } |
126 | 126 |
127 class X86InstrInfo : public X86GenInstrInfo { | 127 class X86InstrInfo : public X86GenInstrInfo { |
128 X86TargetMachine &TM; | 128 X86TargetMachine &TM; |
129 const X86RegisterInfo RI; | 129 const X86RegisterInfo RI; |
130 | 130 |
131 /// RegOp2MemOpTable2Addr, RegOp2MemOpTable0, RegOp2MemOpTable1, | 131 /// RegOp2MemOpTable2Addr, RegOp2MemOpTable0, RegOp2MemOpTable1, |
132 /// RegOp2MemOpTable2 - Load / store folding opcode maps. | 132 /// RegOp2MemOpTable2 - Load / store folding opcode maps. |
133 /// | 133 /// |
134 DenseMap<unsigned, std::pair<unsigned,unsigned> > RegOp2MemOpTable2Addr; | 134 typedef DenseMap<unsigned, |
135 DenseMap<unsigned, std::pair<unsigned,unsigned> > RegOp2MemOpTable0; | 135 std::pair<unsigned, unsigned> > RegOp2MemOpTableType; |
136 DenseMap<unsigned, std::pair<unsigned,unsigned> > RegOp2MemOpTable1; | 136 RegOp2MemOpTableType RegOp2MemOpTable2Addr; |
137 DenseMap<unsigned, std::pair<unsigned,unsigned> > RegOp2MemOpTable2; | 137 RegOp2MemOpTableType RegOp2MemOpTable0; |
| 138 RegOp2MemOpTableType RegOp2MemOpTable1; |
| 139 RegOp2MemOpTableType RegOp2MemOpTable2; |
138 | 140 |
139 /// MemOp2RegOpTable - Load / store unfolding opcode map. | 141 /// MemOp2RegOpTable - Load / store unfolding opcode map. |
140 /// | 142 /// |
141 DenseMap<unsigned, std::pair<unsigned, unsigned> > MemOp2RegOpTable; | 143 typedef DenseMap<unsigned, |
| 144 std::pair<unsigned, unsigned> > MemOp2RegOpTableType; |
| 145 MemOp2RegOpTableType MemOp2RegOpTable; |
| 146 |
| 147 void AddTableEntry(RegOp2MemOpTableType &R2MTable, |
| 148 MemOp2RegOpTableType &M2RTable, |
| 149 unsigned RegOp, unsigned MemOp, unsigned Flags); |
142 | 150 |
143 public: | 151 public: |
144 explicit X86InstrInfo(X86TargetMachine &tm); | 152 explicit X86InstrInfo(X86TargetMachine &tm); |
145 | 153 |
146 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As | 154 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As |
147 /// such, whenever a client has an instance of instruction info, it should | 155 /// such, whenever a client has an instance of instruction info, it should |
148 /// always be able to get register info as well (through this method). | 156 /// always be able to get register info as well (through this method). |
149 /// | 157 /// |
150 virtual const X86RegisterInfo &getRegisterInfo() const { return RI; } | 158 virtual const X86RegisterInfo &getRegisterInfo() const { return RI; } |
151 | 159 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 365 |
358 /// isFrameOperand - Return true and the FrameIndex if the specified | 366 /// isFrameOperand - Return true and the FrameIndex if the specified |
359 /// operand and follow operands form a reference to the stack frame. | 367 /// operand and follow operands form a reference to the stack frame. |
360 bool isFrameOperand(const MachineInstr *MI, unsigned int Op, | 368 bool isFrameOperand(const MachineInstr *MI, unsigned int Op, |
361 int &FrameIndex) const; | 369 int &FrameIndex) const; |
362 }; | 370 }; |
363 | 371 |
364 } // End llvm namespace | 372 } // End llvm namespace |
365 | 373 |
366 #endif | 374 #endif |
OLD | NEW |