Index: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp =================================================================== --- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -1105,8 +1105,6 @@ EnableLowerKernelArguments) addPass(createAMDGPULowerKernelArgumentsPass()); - addPass(&AMDGPUPerfHintAnalysisID); - TargetPassConfig::addCodeGenPrepare(); if (isPassEnabled(EnableLoadStoreVectorizer)) @@ -1216,6 +1214,7 @@ addPass(createSIAnnotateControlFlowPass()); } addPass(createLCSSAPass()); + addPass(&AMDGPUPerfHintAnalysisID); return false; } Index: llvm/test/CodeGen/AMDGPU/llc-pipeline.ll =================================================================== --- llvm/test/CodeGen/AMDGPU/llc-pipeline.ll +++ llvm/test/CodeGen/AMDGPU/llc-pipeline.ll @@ -54,8 +54,6 @@ ; GCN-O0-NEXT: AMDGPU Annotate Kernel Features ; GCN-O0-NEXT: FunctionPass Manager ; GCN-O0-NEXT: AMDGPU Lower Kernel Arguments -; GCN-O0-NEXT: Analysis if a function is memory bound -; GCN-O0-NEXT: FunctionPass Manager ; GCN-O0-NEXT: Lazy Value Information Analysis ; GCN-O0-NEXT: Lower SwitchInst's to branches ; GCN-O0-NEXT: Lower invoke and unwind, for unwindless code generators @@ -93,6 +91,7 @@ ; GCN-O0-NEXT: SI annotate control flow ; GCN-O0-NEXT: LCSSA Verifier ; GCN-O0-NEXT: Loop-Closed SSA Form Pass +; GCN-O0-NEXT: Analysis if a function is memory bound ; GCN-O0-NEXT: DummyCGSCCPass ; GCN-O0-NEXT: FunctionPass Manager ; GCN-O0-NEXT: Safe Stack instrumentation pass @@ -225,8 +224,6 @@ ; GCN-O1-NEXT: AMDGPU Annotate Kernel Features ; GCN-O1-NEXT: FunctionPass Manager ; GCN-O1-NEXT: AMDGPU Lower Kernel Arguments -; GCN-O1-NEXT: Analysis if a function is memory bound -; GCN-O1-NEXT: FunctionPass Manager ; GCN-O1-NEXT: Dominator Tree Construction ; GCN-O1-NEXT: Natural Loop Information ; GCN-O1-NEXT: CodeGen Prepare @@ -269,6 +266,7 @@ ; GCN-O1-NEXT: SI annotate control flow ; GCN-O1-NEXT: LCSSA Verifier ; GCN-O1-NEXT: Loop-Closed SSA Form Pass +; GCN-O1-NEXT: Analysis if a function is memory bound ; GCN-O1-NEXT: DummyCGSCCPass ; GCN-O1-NEXT: FunctionPass Manager ; GCN-O1-NEXT: Safe Stack instrumentation pass @@ -495,8 +493,6 @@ ; GCN-O1-OPTS-NEXT: AMDGPU Annotate Kernel Features ; GCN-O1-OPTS-NEXT: FunctionPass Manager ; GCN-O1-OPTS-NEXT: AMDGPU Lower Kernel Arguments -; GCN-O1-OPTS-NEXT: Analysis if a function is memory bound -; GCN-O1-OPTS-NEXT: FunctionPass Manager ; GCN-O1-OPTS-NEXT: Dominator Tree Construction ; GCN-O1-OPTS-NEXT: Natural Loop Information ; GCN-O1-OPTS-NEXT: CodeGen Prepare @@ -545,6 +541,7 @@ ; GCN-O1-OPTS-NEXT: SI annotate control flow ; GCN-O1-OPTS-NEXT: LCSSA Verifier ; GCN-O1-OPTS-NEXT: Loop-Closed SSA Form Pass +; GCN-O1-OPTS-NEXT: Analysis if a function is memory bound ; GCN-O1-OPTS-NEXT: DummyCGSCCPass ; GCN-O1-OPTS-NEXT: FunctionPass Manager ; GCN-O1-OPTS-NEXT: Safe Stack instrumentation pass @@ -779,8 +776,6 @@ ; GCN-O2-NEXT: AMDGPU Annotate Kernel Features ; GCN-O2-NEXT: FunctionPass Manager ; GCN-O2-NEXT: AMDGPU Lower Kernel Arguments -; GCN-O2-NEXT: Analysis if a function is memory bound -; GCN-O2-NEXT: FunctionPass Manager ; GCN-O2-NEXT: Dominator Tree Construction ; GCN-O2-NEXT: Natural Loop Information ; GCN-O2-NEXT: CodeGen Prepare @@ -829,6 +824,7 @@ ; GCN-O2-NEXT: SI annotate control flow ; GCN-O2-NEXT: LCSSA Verifier ; GCN-O2-NEXT: Loop-Closed SSA Form Pass +; GCN-O2-NEXT: Analysis if a function is memory bound ; GCN-O2-NEXT: DummyCGSCCPass ; GCN-O2-NEXT: FunctionPass Manager ; GCN-O2-NEXT: Safe Stack instrumentation pass @@ -1077,8 +1073,6 @@ ; GCN-O3-NEXT: AMDGPU Annotate Kernel Features ; GCN-O3-NEXT: FunctionPass Manager ; GCN-O3-NEXT: AMDGPU Lower Kernel Arguments -; GCN-O3-NEXT: Analysis if a function is memory bound -; GCN-O3-NEXT: FunctionPass Manager ; GCN-O3-NEXT: Dominator Tree Construction ; GCN-O3-NEXT: Natural Loop Information ; GCN-O3-NEXT: CodeGen Prepare @@ -1127,6 +1121,7 @@ ; GCN-O3-NEXT: SI annotate control flow ; GCN-O3-NEXT: LCSSA Verifier ; GCN-O3-NEXT: Loop-Closed SSA Form Pass +; GCN-O3-NEXT: Analysis if a function is memory bound ; GCN-O3-NEXT: DummyCGSCCPass ; GCN-O3-NEXT: FunctionPass Manager ; GCN-O3-NEXT: Safe Stack instrumentation pass