[all-commits] [llvm/llvm-project] 22337b: [AIX][Frontend] Static init implementation for AIX...

xiangling-liao via All-commits all-commits at lists.llvm.org
Fri Jun 19 05:28:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 22337bfe7d87f9bf2b072ec7fe9165f7b9e2d793
      https://github.com/llvm/llvm-project/commit/22337bfe7d87f9bf2b072ec7fe9165f7b9e2d793
  Author: Xiangling Liao <Xiangling.Liao at ibm.com>
  Date:   2020-06-19 (Fri, 19 Jun 2020)

  Changed paths:
    M clang/include/clang/AST/Mangle.h
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/CodeGen/CGCXXABI.h
    M clang/lib/CodeGen/CGDeclCXX.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    A clang/test/CodeGen/aix-constructor-attribute.cpp
    A clang/test/CodeGen/aix-destructor-attribute.cpp
    A clang/test/CodeGen/aix-init-priority-attribute.cpp
    R clang/test/CodeGen/static-init.cpp
    A clang/test/CodeGenCXX/aix-static-init.cpp

  Log Message:
  -----------
  [AIX][Frontend] Static init implementation for AIX considering no priority

1. Provides no piroirity supoort && disables three priority related
   attributes: init_priority, ctor attr, dtor attr;
2. '-qunique' in XL compiler equivalent behavior of emitting sinit
    and sterm functions name using getUniqueModuleId() util function
    in LLVM (currently no support for InternalLinkage and WeakODRLinkage
    symbols);
3. Add testcases to emit IR sample with __sinit80000000, __dtor, and
    __sterm80000000;
4. Temporarily side-steps the need to implement the functionality of
   llvm.global_ctors and llvm.global_dtors arrays. The uses of that
   functionality in this patch (with respect to the name of the functions
   involved) are not representative of how the functionality will be used
   once implemented.

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


  Commit: 3f2e61c1fe42e5b790096d6962f6bc2de6ee00ce
      https://github.com/llvm/llvm-project/commit/3f2e61c1fe42e5b790096d6962f6bc2de6ee00ce
  Author: Xiangling Liao <Xiangling.Liao at ibm.com>
  Date:   2020-06-19 (Fri, 19 Jun 2020)

  Changed paths:
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/CodeGenCXX/aix-static-init.cpp
    M clang/test/Driver/cxa-atexit.cpp

  Log Message:
  -----------
  [AIX] Default AIX to using -fno-use-cxa-atexit

On AIX, we use __atexit to register dtor functions rather than __cxa_atexit.
So a driver change is needed to default AIX to using -fno-use-cxa-atexit.

Windows platform does not uses __cxa_atexit either. Following its precedent,
we remove the assertion for when -fuse-cxa-atexit is specified by the user,
do not produce a message and silently default to -fno-use-cxa-atexit behavior.

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


Compare: https://github.com/llvm/llvm-project/compare/c3b4486a57f6...3f2e61c1fe42


More information about the All-commits mailing list