================ @@ -1164,6 +1166,12 @@ void EmitAssemblyHelper::RunOptimizationPipeline( LangOpts.HIPStdParInterposeAlloc) MPM.addPass(HipStdParAllocationInterpositionPass()); + if (LangOpts.HLSL) { + // HLSL legalization passes + MPM.addPass(HLSLFinalizeLinkage()); + MPM.addPass(GlobalOptPass()); + } + ---------------- s-perron wrote:
I placed it here because there is some HIP specific passes above, so it seems like a possible place, but I really don't know. Let me know if there is a better place to run these passes. https://github.com/llvm/llvm-project/pull/123811 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits