OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
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 /// \file | 10 /// \file |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 /// helpers will create a new Operand and emit instructions that guarantee | 230 /// helpers will create a new Operand and emit instructions that guarantee |
231 /// that the Operand kind is one of those indicated by the LegalMask (a | 231 /// that the Operand kind is one of those indicated by the LegalMask (a |
232 /// bitmask of allowed kinds). If the input Operand is known to already meet | 232 /// bitmask of allowed kinds). If the input Operand is known to already meet |
233 /// the constraints, it may be simply returned as the result, without creating | 233 /// the constraints, it may be simply returned as the result, without creating |
234 /// any new instructions or operands. | 234 /// any new instructions or operands. |
235 enum OperandLegalization { | 235 enum OperandLegalization { |
236 Legal_None = 0, | 236 Legal_None = 0, |
237 Legal_Reg = 1 << 0, // physical register, not stack location | 237 Legal_Reg = 1 << 0, // physical register, not stack location |
238 Legal_Imm = 1 << 1, | 238 Legal_Imm = 1 << 1, |
239 Legal_Mem = 1 << 2, // includes [eax+4*ecx] as well as [esp+12] | 239 Legal_Mem = 1 << 2, // includes [eax+4*ecx] as well as [esp+12] |
240 Legal_All = ~Legal_None | 240 Legal_Rematerializable = 1 << 3, |
| 241 Legal_All = ~Legal_Rematerializable |
241 }; | 242 }; |
242 using LegalMask = uint32_t; | 243 using LegalMask = uint32_t; |
243 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, | 244 Operand *legalize(Operand *From, LegalMask Allowed = Legal_All, |
244 int32_t RegNum = Variable::NoRegister); | 245 int32_t RegNum = Variable::NoRegister); |
245 Variable *legalizeToReg(Operand *From, int32_t RegNum = Variable::NoRegister); | 246 Variable *legalizeToReg(Operand *From, int32_t RegNum = Variable::NoRegister); |
246 /// Legalize the first source operand for use in the cmp instruction. | 247 /// Legalize the first source operand for use in the cmp instruction. |
247 Operand *legalizeSrc0ForCmp(Operand *Src0, Operand *Src1); | 248 Operand *legalizeSrc0ForCmp(Operand *Src0, Operand *Src1); |
248 /// Turn a pointer operand into a memory operand that can be used by a real | 249 /// Turn a pointer operand into a memory operand that can be used by a real |
249 /// load/store operation. Legalizes the operand as well. This is a nop if the | 250 /// load/store operation. Legalizes the operand as well. This is a nop if the |
250 /// operand is already a legal memory operand. | 251 /// operand is already a legal memory operand. |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 lowerIcmp64(const InstIcmp *Icmp, const InstBr *Br); | 746 lowerIcmp64(const InstIcmp *Icmp, const InstBr *Br); |
746 | 747 |
747 BoolFolding FoldingInfo; | 748 BoolFolding FoldingInfo; |
748 }; | 749 }; |
749 } // end of namespace X86Internal | 750 } // end of namespace X86Internal |
750 } // end of namespace Ice | 751 } // end of namespace Ice |
751 | 752 |
752 #include "IceTargetLoweringX86BaseImpl.h" | 753 #include "IceTargetLoweringX86BaseImpl.h" |
753 | 754 |
754 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H | 755 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H |
OLD | NEW |