Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1860473002: Subzero. Refactors Switch Lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes pre-review issues. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceGlobalContext.h ('K') | « src/IceSwitchLowering.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index 7394ab1b7f08362426f0aa6504801798fbece001..77369031f6732db1c06daef185b190e5c7c88b2f 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -5884,10 +5884,8 @@ void TargetX86Base<TraitsType>::lowerCaseCluster(const CaseCluster &Case,
}
constexpr RelocOffsetT RelocOffset = 0;
- GlobalString FunctionName = Func->getFunctionName();
constexpr Variable *NoBase = nullptr;
- auto JTName = GlobalString::createWithString(
- Ctx, InstJumpTable::makeName(FunctionName, JumpTable->getId()));
+ auto JTName = GlobalString::createWithString(Ctx, JumpTable->getName());
Constant *Offset = Ctx->getConstantSym(RelocOffset, JTName);
uint16_t Shift = typeWidthInBytesLog2(PointerType);
constexpr auto Segment = X86OperandMem::SegmentRegisters::DefaultSegment;
@@ -7290,7 +7288,7 @@ void TargetX86Base<TraitsType>::emitJumpTable(
Str << "\t.section\t" << Prefix << FunctionName
<< "$jumptable,\"a\",@progbits\n";
Str << "\t.align\t" << typeWidthInBytes(getPointerType()) << "\n";
- Str << InstJumpTable::makeName(FunctionName, JumpTable->getId()) << ":";
+ Str << JumpTable->getName() << ":";
// On X86 ILP32 pointers are 32-bit hence the use of .long
for (SizeT I = 0; I < JumpTable->getNumTargets(); ++I)
@@ -7392,10 +7390,10 @@ void TargetDataX86<TraitsType>::lowerJumpTables() {
Ostream &Str = Ctx->getStrEmit();
const char *Prefix = IsPIC ? ".data.rel.ro." : ".rodata.";
for (const JumpTableData &JT : Ctx->getJumpTables()) {
- Str << "\t.section\t" << Prefix << JT.getFunctionName()
- << "$jumptable,\"a\",@progbits\n";
+ Str << "\t.section\t" << Prefix << JT.getSectionName()
+ << ",\"a\",@progbits\n";
Str << "\t.align\t" << typeWidthInBytes(getPointerType()) << "\n";
- Str << InstJumpTable::makeName(JT.getFunctionName(), JT.getId()) << ":";
+ Str << JT.getName().toString() << ":";
// On X8664 ILP32 pointers are 32-bit hence the use of .long
for (intptr_t TargetOffset : JT.getTargetOffsets())
« src/IceGlobalContext.h ('K') | « src/IceSwitchLowering.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698