[PATCH] D84765: [AIX][XCOFF] [AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 09:26:52 PDT 2020
DiggerLin marked 12 inline comments as done.
DiggerLin added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1906
OutStreamer->emitSymbolAttribute(Sym, MCSA_Extern);
- return Ret;
+ return PPCAsmPrinter::doFinalization(M);
}
----------------
jasonliu wrote:
> There seems to be a switch of execution order here, any reason for that?
for the object path, the function executePostLayoutBinding() and writeObject() was called in doFinalization() indirectly, we need to run
``` for (MCSymbol *Sym : ExtSymSDNodeSymbols)
OutStreamer->emitSymbolAttribute(Sym, MCSA_Extern);
```
to set the symbol atttribute before PPCAsmPrinter::doFinalization.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5172
+ // C-linkage name and storage mapping classs[PR].
+ const auto getFunctionEntryPointQualNameSymbol = [&](StringRef SymName) {
auto &Context = DAG.getMachineFunction().getMMI().getContext();
----------------
jasonliu wrote:
> I don't think it's necessary to change the name, as the sister function in TLOF have the same name but still return qualname when needed.
MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol() return .foo not .foo[PR] .
in order to not to confuse ,I use the name getFunctionEntryPointQualNameSymbol() to get .foo[PR]
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5176
+ MCSectionXCOFF *Sec =
+ Context.getXCOFFSection(SymQualName.str(), XCOFF::XMC_PR,
+ XCOFF::XTY_ER, SectionKind::getMetadata());
----------------
jasonliu wrote:
> Dont use twine in local. You could do
> ```
> Context.getXCOFFSection(("." + Twine(SymName)).str(), ....
> ```
agree. changed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84765/new/
https://reviews.llvm.org/D84765
More information about the llvm-commits
mailing list