1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[AMDGPU] Disable garbage collection passes

Differential Revision: https://reviews.llvm.org/D105593
This commit is contained in:
Stanislav Mekhanoshin 2021-07-07 14:25:24 -07:00
parent 385913f9ce
commit dc43bb3409
7 changed files with 22 additions and 18 deletions

View File

@ -270,11 +270,19 @@ namespace llvm {
/// operations.
FunctionPass *createGCLoweringPass();
/// GCLowering Pass - Used by gc.root to perform its default lowering
/// operations.
extern char &GCLoweringID;
/// ShadowStackGCLowering - Implements the custom lowering mechanism
/// used by the shadow stack GC. Only runs on functions which opt in to
/// the shadow stack collector.
FunctionPass *createShadowStackGCLoweringPass();
/// ShadowStackGCLowering - Implements the custom lowering mechanism
/// used by the shadow stack GC.
extern char &ShadowStackGCLoweringID;
/// GCMachineCodeAnalysis - Target-independent pass to mark safe points
/// in machine code. Must be added very late during code generation, just
/// prior to output, and importantly after all CFG transformations (such as

View File

@ -99,6 +99,7 @@ void llvm::initializeCodeGen(PassRegistry &Registry) {
initializeRegisterCoalescerPass(Registry);
initializeRenameIndependentSubregsPass(Registry);
initializeSafeStackLegacyPassPass(Registry);
initializeShadowStackGCLoweringPass(Registry);
initializeShrinkWrapPass(Registry);
initializeSjLjEHPreparePass(Registry);
initializeSlotIndexesPass(Registry);

View File

@ -85,6 +85,7 @@ INITIALIZE_PASS_END(LowerIntrinsics, "gc-lowering", "GC Lowering", false, false)
FunctionPass *llvm::createGCLoweringPass() { return new LowerIntrinsics(); }
char LowerIntrinsics::ID = 0;
char &llvm::GCLoweringID = LowerIntrinsics::ID;
LowerIntrinsics::LowerIntrinsics() : FunctionPass(ID) {
initializeLowerIntrinsicsPass(*PassRegistry::getPassRegistry());

View File

@ -89,6 +89,7 @@ private:
} // end anonymous namespace
char ShadowStackGCLowering::ID = 0;
char &llvm::ShadowStackGCLoweringID = ShadowStackGCLowering::ID;
INITIALIZE_PASS_BEGIN(ShadowStackGCLowering, DEBUG_TYPE,
"Shadow Stack GC Lowering", false, false)

View File

@ -857,8 +857,8 @@ void TargetPassConfig::addIRPasses() {
// Run GC lowering passes for builtin collectors
// TODO: add a pass insertion point here
addPass(createGCLoweringPass());
addPass(createShadowStackGCLoweringPass());
addPass(&GCLoweringID);
addPass(&ShadowStackGCLoweringID);
addPass(createLowerConstantIntrinsicsPass());
// Make sure that no unreachable blocks are instruction selected.

View File

@ -763,6 +763,9 @@ public:
// anything.
disablePass(&StackMapLivenessID);
disablePass(&FuncletLayoutID);
// Garbage collection is not supported.
disablePass(&GCLoweringID);
disablePass(&ShadowStackGCLoweringID);
}
AMDGPUTargetMachine &getAMDGPUTargetMachine() const {

View File

@ -22,8 +22,8 @@
; GCN-O0-NEXT: Target Transform Information
; GCN-O0-NEXT: Assumption Cache Tracker
; GCN-O0-NEXT: Profile summary info
; GCN-O0-NEXT: Create Garbage Collector Module Metadata
; GCN-O0-NEXT: Argument Register Usage Information Storage
; GCN-O0-NEXT: Create Garbage Collector Module Metadata
; GCN-O0-NEXT: Register Usage Information Storage
; GCN-O0-NEXT: Machine Branch Probability Analysis
; GCN-O0-NEXT: ModulePass Manager
@ -44,8 +44,6 @@
; GCN-O0-NEXT: Lower uses of LDS variables from non-kernel functions
; GCN-O0-NEXT: FunctionPass Manager
; GCN-O0-NEXT: Expand Atomic instructions
; GCN-O0-NEXT: Lower Garbage Collection Instructions
; GCN-O0-NEXT: Shadow Stack GC Lowering
; GCN-O0-NEXT: Lower constant intrinsics
; GCN-O0-NEXT: Remove unreachable blocks from the CFG
; GCN-O0-NEXT: Expand vector predication intrinsics
@ -165,8 +163,8 @@
; GCN-O1-NEXT: External Alias Analysis
; GCN-O1-NEXT: Type-Based Alias Analysis
; GCN-O1-NEXT: Scoped NoAlias Alias Analysis
; GCN-O1-NEXT: Create Garbage Collector Module Metadata
; GCN-O1-NEXT: Argument Register Usage Information Storage
; GCN-O1-NEXT: Create Garbage Collector Module Metadata
; GCN-O1-NEXT: Machine Branch Probability Analysis
; GCN-O1-NEXT: Register Usage Information Storage
; GCN-O1-NEXT: ModulePass Manager
@ -209,8 +207,6 @@
; GCN-O1-NEXT: Lazy Branch Probability Analysis
; GCN-O1-NEXT: Lazy Block Frequency Analysis
; GCN-O1-NEXT: Expand memcmp() to load/stores
; GCN-O1-NEXT: Lower Garbage Collection Instructions
; GCN-O1-NEXT: Shadow Stack GC Lowering
; GCN-O1-NEXT: Lower constant intrinsics
; GCN-O1-NEXT: Remove unreachable blocks from the CFG
; GCN-O1-NEXT: Natural Loop Information
@ -413,8 +409,8 @@
; GCN-O1-OPTS-NEXT: External Alias Analysis
; GCN-O1-OPTS-NEXT: Type-Based Alias Analysis
; GCN-O1-OPTS-NEXT: Scoped NoAlias Alias Analysis
; GCN-O1-OPTS-NEXT: Create Garbage Collector Module Metadata
; GCN-O1-OPTS-NEXT: Argument Register Usage Information Storage
; GCN-O1-OPTS-NEXT: Create Garbage Collector Module Metadata
; GCN-O1-OPTS-NEXT: Machine Branch Probability Analysis
; GCN-O1-OPTS-NEXT: Register Usage Information Storage
; GCN-O1-OPTS-NEXT: ModulePass Manager
@ -475,8 +471,6 @@
; GCN-O1-OPTS-NEXT: Lazy Branch Probability Analysis
; GCN-O1-OPTS-NEXT: Lazy Block Frequency Analysis
; GCN-O1-OPTS-NEXT: Expand memcmp() to load/stores
; GCN-O1-OPTS-NEXT: Lower Garbage Collection Instructions
; GCN-O1-OPTS-NEXT: Shadow Stack GC Lowering
; GCN-O1-OPTS-NEXT: Lower constant intrinsics
; GCN-O1-OPTS-NEXT: Remove unreachable blocks from the CFG
; GCN-O1-OPTS-NEXT: Natural Loop Information
@ -694,8 +688,8 @@
; GCN-O2-NEXT: External Alias Analysis
; GCN-O2-NEXT: Type-Based Alias Analysis
; GCN-O2-NEXT: Scoped NoAlias Alias Analysis
; GCN-O2-NEXT: Create Garbage Collector Module Metadata
; GCN-O2-NEXT: Argument Register Usage Information Storage
; GCN-O2-NEXT: Create Garbage Collector Module Metadata
; GCN-O2-NEXT: Machine Branch Probability Analysis
; GCN-O2-NEXT: Register Usage Information Storage
; GCN-O2-NEXT: ModulePass Manager
@ -756,8 +750,6 @@
; GCN-O2-NEXT: Lazy Branch Probability Analysis
; GCN-O2-NEXT: Lazy Block Frequency Analysis
; GCN-O2-NEXT: Expand memcmp() to load/stores
; GCN-O2-NEXT: Lower Garbage Collection Instructions
; GCN-O2-NEXT: Shadow Stack GC Lowering
; GCN-O2-NEXT: Lower constant intrinsics
; GCN-O2-NEXT: Remove unreachable blocks from the CFG
; GCN-O2-NEXT: Natural Loop Information
@ -976,8 +968,8 @@
; GCN-O3-NEXT: External Alias Analysis
; GCN-O3-NEXT: Type-Based Alias Analysis
; GCN-O3-NEXT: Scoped NoAlias Alias Analysis
; GCN-O3-NEXT: Create Garbage Collector Module Metadata
; GCN-O3-NEXT: Argument Register Usage Information Storage
; GCN-O3-NEXT: Create Garbage Collector Module Metadata
; GCN-O3-NEXT: Machine Branch Probability Analysis
; GCN-O3-NEXT: Register Usage Information Storage
; GCN-O3-NEXT: ModulePass Manager
@ -1043,8 +1035,6 @@
; GCN-O3-NEXT: Lazy Branch Probability Analysis
; GCN-O3-NEXT: Lazy Block Frequency Analysis
; GCN-O3-NEXT: Expand memcmp() to load/stores
; GCN-O3-NEXT: Lower Garbage Collection Instructions
; GCN-O3-NEXT: Shadow Stack GC Lowering
; GCN-O3-NEXT: Lower constant intrinsics
; GCN-O3-NEXT: Remove unreachable blocks from the CFG
; GCN-O3-NEXT: Natural Loop Information