================
@@ -849,19 +849,15 @@ void AMDGPUToolChain::addClangTargetOptions(
CC1Args.push_back("-fapply-global-visibility-to-externs");
}
- // For SPIR-V we want to retain the pristine output of Clang CodeGen, since
- // optimizations might lose structure / information that is necessary for
- // generating optimal concrete AMDGPU code.
- // TODO: using the below option is a temporary placeholder until Clang
- // provides the required functionality, which essentially boils down to
- // -O0 being refactored / reworked to not imply optnone / remove TBAA.
- // Once that is added, we should pivot to that functionality, being
- // mindful to not corrupt the user provided and subsequently embedded
- // command-line (i.e. if the user asks for -O3 this is what the
- // finalisation should use).
+ // For SPIR-V, enable basic optimizations but disable target-specific
+ // transformations that could harm JIT performance.
if (getTriple().isSPIRV() &&
----------------
MrSidims wrote:
Let me double check if I understood your proposal correctly. Is your suggestion:
"Move this code from clang to optimization pipeline construction (aka check
target triple and don't addPass(vectorization/unrolling/etc)";
or
"Don't add opt customization at all for SPIR-V"?
(I hope the former)
https://github.com/llvm/llvm-project/pull/189383
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits