Skip to content

Commit feda983

Browse files
committed
[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
1 parent 49ee563 commit feda983

File tree

15 files changed

+39
-129
lines changed

15 files changed

+39
-129
lines changed

llvm/include/llvm/Analysis/AliasAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
#include "llvm/ADT/Sequence.h"
4343
#include "llvm/ADT/SmallVector.h"
4444
#include "llvm/Analysis/MemoryLocation.h"
45-
#include "llvm/IR/ModRef.h"
4645
#include "llvm/IR/PassManager.h"
4746
#include "llvm/Pass.h"
47+
#include "llvm/Support/ModRef.h"
4848
#include <cstdint>
4949
#include <functional>
5050
#include <memory>
File renamed without changes.

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
#include "llvm/IR/Intrinsics.h"
3838
#include "llvm/IR/LLVMContext.h"
3939
#include "llvm/IR/Metadata.h"
40-
#include "llvm/IR/ModRef.h"
4140
#include "llvm/IR/Module.h"
4241
#include "llvm/IR/Operator.h"
4342
#include "llvm/IR/Value.h"
4443
#include "llvm/IR/ValueSymbolTable.h"
4544
#include "llvm/Support/Casting.h"
4645
#include "llvm/Support/ErrorHandling.h"
4746
#include "llvm/Support/MathExtras.h"
47+
#include "llvm/Support/ModRef.h"
4848
#include "llvm/Support/SaveAndRestore.h"
4949
#include "llvm/Support/raw_ostream.h"
5050
#include <algorithm>

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#include "llvm/IR/IntrinsicsARM.h"
5656
#include "llvm/IR/LLVMContext.h"
5757
#include "llvm/IR/Metadata.h"
58-
#include "llvm/IR/ModRef.h"
5958
#include "llvm/IR/Module.h"
6059
#include "llvm/IR/ModuleSummaryIndex.h"
6160
#include "llvm/IR/Operator.h"
@@ -72,6 +71,7 @@
7271
#include "llvm/Support/ErrorOr.h"
7372
#include "llvm/Support/MathExtras.h"
7473
#include "llvm/Support/MemoryBuffer.h"
74+
#include "llvm/Support/ModRef.h"
7575
#include "llvm/Support/raw_ostream.h"
7676
#include <algorithm>
7777
#include <cassert>

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
#include "llvm/IR/Function.h"
6262
#include "llvm/IR/InlineAsm.h"
6363
#include "llvm/IR/Instructions.h"
64-
#include "llvm/IR/ModRef.h"
6564
#include "llvm/InitializePasses.h"
6665
#include "llvm/MC/LaneBitmask.h"
6766
#include "llvm/MC/MCAsmInfo.h"
@@ -74,6 +73,7 @@
7473
#include "llvm/Support/ErrorHandling.h"
7574
#include "llvm/Support/LowLevelTypeImpl.h"
7675
#include "llvm/Support/MathExtras.h"
76+
#include "llvm/Support/ModRef.h"
7777
#include "llvm/Support/raw_ostream.h"
7878
#include "llvm/Target/TargetMachine.h"
7979
#include <algorithm>

llvm/lib/IR/Attributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
#include "llvm/Config/llvm-config.h"
2727
#include "llvm/IR/Function.h"
2828
#include "llvm/IR/LLVMContext.h"
29-
#include "llvm/IR/ModRef.h"
3029
#include "llvm/IR/Type.h"
3130
#include "llvm/Support/Compiler.h"
3231
#include "llvm/Support/ErrorHandling.h"
32+
#include "llvm/Support/ModRef.h"
3333
#include "llvm/Support/raw_ostream.h"
3434
#include <algorithm>
3535
#include <cassert>

llvm/lib/IR/Function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#include "llvm/IR/LLVMContext.h"
5252
#include "llvm/IR/MDBuilder.h"
5353
#include "llvm/IR/Metadata.h"
54-
#include "llvm/IR/ModRef.h"
5554
#include "llvm/IR/Module.h"
5655
#include "llvm/IR/Operator.h"
5756
#include "llvm/IR/SymbolTableListTraits.h"
@@ -64,6 +63,7 @@
6463
#include "llvm/Support/CommandLine.h"
6564
#include "llvm/Support/Compiler.h"
6665
#include "llvm/Support/ErrorHandling.h"
66+
#include "llvm/Support/ModRef.h"
6767
#include <cassert>
6868
#include <cstddef>
6969
#include <cstdint>

llvm/lib/IR/Instructions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "llvm/IR/LLVMContext.h"
3131
#include "llvm/IR/MDBuilder.h"
3232
#include "llvm/IR/Metadata.h"
33-
#include "llvm/IR/ModRef.h"
3433
#include "llvm/IR/Module.h"
3534
#include "llvm/IR/Operator.h"
3635
#include "llvm/IR/Type.h"
@@ -39,6 +38,7 @@
3938
#include "llvm/Support/Casting.h"
4039
#include "llvm/Support/ErrorHandling.h"
4140
#include "llvm/Support/MathExtras.h"
41+
#include "llvm/Support/ModRef.h"
4242
#include "llvm/Support/TypeSize.h"
4343
#include <algorithm>
4444
#include <cassert>

llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#include "llvm/ADT/StringSwitch.h"
1818
#include "llvm/IR/DerivedTypes.h"
1919
#include "llvm/IR/Function.h"
20-
#include "llvm/IR/ModRef.h"
2120
#include "llvm/IR/Module.h"
2221
#include "llvm/IR/ValueSymbolTable.h"
2322
#include "llvm/Support/CommandLine.h"
23+
#include "llvm/Support/ModRef.h"
2424
#include "llvm/Support/raw_ostream.h"
2525

2626
using namespace llvm;

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
#include "llvm/IR/IntrinsicInst.h"
3535
#include "llvm/IR/IntrinsicsAMDGPU.h"
3636
#include "llvm/IR/IntrinsicsR600.h"
37-
#include "llvm/IR/ModRef.h"
3837
#include "llvm/Support/CommandLine.h"
38+
#include "llvm/Support/ModRef.h"
3939
#include "llvm/Support/KnownBits.h"
4040

4141
using namespace llvm;

0 commit comments

Comments
 (0)