[PATCH] D141440: [OpenMP] Adjust phases for AMDGPU offloading for OpenMP in save-temps mode

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 14:53:48 PST 2023


jhuber6 created this revision.
jhuber6 added reviewers: arsenm, jdoerfert, tianshilei1992, yaxunl, JonChesterfield.
Herald added subscribers: kosarev, kerbowa, guansong, tpr, dstuttard, jvesely, kzhuravl.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1, MaskRay, wdng.
Herald added a project: clang.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141440

Files:
  clang/lib/Driver/Driver.cpp
  clang/test/Driver/amdgpu-openmp-toolchain.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141440.488003.patch
Type: text/x-patch
Size: 12934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230110/79ac7f42/attachment.bin>


More information about the cfe-commits mailing list