Currently, the behaviour of -save-temps changes the generated output
when offloading to AMDGPU. This is because we only have a single phase
and it contains the -disable-llvm-passes flags which results in
unoptimized bitcode. We need to make sure we generate another phase that
produces both the optimized and unoptimized bitcode. There used to be a
check that turned these phases into a no-op. But I believe it is more
correct to not generate them this way in the first place. Doing this
requires a bit of a hack, replacing an already generated phase action,
but it should be fine.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
If i'm reading this right, the change means we emit the same save-temps files as hip with the same naming convention. That sounds great, makes life easier for backend devs looking at either. I don't know why rdc is a factor - it's not obvious to me that it means anything on amdgpu - but if that's preserving hip's current handling it's fine by me.
Thanks!
clang/lib/Driver/Driver.cpp | ||
---|---|---|
4460 | Why is rdc involved here? |
clang/lib/Driver/Driver.cpp | ||
---|---|---|
4460 | HIP goes straight through a separate linker phase in non-RDC mode. Setting the type here would prevent that. |
I realized that if I fix up how we propagate the ToolChains I can use it in ConstructPhaseAction. Should be cleaner this way.
Getting a build failure on AIX, could you take a look please?
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/clang/lib/Driver/Driver.cpp:5715:37: error: lambda capture 'C' is not used [-Werror,-Wunused-lambda-capture] auto IsHIPRDCInCompilePhase = [&C](const JobAction &JA,
https://lab.llvm.org/buildbot/#/builders/214/builds/5290/steps/5/logs/stdio
Why is rdc involved here?