OLD | NEW |
1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// | 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// |
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 // This file implements the skeleton of the TargetLowering class, | 10 // This file implements the skeleton of the TargetLowering class, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return IceTargetARM64::create(Func); | 98 return IceTargetARM64::create(Func); |
99 #endif | 99 #endif |
100 Func->setError("Unsupported target"); | 100 Func->setError("Unsupported target"); |
101 return nullptr; | 101 return nullptr; |
102 } | 102 } |
103 | 103 |
104 TargetLowering::TargetLowering(Cfg *Func) | 104 TargetLowering::TargetLowering(Cfg *Func) |
105 : Func(Func), Ctx(Func->getContext()), | 105 : Func(Func), Ctx(Func->getContext()), |
106 RandomizeRegisterAllocation(CLRandomizeRegisterAllocation), | 106 RandomizeRegisterAllocation(CLRandomizeRegisterAllocation), |
107 HasComputedFrame(false), CallsReturnsTwice(false), StackAdjustment(0), | 107 HasComputedFrame(false), CallsReturnsTwice(false), StackAdjustment(0), |
108 Context() {} | 108 Context(), SnapshotStackAdjustment(0) {} |
109 | 109 |
110 std::unique_ptr<Assembler> TargetLowering::createAssembler(TargetArch Target, | 110 std::unique_ptr<Assembler> TargetLowering::createAssembler(TargetArch Target, |
111 Cfg *Func) { | 111 Cfg *Func) { |
112 // These statements can be #ifdef'd to specialize the assembler | 112 // These statements can be #ifdef'd to specialize the assembler |
113 // to a subset of the available targets. TODO: use CRTP. | 113 // to a subset of the available targets. TODO: use CRTP. |
114 if (Target == Target_X8632) | 114 if (Target == Target_X8632) |
115 return std::unique_ptr<Assembler>(new x86::AssemblerX86()); | 115 return std::unique_ptr<Assembler>(new x86::AssemblerX86()); |
116 Func->setError("Unsupported target"); | 116 Func->setError("Unsupported target"); |
117 return nullptr; | 117 return nullptr; |
118 } | 118 } |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 if (Target == Target_ARM64) | 269 if (Target == Target_ARM64) |
270 return std::unique_ptr<TargetDataLowering>(TargetDataARM64::create(Ctx)); | 270 return std::unique_ptr<TargetDataLowering>(TargetDataARM64::create(Ctx)); |
271 #endif | 271 #endif |
272 llvm_unreachable("Unsupported target"); | 272 llvm_unreachable("Unsupported target"); |
273 return nullptr; | 273 return nullptr; |
274 } | 274 } |
275 | 275 |
276 TargetDataLowering::~TargetDataLowering() {} | 276 TargetDataLowering::~TargetDataLowering() {} |
277 | 277 |
278 } // end of namespace Ice | 278 } // end of namespace Ice |
OLD | NEW |