[SandboxIR][NFC] Move Instruction classes into a separate file (#110294)

This commit is contained in:
vporpo
2024-09-27 10:54:11 -07:00
committed by GitHub
parent 50afafbf29
commit eba106d461
19 changed files with 4725 additions and 4681 deletions

View File

@@ -18,7 +18,8 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Module.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/SandboxIR/Module.h"
#include "llvm/Support/SourceMgr.h"
#include <memory>
#include <sstream>

View File

@@ -17,6 +17,7 @@
#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/SandboxIR/Argument.h"
#include "llvm/SandboxIR/Context.h"
#include "llvm/SandboxIR/Type.h"
#include "llvm/SandboxIR/User.h"

View File

@@ -159,6 +159,7 @@ protected:
public:
Context(LLVMContext &LLVMCtx);
~Context();
Tracker &getTracker() { return IRTracker; }
/// Convenience function for `getTracker().save()`

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm::sandboxir {

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
#define LLVM_SANDBOXIR_UTILS_H
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
namespace llvm::sandboxir {

View File

@@ -24,7 +24,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h"
namespace llvm::sandboxir {

View File

@@ -13,8 +13,8 @@
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_BOTTOMUPVEC_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/SandboxIR/Constant.h"
#include "llvm/SandboxIR/Pass.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h"
namespace llvm::sandboxir {

View File

@@ -8,7 +8,7 @@
#include "llvm/SandboxIR/BasicBlock.h"
#include "llvm/SandboxIR/Context.h"
#include "llvm/SandboxIR/SandboxIR.h" // TODO: remove this
#include "llvm/SandboxIR/Instruction.h"
namespace llvm::sandboxir {

View File

@@ -3,6 +3,7 @@ add_llvm_component_library(LLVMSandboxIR
BasicBlock.cpp
Constant.cpp
Context.cpp
Instruction.cpp
Module.cpp
Pass.cpp
PassManager.cpp

View File

@@ -7,7 +7,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/SandboxIR/Context.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/SandboxIR/Module.h"
namespace llvm::sandboxir {
@@ -670,6 +671,8 @@ Context::Context(LLVMContext &LLVMCtx)
: LLVMCtx(LLVMCtx), IRTracker(*this),
LLVMIRBuilder(LLVMCtx, ConstantFolder()) {}
Context::~Context() {}
Module *Context::getModule(llvm::Module *LLVMM) const {
auto It = LLVMModuleToModuleMap.find(LLVMM);
if (It != LLVMModuleToModuleMap.end())

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Instruction.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include <sstream>
using namespace llvm::sandboxir;

View File

@@ -8,6 +8,7 @@
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/SandboxIR/Instruction.h"
using namespace llvm::sandboxir;

View File

@@ -11,7 +11,7 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Module.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/Support/SourceMgr.h"
#include "gmock/gmock-matchers.h"
#include "gtest/gtest.h"

View File

@@ -8,7 +8,7 @@
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Interval.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"

View File

@@ -8,7 +8,7 @@
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/SandboxIR/SandboxIR.h"
#include "llvm/SandboxIR/Instruction.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"