[TableGen] Use MemoryEffects to represent intrinsic memory effects (NFCI)
authorNikita Popov <npopov@redhat.com>
Tue, 8 Nov 2022 13:46:09 +0000 (14:46 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 14 Nov 2022 09:52:04 +0000 (10:52 +0100)
commitfeda983ff89b7be27a9bfabbabce7d2b59869eba
tree478b28b6ac837f55f7e05662873d8583d2c25ca5
parent49ee5634e7b00991a1315535eae4bf996e84c387
[TableGen] Use MemoryEffects to represent intrinsic memory effects (NFCI)

The TableGen implementation was using a homegrown implementation of
FunctionModRefInfo. This switches it to use MemoryEffects instead.
This makes the code simpler, and will allow exposing the full
representational power of MemoryEffects in the future. Among other
things, this will allow us to map IntrHasSideEffects to an
inaccessiblemem readwrite, rather than just ignoring it entirely
in most cases.

To avoid layering issues, this moves the ModRef.h header from IR
to Support, so that it can be included in the TableGen layer.

Differential Revision: https://reviews.llvm.org/D137641
15 files changed:
llvm/include/llvm/Analysis/AliasAnalysis.h
llvm/include/llvm/Support/ModRef.h [moved from llvm/include/llvm/IR/ModRef.h with 100% similarity]
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/Function.cpp
llvm/lib/IR/Instructions.cpp
llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/Mips/Mips16HardFloat.cpp
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/utils/TableGen/CodeGenIntrinsics.h
llvm/utils/TableGen/CodeGenTarget.cpp
llvm/utils/TableGen/IntrinsicEmitter.cpp