mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 13:21:04 +08:00
[SandboxIR][NFC] Move Instruction classes into a separate file (#110294)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -159,6 +159,7 @@ protected:
|
||||
|
||||
public:
|
||||
Context(LLVMContext &LLVMCtx);
|
||||
~Context();
|
||||
|
||||
Tracker &getTracker() { return IRTracker; }
|
||||
/// Convenience function for `getTracker().save()`
|
||||
|
||||
2741
llvm/include/llvm/SandboxIR/Instruction.h
Normal file
2741
llvm/include/llvm/SandboxIR/Instruction.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ add_llvm_component_library(LLVMSandboxIR
|
||||
BasicBlock.cpp
|
||||
Constant.cpp
|
||||
Context.cpp
|
||||
Instruction.cpp
|
||||
Module.cpp
|
||||
Pass.cpp
|
||||
PassManager.cpp
|
||||
|
||||
@@ -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())
|
||||
|
||||
1965
llvm/lib/SandboxIR/Instruction.cpp
Normal file
1965
llvm/lib/SandboxIR/Instruction.cpp
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user