[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics, start with `llvm.amdgcn.wavefrontsize` (PR #114481)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 06:43:45 PST 2024


================
@@ -744,7 +744,10 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
 #include "llvm/Passes/TargetPassRegistry.inc"
 
   PB.registerPipelineStartEPCallback(
-      [](ModulePassManager &PM, OptimizationLevel Level) {
+      [this](ModulePassManager &PM, OptimizationLevel Level) {
+        PM.addPass(AMDGPUExpandPseudoIntrinsicsPass(*this));
+        FunctionPassManager FPM;
----------------
shiltian wrote:

Why do we need to get it run via module pass first, and then function pass again?

https://github.com/llvm/llvm-project/pull/114481


More information about the cfe-commits mailing list