mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-09 05:13:01 +00:00
strength reduce TOC temp label generation, no functionality change.
llvm-svn: 119112
This commit is contained in:
parent
38e49f3f11
commit
5f571f5a13
@ -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