[PATCH] D69633: [XCOFF][AIX] Differentiate usage of label symbol and csect symbol

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 12:38:24 PDT 2019


jasonliu created this revision.
jasonliu added reviewers: xingxue, DiggerLin, sfertile, daltenty, hubert.reinterpretcast.
Herald added subscribers: llvm-commits, jsji, kbarton, hiraditya, mgorny, nemanjai.
Herald added a project: LLVM.

We are using symbols to represent label and csect interchangeably before, and that could be a problem. 
There are cases we would need to add storage mapping class to the symbol if that symbol is actually the name of a csect, but it's hard for us to figure out whether that symbol is a label or csect.

This patch intend to do the following:

1. Construct a QualName (A name include the storage mapping class) MCSymbolXCOFF for every MCSectionXCOFF.
2. Keep a pointer to that QualName inside of MCSectionXCOFF.
3. Use that QualName whenever we need a symbol refers to that MCSectionXCOFF.
4. Adapt the snowball effect from the above changes in XCOFFObjectWriter.cpp.


https://reviews.llvm.org/D69633

Files:
  llvm/include/llvm/BinaryFormat/XCOFF.h
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/include/llvm/MC/MCAsmInfoXCOFF.h
  llvm/include/llvm/MC/MCSectionXCOFF.h
  llvm/include/llvm/MC/MCStreamer.h
  llvm/include/llvm/MC/MCXCOFFStreamer.h
  llvm/lib/BinaryFormat/CMakeLists.txt
  llvm/lib/BinaryFormat/XCOFF.cpp
  llvm/lib/MC/MCAsmInfo.cpp
  llvm/lib/MC/MCAsmInfoXCOFF.cpp
  llvm/lib/MC/MCAsmStreamer.cpp
  llvm/lib/MC/MCContext.cpp
  llvm/lib/MC/MCSectionXCOFF.cpp
  llvm/lib/MC/MCStreamer.cpp
  llvm/lib/MC/MCXCOFFStreamer.cpp
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69633.227160.patch
Type: text/x-patch
Size: 22022 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191030/3776ab4f/attachment.bin>


More information about the llvm-commits mailing list