[all-commits] [llvm/llvm-project] 304f1d: [IR] Switch everything to use memory attribute
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Nov 4 02:22:43 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 304f1d59ca41872c094def3aee0a8689df6aa398
https://github.com/llvm/llvm-project/commit/304f1d59ca41872c094def3aee0a8689df6aa398
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-11-04 (Fri, 04 Nov 2022)
Changed paths:
M clang/lib/CodeGen/CGCall.cpp
M clang/lib/CodeGen/CGObjCMac.cpp
M clang/lib/CodeGen/ItaniumCXXABI.cpp
M clang/test/CodeGen/asm-attrs.c
M clang/test/CodeGen/builtin-sqrt.c
M clang/test/CodeGen/complex-builtins.c
M clang/test/CodeGen/complex-libcalls.c
M clang/test/CodeGen/function-attributes.c
M clang/test/CodeGen/libcall-declarations.c
M clang/test/CodeGen/libcalls.c
M clang/test/CodeGen/math-builtins.c
M clang/test/CodeGen/math-libcalls.c
M clang/test/CodeGen/ms-declspecs.c
M clang/test/CodeGen/pragma-weak.c
M clang/test/CodeGen/struct-passing.c
M clang/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
M clang/test/CodeGenCXX/dynamic-cast.cpp
M clang/test/CodeGenCXX/threadlocal_address.cpp
M clang/test/CodeGenObjC/class-stubs.m
M clang/test/CodeGenOpenCL/builtins-amdgcn.cl
M clang/test/CodeGenOpenCL/fdeclare-opencl-builtins.cl
M clang/test/OpenMP/barrier_codegen.cpp
M clang/test/OpenMP/irbuilder_simd_aligned.cpp
M clang/test/Sema/libbuiltins-ctype-powerpc64.c
M clang/test/Sema/libbuiltins-ctype-x86_64.c
M llvm/docs/LangRef.rst
M llvm/docs/ReleaseNotes.rst
M llvm/include/llvm/AsmParser/LLToken.h
M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
M llvm/include/llvm/IR/Attributes.td
M llvm/include/llvm/IR/Function.h
M llvm/include/llvm/IR/InstrTypes.h
M llvm/lib/Analysis/BasicAliasAnalysis.cpp
M llvm/lib/AsmParser/LLLexer.cpp
M llvm/lib/AsmParser/LLParser.cpp
M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
M llvm/lib/CodeGen/MachineVerifier.cpp
M llvm/lib/IR/Function.cpp
M llvm/lib/IR/Instructions.cpp
M llvm/lib/IR/Verifier.cpp
M llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/Mips/Mips16HardFloat.cpp
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
M llvm/lib/Transforms/IPO/FunctionAttrs.cpp
M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
M llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
M llvm/lib/Transforms/Scalar/SCCP.cpp
M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
M llvm/lib/Transforms/Utils/CodeExtractor.cpp
M llvm/test/Analysis/BasicAA/cs-cs.ll
M llvm/test/Analysis/BasicAA/intrinsics-arm.ll
M llvm/test/Analysis/BasicAA/intrinsics.ll
M llvm/test/Analysis/BasicAA/pure-const-dce.ll
M llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
M llvm/test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll
M llvm/test/Assembler/aarch64-intrinsics-attributes.ll
M llvm/test/Assembler/masked-load-store-intrinsics-attributes.ll
M llvm/test/Bindings/llvm-c/debug_info.ll
M llvm/test/Bitcode/attributes-3.3.ll
M llvm/test/Bitcode/attributes.ll
M llvm/test/Bitcode/compatibility-3.6.ll
M llvm/test/Bitcode/compatibility-3.7.ll
M llvm/test/Bitcode/compatibility-3.8.ll
M llvm/test/Bitcode/compatibility-3.9.ll
M llvm/test/Bitcode/compatibility-4.0.ll
M llvm/test/Bitcode/compatibility-5.0.ll
M llvm/test/Bitcode/compatibility-6.0.ll
M llvm/test/Bitcode/compatibility.ll
M llvm/test/Bitcode/ptest-new.ll
M llvm/test/Bitcode/ptest-old.ll
M llvm/test/Bitcode/upgrade-frame-pointer.ll
M llvm/test/Bitcode/upgrade-invariant-group-barrier.ll
M llvm/test/CodeGen/AMDGPU/addrspacecast-constantexpr.ll
M llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
M llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
M llvm/test/CodeGen/AMDGPU/annotate-kernel-features.ll
M llvm/test/CodeGen/AMDGPU/inline-attr.ll
M llvm/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll
M llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
M llvm/test/CodeGen/AMDGPU/uniform-work-group-recursion-test.ll
M llvm/test/Feature/OperandBundles/function-attrs.ll
M llvm/test/Feature/intrinsics.ll
M llvm/test/Instrumentation/DataFlowSanitizer/basic.ll
M llvm/test/Instrumentation/MemorySanitizer/attributes.ll
M llvm/test/Other/attribute-comment.ll
M llvm/test/Other/cgscc-devirt-iteration.ll
M llvm/test/Other/cgscc-iterate-function-mutation.ll
M llvm/test/Other/invariant.group.ll
M llvm/test/Other/opt-override-mcpu-mattr.ll
M llvm/test/Other/print-module-scope.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-07-CGUpdate.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/invalidation.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll
M llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
M llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
M llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll
M llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll
M llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll
M llvm/test/Transforms/Attributor/IPConstantProp/comdat-ipo.ll
M llvm/test/Transforms/Attributor/IPConstantProp/dangling-block-address.ll
M llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll
M llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll
M llvm/test/Transforms/Attributor/IPConstantProp/global.ll
M llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll
M llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
M llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll
M llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll
M llvm/test/Transforms/Attributor/IPConstantProp/remove-call-inst.ll
M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
M llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
M llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
M llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll
M llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
M llvm/test/Transforms/Attributor/align.ll
M llvm/test/Transforms/Attributor/allow_list.ll
M llvm/test/Transforms/Attributor/alwaysinline.ll
M llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll
M llvm/test/Transforms/Attributor/cb_liveness_disabled.ll
M llvm/test/Transforms/Attributor/cb_liveness_enabled.ll
M llvm/test/Transforms/Attributor/cb_range_disabled.ll
M llvm/test/Transforms/Attributor/cb_range_enabled.ll
M llvm/test/Transforms/Attributor/depgraph.ll
M llvm/test/Transforms/Attributor/dereferenceable-1.ll
M llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
M llvm/test/Transforms/Attributor/dereferenceable-2.ll
M llvm/test/Transforms/Attributor/heap_to_stack.ll
M llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll
M llvm/test/Transforms/Attributor/internal-noalias.ll
M llvm/test/Transforms/Attributor/internalize.ll
M llvm/test/Transforms/Attributor/liveness.ll
M llvm/test/Transforms/Attributor/liveness_chains.ll
M llvm/test/Transforms/Attributor/lowerheap.ll
M llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
M llvm/test/Transforms/Attributor/lvi-for-ashr.ll
M llvm/test/Transforms/Attributor/memory_locations.ll
M llvm/test/Transforms/Attributor/misc.ll
M llvm/test/Transforms/Attributor/misc_crash.ll
M llvm/test/Transforms/Attributor/noalias.ll
M llvm/test/Transforms/Attributor/nocapture-1.ll
M llvm/test/Transforms/Attributor/nocapture-2.ll
M llvm/test/Transforms/Attributor/nodelete.ll
M llvm/test/Transforms/Attributor/nofree.ll
M llvm/test/Transforms/Attributor/nonnull.ll
M llvm/test/Transforms/Attributor/norecurse.ll
M llvm/test/Transforms/Attributor/noreturn.ll
M llvm/test/Transforms/Attributor/noreturn_async.ll
M llvm/test/Transforms/Attributor/noreturn_sync.ll
M llvm/test/Transforms/Attributor/nosync.ll
M llvm/test/Transforms/Attributor/nounwind.ll
M llvm/test/Transforms/Attributor/openmp_parallel.ll
M llvm/test/Transforms/Attributor/pointer-info.ll
M llvm/test/Transforms/Attributor/potential.ll
M llvm/test/Transforms/Attributor/range.ll
M llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
M llvm/test/Transforms/Attributor/readattrs.ll
M llvm/test/Transforms/Attributor/returned.ll
M llvm/test/Transforms/Attributor/undefined_behavior.ll
M llvm/test/Transforms/Attributor/value-simplify-assume.ll
M llvm/test/Transforms/Attributor/value-simplify-dbg.ll
M llvm/test/Transforms/Attributor/value-simplify-gpu.ll
M llvm/test/Transforms/Attributor/value-simplify-instances.ll
M llvm/test/Transforms/Attributor/value-simplify-local-remote.ll
M llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
M llvm/test/Transforms/Attributor/value-simplify.ll
M llvm/test/Transforms/Attributor/willreturn.ll
M llvm/test/Transforms/Attributor/wrapper.ll
M llvm/test/Transforms/Coroutines/coro-readnone-02.ll
M llvm/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
M llvm/test/Transforms/FunctionAttrs/2008-09-03-Mutual.ll
M llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
M llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll
M llvm/test/Transforms/FunctionAttrs/2008-12-29-Constant.ll
M llvm/test/Transforms/FunctionAttrs/argmemonly.ll
M llvm/test/Transforms/FunctionAttrs/atomic.ll
M llvm/test/Transforms/FunctionAttrs/convergent.ll
M llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
M llvm/test/Transforms/FunctionAttrs/int_sideeffect.ll
M llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
M llvm/test/Transforms/FunctionAttrs/nofree.ll
M llvm/test/Transforms/FunctionAttrs/norecurse.ll
M llvm/test/Transforms/FunctionAttrs/nosync.ll
M llvm/test/Transforms/FunctionAttrs/nounwind.ll
M llvm/test/Transforms/FunctionAttrs/optnone.ll
M llvm/test/Transforms/FunctionAttrs/readattrs.ll
M llvm/test/Transforms/FunctionAttrs/stats.ll
M llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
M llvm/test/Transforms/FunctionAttrs/willreturn.ll
M llvm/test/Transforms/FunctionAttrs/writeonly.ll
M llvm/test/Transforms/GlobalOpt/ctor-memset.ll
M llvm/test/Transforms/GlobalOpt/pr54572.ll
M llvm/test/Transforms/InferFunctionAttrs/annotate.ll
M llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
M llvm/test/Transforms/InferFunctionAttrs/readonly_and_writeonly.ll
M llvm/test/Transforms/Inline/cgscc-update.ll
M llvm/test/Transforms/Inline/inline_invoke.ll
M llvm/test/Transforms/InstCombine/AArch64/2012-04-23-Neon-Intrinsics.ll
M llvm/test/Transforms/InstCombine/stpncpy-1.ll
M llvm/test/Transforms/LICM/scalar-promote.ll
M llvm/test/Transforms/LICM/strlen.ll
M llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-double.ll
M llvm/test/Transforms/ObjCARC/basic.ll
M llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
M llvm/test/Transforms/ObjCARC/nested.ll
M llvm/test/Transforms/ObjCARC/rle-s2l.ll
M llvm/test/Transforms/OpenMP/add_attributes.ll
M llvm/test/Transforms/OpenMP/parallel_deletion.ll
M llvm/test/Transforms/OpenMP/remove_globalization.ll
M llvm/test/Transforms/OpenMP/replace_globalization.ll
M llvm/test/Transforms/OpenMP/spmdization.ll
M llvm/test/Transforms/OpenMP/spmdization_assumes.ll
M llvm/test/Transforms/OpenMP/spmdization_guarding.ll
M llvm/test/Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll
M llvm/test/Transforms/RewriteStatepointsForGC/X86/intrinsic-attributes.ll
M llvm/test/Transforms/RewriteStatepointsForGC/statepoint-attrs.ll
M llvm/test/Transforms/SCCP/ipscp-drop-argmemonly.ll
M llvm/test/Transforms/SCCP/remove-call-inst.ll
M llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll
M llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad-debuginfo.ll
M llvm/test/Transforms/SimplifyCFG/X86/merge-compatible-invokes-of-landingpad.ll
M llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll
M llvm/test/Verifier/fp-intrinsics.ll
R llvm/test/Verifier/writeonly.ll
M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/check_attrs.ll.funcattrs.expected
M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected
M llvm/test/tools/llvm-reduce/remove-attributes-from-intrinsics.ll
M llvm/unittests/IR/InstructionsTest.cpp
M llvm/utils/TableGen/IntrinsicEmitter.cpp
M llvm/utils/UpdateTestChecks/common.py
M mlir/test/Target/LLVMIR/llvmir.mlir
Log Message:
-----------
[IR] Switch everything to use memory attribute
This switches everything to use the memory attribute proposed in
https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579.
The old argmemonly, inaccessiblememonly and inaccessiblemem_or_argmemonly
attributes are dropped. The readnone, readonly and writeonly attributes
are restricted to parameters only.
The old attributes are auto-upgraded both in bitcode and IR.
The bitcode upgrade is a policy requirement that has to be retained
indefinitely. The IR upgrade is mainly there so it's not necessary
to update all tests using memory attributes in this patch, which
is already large enough. We could drop that part after migrating
tests, or retain it longer term, to make it easier to import IR
from older LLVM versions.
High-level Function/CallBase APIs like doesNotAccessMemory() or
setDoesNotAccessMemory() are mapped transparently to the memory
attribute. Code that directly manipulates attributes (e.g. via
AttributeList) on the other hand needs to switch to working with
the memory attribute instead.
Differential Revision: https://reviews.llvm.org/D135780
More information about the All-commits
mailing list