1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-21 18:22:53 +01:00

[GC][NFC] Move GCStrategy from CodeGen to IR

We want it to be available in analyzes so that we could use the
CodeGen notion in middle-end passes (for example, to check if
a GC may free some particular pointer).

This is a preparatory patch that simply moves the files around.

Note: if this causes some build issues, this patch must just be reverted.

Differential Revision: https://reviews.llvm.org/D100557
Reviewed By: reames
This commit is contained in:
Max Kazantsev 2021-05-12 14:36:24 +07:00
parent 37ad5b2bff
commit f98a6ff646
15 changed files with 20 additions and 22 deletions

View File

@ -36,8 +36,8 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/GCStrategy.h"
#include "llvm/Pass.h"
#include <algorithm>
#include <cstddef>

View File

@ -14,7 +14,7 @@
#ifndef LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
#define LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
#include "llvm/CodeGen/BuiltinGCs.h"
#include "llvm/IR/BuiltinGCs.h"
#include <cstdlib>
namespace {

View File

@ -14,7 +14,7 @@
#ifndef LLVM_CODEGEN_LINKALLCODEGENCOMPONENTS_H
#define LLVM_CODEGEN_LINKALLCODEGENCOMPONENTS_H
#include "llvm/CodeGen/BuiltinGCs.h"
#include "llvm/IR/BuiltinGCs.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/SchedulerRegistry.h"
#include "llvm/Target/TargetMachine.h"

View File

@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_BUILTINGCS_H
#define LLVM_CODEGEN_BUILTINGCS_H
#ifndef LLVM_IR_BUILTINGCS_H
#define LLVM_IR_BUILTINGCS_H
namespace llvm {
@ -27,6 +27,7 @@ void linkOcamlGCPrinter();
/// Creates an erlang-compatible metadata printer.
void linkErlangGCPrinter();
}
#endif
} // namespace llvm
#endif // LLVM_IR_BUILTINGCS_H

View File

@ -46,8 +46,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_GCSTRATEGY_H
#define LLVM_CODEGEN_GCSTRATEGY_H
#ifndef LLVM_IR_GCSTRATEGY_H
#define LLVM_IR_GCSTRATEGY_H
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
@ -133,4 +133,4 @@ using GCRegistry = Registry<GCStrategy>;
} // end namespace llvm
#endif // LLVM_CODEGEN_GCSTRATEGY_H
#endif // LLVM_IR_GCSTRATEGY_H

View File

@ -38,7 +38,6 @@
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCMetadataPrinter.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineDominators.h"
@ -68,6 +67,7 @@
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GCStrategy.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalIFunc.h"
#include "llvm/IR/GlobalIndirectSymbol.h"

View File

@ -14,10 +14,9 @@
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/BuiltinGCs.h"
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCMetadataPrinter.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/IR/BuiltinGCs.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"

View File

@ -14,9 +14,9 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/BuiltinGCs.h"
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCMetadataPrinter.h"
#include "llvm/IR/BuiltinGCs.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Mangler.h"

View File

@ -7,7 +7,6 @@ add_llvm_component_library(LLVMCodeGen
BranchFolding.cpp
BranchRelaxation.cpp
BreakFalseDeps.cpp
BuiltinGCs.cpp
BasicBlockSections.cpp
CalcSpillWeights.cpp
CallingConvLower.cpp
@ -38,7 +37,6 @@ add_llvm_component_library(LLVMCodeGen
GCMetadata.cpp
GCMetadataPrinter.cpp
GCRootLowering.cpp
GCStrategy.cpp
GlobalMerge.cpp
HardwareLoops.cpp
IfConversion.cpp

View File

@ -13,7 +13,6 @@
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h"
#include "llvm/InitializePasses.h"

View File

@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"

View File

@ -21,7 +21,6 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
@ -33,6 +32,7 @@
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GCStrategy.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"

View File

@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/BuiltinGCs.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/IR/BuiltinGCs.h"
#include "llvm/IR/GCStrategy.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/Support/Casting.h"

View File

@ -5,6 +5,7 @@ add_llvm_component_library(LLVMCore
Attributes.cpp
AutoUpgrade.cpp
BasicBlock.cpp
BuiltinGCs.cpp
Comdat.cpp
ConstantFold.cpp
ConstantRange.cpp
@ -21,6 +22,7 @@ add_llvm_component_library(LLVMCore
Dominators.cpp
FPEnv.cpp
Function.cpp
GCStrategy.cpp
GVMaterializer.cpp
Globals.cpp
IRBuilder.cpp

View File

@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/IR/GCStrategy.h"
using namespace llvm;