mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-16 11:05:54 +00:00
strength reduce TOC temp label generation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb22fa6536
commit
374c608fca
@ -60,11 +60,11 @@ namespace {
|
||||
protected:
|
||||
DenseMap<MCSymbol*, MCSymbol*> TOC;
|
||||
const PPCSubtarget &Subtarget;
|
||||
uint64_t LabelID;
|
||||
uint64_t TOCLabelID;
|
||||
public:
|
||||
explicit PPCAsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
|
||||
: AsmPrinter(TM, Streamer),
|
||||
Subtarget(TM.getSubtarget<PPCSubtarget>()), LabelID(0) {}
|
||||
Subtarget(TM.getSubtarget<PPCSubtarget>()), TOCLabelID(0) {}
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "PowerPC Assembly Printer";
|
||||
@ -332,11 +332,8 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
|
||||
// Map symbol -> label of TOC entry.
|
||||
MCSymbol *&TOCEntry = TOC[Mang->getSymbol(MO.getGlobal())];
|
||||
if (TOCEntry == 0) {
|
||||
TOCEntry = OutContext.
|
||||
GetOrCreateSymbol(StringRef(MAI->getPrivateGlobalPrefix()) +
|
||||
"C" + Twine(LabelID++));
|
||||
}
|
||||
if (TOCEntry == 0)
|
||||
TOCEntry = GetTempSymbol("C", TOCLabelID++);
|
||||
|
||||
const MCExpr *Exp =
|
||||
MCSymbolRefExpr::Create(TOCEntry, MCSymbolRefExpr::VK_PPC_TOC,
|
||||
|
Loading…
Reference in New Issue
Block a user