[PATCH] D72347: [NFC][XCOFF] Refactor Csect creation into TargetLoweringObjectFile

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 09:05:19 PST 2020


daltenty marked 2 inline comments as done.
daltenty added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:247
+
+  MCSection *getSectionForFunctionDescriptor(const MCSymbol *) const override;
+  MCSection *getSectionForTOCEntry(const MCSymbol *Sym) const override;
----------------
hubert.reinterpretcast wrote:
> I am not sure there is anything about this interface that indicates that it is not suitable for retrieving the section for a function descriptor in the case where said section should be an external reference. In `lowerConstant`, the argument value needed to call this function is available even in the case where the function is undefined.
I will add a comment indicating this interface is for use only with defined functions.


================
Comment at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:250
+  MCSection *
+  getSectionForExternalReference(const GlobalObject *GO,
+                                 const TargetMachine &TM) const override;
----------------
hubert.reinterpretcast wrote:
> I am not sure there is anything about this interface that indicates that it is not suitable for retrieving the section for an external reference to a function entry point. Where `getAIXFuncEntryPointSymbolSDNode` is present in the codebase, the function is also handled as a `GlobalObject`.
Indeed, that is not a limitation of this interface, this is the case in PPCISelLowering mentioned in the patch description. It was my intention to handle that as a separate patch since it will require some further refactoring as it appears the TLOF is not available there. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72347/new/

https://reviews.llvm.org/D72347





More information about the llvm-commits mailing list