[PATCH] D80166: [CGCall] Annotate reference parameters with "align" attribute.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 18 15:45:17 PDT 2020


efriedma created this revision.
efriedma added reviewers: rjmccall, rsmith, nikic.
Herald added subscribers: kerbowa, aheejin, sbc100, nhaehnle, jvesely.
Herald added a reviewer: jdoerfert.
Herald added a project: clang.

If we're going to assume references are dereferenceable, we should also assume they're aligned: otherwise, we can't actually dereference them.

See also D80072 <https://reviews.llvm.org/D80072>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80166

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/test/CXX/except/except.spec/p14-ir.cpp
  clang/test/CodeGen/align_value.cpp
  clang/test/CodeGen/pch-dllexport.cpp
  clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu
  clang/test/CodeGenCXX/address-space-ref.cpp
  clang/test/CodeGenCXX/amdgcn-func-arg.cpp
  clang/test/CodeGenCXX/atomic-dllexport.cpp
  clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp
  clang/test/CodeGenCXX/blocks-cxx11.cpp
  clang/test/CodeGenCXX/blocks.cpp
  clang/test/CodeGenCXX/call-with-static-chain.cpp
  clang/test/CodeGenCXX/catch-undef-behavior.cpp
  clang/test/CodeGenCXX/conditional-gnu-ext.cpp
  clang/test/CodeGenCXX/const-init-cxx11.cpp
  clang/test/CodeGenCXX/constructor-direct-call.cpp
  clang/test/CodeGenCXX/constructor-init.cpp
  clang/test/CodeGenCXX/convert-to-fptr.cpp
  clang/test/CodeGenCXX/copy-assign-synthesis-1.cpp
  clang/test/CodeGenCXX/copy-constructor-elim-2.cpp
  clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
  clang/test/CodeGenCXX/copy-constructor-synthesis.cpp
  clang/test/CodeGenCXX/cxx11-initializer-aggregate.cpp
  clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp
  clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp
  clang/test/CodeGenCXX/decl-ref-init.cpp
  clang/test/CodeGenCXX/default-arg-temps.cpp
  clang/test/CodeGenCXX/dereferenceable.cpp
  clang/test/CodeGenCXX/derived-to-base-conv.cpp
  clang/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp
  clang/test/CodeGenCXX/dllexport-members.cpp
  clang/test/CodeGenCXX/dllexport.cpp
  clang/test/CodeGenCXX/dllimport-members.cpp
  clang/test/CodeGenCXX/dllimport.cpp
  clang/test/CodeGenCXX/eh.cpp
  clang/test/CodeGenCXX/empty-nontrivially-copyable.cpp
  clang/test/CodeGenCXX/exceptions.cpp
  clang/test/CodeGenCXX/ext-int.cpp
  clang/test/CodeGenCXX/fastcall.cpp
  clang/test/CodeGenCXX/goto.cpp
  clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp
  clang/test/CodeGenCXX/implicit-copy-constructor.cpp
  clang/test/CodeGenCXX/implicit-function-conversion.cpp
  clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp
  clang/test/CodeGenCXX/mangle-lambdas.cpp
  clang/test/CodeGenCXX/mangle-win-ccs.cpp
  clang/test/CodeGenCXX/mangle.cpp
  clang/test/CodeGenCXX/matrix-type.cpp
  clang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
  clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
  clang/test/CodeGenCXX/nrvo.cpp
  clang/test/CodeGenCXX/pod-member-memcpys.cpp
  clang/test/CodeGenCXX/pointers-to-data-members.cpp
  clang/test/CodeGenCXX/pr28360.cpp
  clang/test/CodeGenCXX/reference-cast.cpp
  clang/test/CodeGenCXX/regcall.cpp
  clang/test/CodeGenCXX/rvalue-references.cpp
  clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
  clang/test/CodeGenCXX/static-init.cpp
  clang/test/CodeGenCXX/stmtexpr.cpp
  clang/test/CodeGenCXX/temporaries.cpp
  clang/test/CodeGenCXX/throw-expressions.cpp
  clang/test/CodeGenCXX/thunks.cpp
  clang/test/CodeGenCXX/trivial_abi.cpp
  clang/test/CodeGenCXX/volatile.cpp
  clang/test/CodeGenCXX/wasm-args-returns.cpp
  clang/test/CodeGenCoroutines/coro-alloc.cpp
  clang/test/CodeGenCoroutines/coro-await.cpp
  clang/test/CodeGenCoroutines/coro-params.cpp
  clang/test/CodeGenObjC/return-objc-object.mm
  clang/test/CodeGenObjCXX/arc-blocks.mm
  clang/test/CodeGenObjCXX/arc-move.mm
  clang/test/CodeGenObjCXX/arc-special-member-functions.mm
  clang/test/CodeGenObjCXX/implicit-copy-assign-operator.mm
  clang/test/CodeGenObjCXX/implicit-copy-constructor.mm
  clang/test/CodeGenObjCXX/lambda-expressions.mm
  clang/test/CodeGenObjCXX/lvalue-reference-getter.mm
  clang/test/CodeGenObjCXX/message-reference.mm
  clang/test/CodeGenObjCXX/objc-struct-cxx-abi.mm
  clang/test/CodeGenObjCXX/objc-weak.mm
  clang/test/CodeGenObjCXX/property-dot-reference.mm
  clang/test/CodeGenObjCXX/property-lvalue-capture.mm
  clang/test/CodeGenObjCXX/property-object-reference-2.mm
  clang/test/CodeGenObjCXX/property-objects.mm
  clang/test/CodeGenObjCXX/property-reference.mm
  clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
  clang/test/CodeGenOpenCLCXX/addrspace-references.cl
  clang/test/Modules/templates.mm
  clang/test/OpenMP/atomic_codegen.cpp
  clang/test/OpenMP/declare_reduction_codegen.cpp
  clang/test/OpenMP/declare_target_codegen.cpp
  clang/test/OpenMP/declare_target_codegen_globalization.cpp
  clang/test/OpenMP/declare_target_link_codegen.cpp
  clang/test/OpenMP/distribute_codegen.cpp
  clang/test/OpenMP/distribute_simd_codegen.cpp
  clang/test/OpenMP/for_firstprivate_codegen.cpp
  clang/test/OpenMP/for_lastprivate_codegen.cpp
  clang/test/OpenMP/for_linear_codegen.cpp
  clang/test/OpenMP/for_reduction_codegen.cpp
  clang/test/OpenMP/for_reduction_codegen_UDR.cpp
  clang/test/OpenMP/nvptx_data_sharing.cpp
  clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
  clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
  clang/test/OpenMP/nvptx_lambda_capturing.cpp
  clang/test/OpenMP/nvptx_parallel_codegen.cpp
  clang/test/OpenMP/nvptx_target_codegen.cpp
  clang/test/OpenMP/nvptx_target_teams_codegen.cpp
  clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
  clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp
  clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp
  clang/test/OpenMP/openmp_offload_codegen.cpp
  clang/test/OpenMP/ordered_codegen.cpp
  clang/test/OpenMP/parallel_codegen.cpp
  clang/test/OpenMP/parallel_copyin_codegen.cpp
  clang/test/OpenMP/parallel_firstprivate_codegen.cpp
  clang/test/OpenMP/parallel_for_codegen.cpp
  clang/test/OpenMP/parallel_for_linear_codegen.cpp
  clang/test/OpenMP/parallel_master_codegen.cpp
  clang/test/OpenMP/parallel_master_taskloop_codegen.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_codegen.cpp
  clang/test/OpenMP/parallel_reduction_codegen.cpp
  clang/test/OpenMP/sections_firstprivate_codegen.cpp
  clang/test/OpenMP/sections_lastprivate_codegen.cpp
  clang/test/OpenMP/sections_reduction_codegen.cpp
  clang/test/OpenMP/single_firstprivate_codegen.cpp
  clang/test/OpenMP/target_codegen_global_capture.cpp
  clang/test/OpenMP/target_firstprivate_codegen.cpp
  clang/test/OpenMP/target_parallel_debug_codegen.cpp
  clang/test/OpenMP/target_parallel_for_debug_codegen.cpp
  clang/test/OpenMP/target_teams_codegen.cpp
  clang/test/OpenMP/teams_firstprivate_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80166.264732.patch
Type: text/x-patch
Size: 332077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200518/ce26c019/attachment-0001.bin>


More information about the cfe-commits mailing list