Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===// | 1 //===- subzero/src/IceInst.cpp - High-level instruction 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 /// \file | 10 /// \file |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 572 : InstHighLevel(Func, Inst::FakeKill, 0, nullptr), Linked(Linked) {} | 572 : InstHighLevel(Func, Inst::FakeKill, 0, nullptr), Linked(Linked) {} |
| 573 | 573 |
| 574 namespace { | 574 namespace { |
| 575 GlobalString makeName(Cfg *Func, const SizeT Id) { | 575 GlobalString makeName(Cfg *Func, const SizeT Id) { |
| 576 const auto FuncName = Func->getFunctionName(); | 576 const auto FuncName = Func->getFunctionName(); |
| 577 auto *Ctx = Func->getContext(); | 577 auto *Ctx = Func->getContext(); |
| 578 if (FuncName.hasStdString()) | 578 if (FuncName.hasStdString()) |
| 579 return GlobalString::createWithString( | 579 return GlobalString::createWithString( |
| 580 Ctx, ".L" + FuncName.toString() + "$jumptable$__" + std::to_string(Id)); | 580 Ctx, ".L" + FuncName.toString() + "$jumptable$__" + std::to_string(Id)); |
| 581 return GlobalString::createWithString( | 581 return GlobalString::createWithString( |
| 582 Ctx, ".L" + std::to_string(FuncName.getID()) + "_" + std::to_string(Id)); | 582 Ctx, "_J" + std::to_string(FuncName.getID()) + "_" + std::to_string(Id)); |
|
John
2016/04/08 15:47:46
why not $J? that would pretty much guarantee no cl
Jim Stichnoth
2016/04/09 15:54:09
Done.
| |
| 583 } | 583 } |
| 584 } // end of anonymous namespace | 584 } // end of anonymous namespace |
| 585 | 585 |
| 586 InstJumpTable::InstJumpTable(Cfg *Func, SizeT NumTargets, CfgNode *Default) | 586 InstJumpTable::InstJumpTable(Cfg *Func, SizeT NumTargets, CfgNode *Default) |
| 587 : InstHighLevel(Func, Inst::JumpTable, 1, nullptr), | 587 : InstHighLevel(Func, Inst::JumpTable, 1, nullptr), |
| 588 Id(Func->getTarget()->makeNextJumpTableNumber()), NumTargets(NumTargets), | 588 Id(Func->getTarget()->makeNextJumpTableNumber()), NumTargets(NumTargets), |
| 589 Name(makeName(Func, Id)), FuncName(Func->getFunctionName()) { | 589 Name(makeName(Func, Id)), FuncName(Func->getFunctionName()) { |
| 590 Targets = Func->allocateArrayOf<CfgNode *>(NumTargets); | 590 Targets = Func->allocateArrayOf<CfgNode *>(NumTargets); |
| 591 for (SizeT I = 0; I < NumTargets; ++I) { | 591 for (SizeT I = 0; I < NumTargets; ++I) { |
| 592 Targets[I] = Default; | 592 Targets[I] = Default; |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1056 // upper 32 bits of rax. We need to recognize and preserve these. | 1056 // upper 32 bits of rax. We need to recognize and preserve these. |
| 1057 return true; | 1057 return true; |
| 1058 } | 1058 } |
| 1059 if (!Dest->hasReg() && !SrcVar->hasReg() && | 1059 if (!Dest->hasReg() && !SrcVar->hasReg() && |
| 1060 Dest->getStackOffset() == SrcVar->getStackOffset()) | 1060 Dest->getStackOffset() == SrcVar->getStackOffset()) |
| 1061 return true; | 1061 return true; |
| 1062 return false; | 1062 return false; |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 } // end of namespace Ice | 1065 } // end of namespace Ice |
| OLD | NEW |