[llvm] r369563 - [mips] Replace call `expandLoadAddress` by `loadAndAddSymbolAddress`. NFC
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 11:54:51 PDT 2019
Author: atanasyan
Date: Wed Aug 21 11:54:51 2019
New Revision: 369563
URL: http://llvm.org/viewvc/llvm-project?rev=369563&view=rev
Log:
[mips] Replace call `expandLoadAddress` by `loadAndAddSymbolAddress`. NFC
In case of expanding `lw/sw $reg, symbol($reg)` instruction for PIC it's
enough to call the `loadAndAddSymbolAddress` method. Additional work
performed by the `expandLoadAddress` is not required here.
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=369563&r1=369562&r2=369563&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Aug 21 11:54:51 2019
@@ -3659,8 +3659,8 @@ void MipsAsmParser::expandMemInst(MCInst
// d) Use R_MIPS_GOT_PAGE/R_MIPS_GOT_OFST relocations instead
// of R_MIPS_GOT_DISP in appropriate cases to reduce number
// of GOT entries.
- expandLoadAddress(TmpReg, Mips::NoRegister, OffsetOp, !ABI.ArePtrs64bit(),
- IDLoc, Out, STI);
+ loadAndAddSymbolAddress(OffsetOp.getExpr(), TmpReg, Mips::NoRegister,
+ !ABI.ArePtrs64bit(), IDLoc, Out, STI);
TOut.emitRRI(Inst.getOpcode(), DstReg, TmpReg, 0, IDLoc, STI);
} else {
const MCExpr *ExprOffset = OffsetOp.getExpr();
More information about the llvm-commits
mailing list