[all-commits] [llvm/llvm-project] d9a685: [CodeGen][arm64e] Add methods and data members to ...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Wed Mar 27 12:25:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9a685a9dd589486e882b722e513ee7b8c84870c
      https://github.com/llvm/llvm-project/commit/d9a685a9dd589486e882b722e513ee7b8c84870c
  Author: Akira Hatanaka <ahatanak at gmail.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M clang/lib/CodeGen/ABIInfoImpl.cpp
    M clang/lib/CodeGen/Address.h
    M clang/lib/CodeGen/CGAtomic.cpp
    M clang/lib/CodeGen/CGBlocks.cpp
    M clang/lib/CodeGen/CGBlocks.h
    M clang/lib/CodeGen/CGBuilder.h
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/CGCUDANV.cpp
    M clang/lib/CodeGen/CGCXXABI.cpp
    M clang/lib/CodeGen/CGCXXABI.h
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGCall.h
    M clang/lib/CodeGen/CGClass.cpp
    M clang/lib/CodeGen/CGCleanup.cpp
    M clang/lib/CodeGen/CGCleanup.h
    M clang/lib/CodeGen/CGCoroutine.cpp
    M clang/lib/CodeGen/CGDecl.cpp
    M clang/lib/CodeGen/CGException.cpp
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CGExprAgg.cpp
    M clang/lib/CodeGen/CGExprCXX.cpp
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/CodeGen/CGNonTrivialStruct.cpp
    M clang/lib/CodeGen/CGObjC.cpp
    M clang/lib/CodeGen/CGObjCGNU.cpp
    M clang/lib/CodeGen/CGObjCMac.cpp
    M clang/lib/CodeGen/CGObjCRuntime.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.h
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/lib/CodeGen/CGVTables.cpp
    M clang/lib/CodeGen/CGValue.h
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/lib/CodeGen/CodeGenPGO.h
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp
    M clang/lib/CodeGen/TargetInfo.h
    M clang/lib/CodeGen/Targets/NVPTX.cpp
    M clang/lib/CodeGen/Targets/PPC.cpp
    M clang/lib/CodeGen/Targets/Sparc.cpp
    M clang/lib/CodeGen/Targets/SystemZ.cpp
    M clang/lib/CodeGen/Targets/XCore.cpp
    M clang/utils/TableGen/MveEmitter.cpp
    M llvm/include/llvm/IR/IRBuilder.h

  Log Message:
  -----------
  [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers  (#86721)

To authenticate pointers, CodeGen needs access to the key and
discriminators that were used to sign the pointer. That information is
sometimes known from the context, but not always, which is why `Address`
needs to hold that information.

This patch adds methods and data members to `Address`, which will be
needed in subsequent patches to authenticate signed pointers, and uses
the newly added methods throughout CodeGen. Although this patch isn't
strictly NFC as it causes CodeGen to use different code paths in some
cases (e.g., `mergeAddressesInConditionalExpr`), it doesn't cause any
changes in functionality as it doesn't add any information needed for
authentication.

In addition to the changes mentioned above, this patch introduces class
`RawAddress`, which contains a pointer that we know is unsigned, and
adds several new functions for creating `Address` and `LValue` objects.

This reapplies 8bd1f9116aab879183f34707e6d21c7051d083b6. The commit
broke msan bots because LValue::IsKnownNonNull was uninitialized.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list