[PATCH] D79864: [PowerPC] Add new linker optimization for PowerPC
Victor Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 16:00:16 PDT 2020
NeHuang added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCMCInstLower.cpp:106
+ if (Subtarget->isUsingPCRelativeCalls() &&
+ MO.getTargetFlags() == PPCII::MO_PCREL_OPT_FLAG)
+ RefKind = MCSymbolRefExpr::VK_PPC_LINKER_OPT;
----------------
We can merge it with the check above (97-103) since it also checks for `isUsingPCRelativeCalls()`
================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:415
+ MI.setDesc(TII->get(PPC::PLDpcnocopy));
+ static uint64_t UseCounter=0;
+ UseCounter++;
----------------
nit: `static uint64_t UseCounter = 0;`
================
Comment at: llvm/test/CodeGen/PowerPC/pcrel-linkeropt.ll:6
+
+
+ at input8 = external local_unnamed_addr global i8, align 1
----------------
Do we need to add a test description here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79864/new/
https://reviews.llvm.org/D79864
More information about the llvm-commits
mailing list