[all-commits] [llvm/llvm-project] e9ac14: [AIX][XCOFF] change the operand of branch instruct...

diggerlin via All-commits all-commits at lists.llvm.org
Tue Aug 11 12:26:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e9ac1495e2082ebacfe14df2ffd124a58860449d
      https://github.com/llvm/llvm-project/commit/e9ac1495e2082ebacfe14df2ffd124a58860449d
  Author: diggerlin <digger.llvm at gmail.com>
  Date:   2020-08-11 (Tue, 11 Aug 2020)

  Changed paths:
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/MC/MCSectionXCOFF.h
    M llvm/include/llvm/MC/MCSymbolXCOFF.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCObjectFileInfo.cpp
    M llvm/lib/MC/MCSymbolXCOFF.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/aix-cc-abi.ll
    M llvm/test/CodeGen/PowerPC/aix-cc-byval-mem.ll
    M llvm/test/CodeGen/PowerPC/aix-cc-byval.ll
    M llvm/test/CodeGen/PowerPC/aix-extern-weak.ll
    M llvm/test/CodeGen/PowerPC/aix-external-sym-sdnode-lowering.ll
    M llvm/test/CodeGen/PowerPC/aix-reference-func-addr-const.ll
    M llvm/test/CodeGen/PowerPC/aix-sret-param.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-symbol-rename.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll
    M llvm/test/CodeGen/PowerPC/aix64-cc-byval.ll
    M llvm/test/CodeGen/PowerPC/test_call_aix.ll

  Log Message:
  -----------
  [AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations

SUMMARY:

1. in the patch  , remove setting storageclass in function .getXCOFFSection and construct function of class MCSectionXCOFF
there are

XCOFF::StorageMappingClass MappingClass;
XCOFF::SymbolType Type;
XCOFF::StorageClass StorageClass;
in the MCSectionXCOFF class,
these attribute only used in the XCOFFObjectWriter, (asm path do not need the StorageClass)

we need get the value of StorageClass, Type,MappingClass before we invoke the getXCOFFSection every time.

actually , we can get the StorageClass of the MCSectionXCOFF  from it's delegated symbol.

2. we also change the oprand of branch instruction from symbol name to qualify symbol name.
for example change
bl .foo
extern .foo
to
bl .foo[PR]
extern .foo[PR]

3. and if there is reference indirect call a function bar.
we also add
  extern .bar[PR]

Reviewers:  Jason liu, Xiangling Liao

Differential Revision: https://reviews.llvm.org/D84765




More information about the All-commits mailing list