Skip to content

Commit 0519996

Browse files
vporpopuja2196
authored andcommitted
[SandboxIR][NFC] Move Instruction classes into a separate file (#110294)
1 parent d51ecf3 commit 0519996

File tree

19 files changed

+4725
-4681
lines changed

19 files changed

+4725
-4681
lines changed

llvm/benchmarks/SandboxIRBench.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
#include "llvm/IR/Function.h"
1919
#include "llvm/IR/Instruction.h"
2020
#include "llvm/IR/Module.h"
21-
#include "llvm/SandboxIR/SandboxIR.h"
21+
#include "llvm/SandboxIR/Instruction.h"
22+
#include "llvm/SandboxIR/Module.h"
2223
#include "llvm/Support/SourceMgr.h"
2324
#include <memory>
2425
#include <sstream>

llvm/include/llvm/SandboxIR/Constant.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "llvm/IR/GlobalObject.h"
1818
#include "llvm/IR/GlobalValue.h"
1919
#include "llvm/IR/GlobalVariable.h"
20+
#include "llvm/SandboxIR/Argument.h"
2021
#include "llvm/SandboxIR/Context.h"
2122
#include "llvm/SandboxIR/Type.h"
2223
#include "llvm/SandboxIR/User.h"

llvm/include/llvm/SandboxIR/Context.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ class Context {
159159

160160
public:
161161
Context(LLVMContext &LLVMCtx);
162+
~Context();
162163

163164
Tracker &getTracker() { return IRTracker; }
164165
/// Convenience function for `getTracker().save()`

llvm/include/llvm/SandboxIR/Instruction.h

Lines changed: 2741 additions & 0 deletions
Large diffs are not rendered by default.

llvm/include/llvm/SandboxIR/Region.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "llvm/ADT/SetVector.h"
1515
#include "llvm/ADT/iterator_range.h"
16-
#include "llvm/SandboxIR/SandboxIR.h"
16+
#include "llvm/SandboxIR/Instruction.h"
1717
#include "llvm/Support/raw_ostream.h"
1818

1919
namespace llvm::sandboxir {

llvm/include/llvm/SandboxIR/SandboxIR.h

Lines changed: 0 additions & 2718 deletions
Large diffs are not rendered by default.

llvm/include/llvm/SandboxIR/Utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define LLVM_SANDBOXIR_UTILS_H
1414

1515
#include "llvm/Analysis/MemoryLocation.h"
16-
#include "llvm/SandboxIR/SandboxIR.h"
16+
#include "llvm/SandboxIR/Instruction.h"
1717

1818
namespace llvm::sandboxir {
1919

llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "llvm/ADT/DenseMap.h"
2626
#include "llvm/ADT/iterator_range.h"
27-
#include "llvm/SandboxIR/SandboxIR.h"
27+
#include "llvm/SandboxIR/Instruction.h"
2828
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h"
2929

3030
namespace llvm::sandboxir {

llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_BOTTOMUPVEC_H
1414

1515
#include "llvm/ADT/ArrayRef.h"
16+
#include "llvm/SandboxIR/Constant.h"
1617
#include "llvm/SandboxIR/Pass.h"
17-
#include "llvm/SandboxIR/SandboxIR.h"
1818
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h"
1919

2020
namespace llvm::sandboxir {

llvm/lib/SandboxIR/BasicBlock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "llvm/SandboxIR/BasicBlock.h"
1010
#include "llvm/SandboxIR/Context.h"
11-
#include "llvm/SandboxIR/SandboxIR.h" // TODO: remove this
11+
#include "llvm/SandboxIR/Instruction.h"
1212

1313
namespace llvm::sandboxir {
1414

llvm/lib/SandboxIR/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ add_llvm_component_library(LLVMSandboxIR
33
BasicBlock.cpp
44
Constant.cpp
55
Context.cpp
6+
Instruction.cpp
67
Module.cpp
78
Pass.cpp
89
PassManager.cpp

llvm/lib/SandboxIR/Context.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "llvm/SandboxIR/Context.h"
10-
#include "llvm/SandboxIR/SandboxIR.h"
10+
#include "llvm/SandboxIR/Instruction.h"
11+
#include "llvm/SandboxIR/Module.h"
1112

1213
namespace llvm::sandboxir {
1314

@@ -670,6 +671,8 @@ Context::Context(LLVMContext &LLVMCtx)
670671
: LLVMCtx(LLVMCtx), IRTracker(*this),
671672
LLVMIRBuilder(LLVMCtx, ConstantFolder()) {}
672673

674+
Context::~Context() {}
675+
673676
Module *Context::getModule(llvm::Module *LLVMM) const {
674677
auto It = LLVMModuleToModuleMap.find(LLVMM);
675678
if (It != LLVMModuleToModuleMap.end())

0 commit comments

Comments
 (0)