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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 RegSetMask RegExclude = RegSet_None; | 167 RegSetMask RegExclude = RegSet_None; |
168 RegInclude |= RegSet_CallerSave; | 168 RegInclude |= RegSet_CallerSave; |
169 RegInclude |= RegSet_CalleeSave; | 169 RegInclude |= RegSet_CalleeSave; |
170 RegExclude |= RegSet_StackPointer; | 170 RegExclude |= RegSet_StackPointer; |
171 if (hasFramePointer()) | 171 if (hasFramePointer()) |
172 RegExclude |= RegSet_FramePointer; | 172 RegExclude |= RegSet_FramePointer; |
173 llvm::SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude); | 173 llvm::SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude); |
174 LinearScan.scan(RegMask); | 174 LinearScan.scan(RegMask); |
175 } | 175 } |
176 | 176 |
| 177 TargetGlobalInitLowering * |
| 178 TargetGlobalInitLowering::createLowering(TargetArch Target, |
| 179 GlobalContext *Ctx) { |
| 180 // These statements can be #ifdef'd to specialize the code generator |
| 181 // to a subset of the available targets. TODO: use CRTP. |
| 182 if (Target == Target_X8632) |
| 183 return TargetGlobalInitX8632::create(Ctx); |
| 184 #if 0 |
| 185 if (Target == Target_X8664) |
| 186 return IceTargetGlobalInitX8664::create(Ctx); |
| 187 if (Target == Target_ARM32) |
| 188 return IceTargetGlobalInitARM32::create(Ctx); |
| 189 if (Target == Target_ARM64) |
| 190 return IceTargetGlobalInitARM64::create(Ctx); |
| 191 #endif |
| 192 llvm_unreachable("Unsupported target"); |
| 193 return NULL; |
| 194 } |
| 195 |
177 } // end of namespace Ice | 196 } // end of namespace Ice |
OLD | NEW |