OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// | 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// |
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 TargetLoweringX8632 class, which | 10 // This file implements the TargetLoweringX8632 class, which |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 return; | 322 return; |
323 Func->placePhiStores(); | 323 Func->placePhiStores(); |
324 if (Func->hasError()) | 324 if (Func->hasError()) |
325 return; | 325 return; |
326 Func->deletePhis(); | 326 Func->deletePhis(); |
327 if (Func->hasError()) | 327 if (Func->hasError()) |
328 return; | 328 return; |
329 Func->dump("After Phi lowering"); | 329 Func->dump("After Phi lowering"); |
330 | 330 |
331 // Address mode optimization. | 331 // Address mode optimization. |
332 Func->getVMetadata()->init(); | 332 Func->getVMetadata()->init(VMK_SingleDefs); |
333 Func->doAddressOpt(); | 333 Func->doAddressOpt(); |
334 | 334 |
335 // Argument lowering | 335 // Argument lowering |
336 Func->doArgLowering(); | 336 Func->doArgLowering(); |
337 | 337 |
338 // Target lowering. This requires liveness analysis for some parts | 338 // Target lowering. This requires liveness analysis for some parts |
339 // of the lowering decisions, such as compare/branch fusing. If | 339 // of the lowering decisions, such as compare/branch fusing. If |
340 // non-lightweight liveness analysis is used, the instructions need | 340 // non-lightweight liveness analysis is used, the instructions need |
341 // to be renumbered first. TODO: This renumbering should only be | 341 // to be renumbered first. TODO: This renumbering should only be |
342 // necessary if we're actually calculating live intervals, which we | 342 // necessary if we're actually calculating live intervals, which we |
(...skipping 22 matching lines...) Expand all Loading... |
365 Func->liveness(Liveness_Intervals); | 365 Func->liveness(Liveness_Intervals); |
366 if (Func->hasError()) | 366 if (Func->hasError()) |
367 return; | 367 return; |
368 // Validate the live range computations. The expensive validation | 368 // Validate the live range computations. The expensive validation |
369 // call is deliberately only made when assertions are enabled. | 369 // call is deliberately only made when assertions are enabled. |
370 assert(Func->validateLiveness()); | 370 assert(Func->validateLiveness()); |
371 ComputedLiveRanges = true; | 371 ComputedLiveRanges = true; |
372 // The post-codegen dump is done here, after liveness analysis and | 372 // The post-codegen dump is done here, after liveness analysis and |
373 // associated cleanup, to make the dump cleaner and more useful. | 373 // associated cleanup, to make the dump cleaner and more useful. |
374 Func->dump("After initial x8632 codegen"); | 374 Func->dump("After initial x8632 codegen"); |
375 Func->getVMetadata()->init(); | 375 Func->getVMetadata()->init(VMK_All); |
376 regAlloc(); | 376 regAlloc(); |
377 if (Func->hasError()) | 377 if (Func->hasError()) |
378 return; | 378 return; |
379 Func->dump("After linear scan regalloc"); | 379 Func->dump("After linear scan regalloc"); |
380 | 380 |
381 // Stack frame mapping. | 381 // Stack frame mapping. |
382 Func->genFrame(); | 382 Func->genFrame(); |
383 if (Func->hasError()) | 383 if (Func->hasError()) |
384 return; | 384 return; |
385 Func->dump("After stack frame mapping"); | 385 Func->dump("After stack frame mapping"); |
(...skipping 4131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4517 } else if (IsConstant || IsExternal) | 4517 } else if (IsConstant || IsExternal) |
4518 Str << "\t.zero\t" << Size << "\n"; | 4518 Str << "\t.zero\t" << Size << "\n"; |
4519 // Size is part of .comm. | 4519 // Size is part of .comm. |
4520 | 4520 |
4521 if (IsConstant || HasInitializer || IsExternal) | 4521 if (IsConstant || HasInitializer || IsExternal) |
4522 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; | 4522 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; |
4523 // Size is part of .comm. | 4523 // Size is part of .comm. |
4524 } | 4524 } |
4525 | 4525 |
4526 } // end of namespace Ice | 4526 } // end of namespace Ice |
OLD | NEW |