[all-commits] [llvm/llvm-project] 1f5cac: [AMDGPU][OpenMP] Fix clang driver crash when provi...

pdhaliwal-amd via All-commits all-commits at lists.llvm.org
Wed May 5 07:27:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f5cacfcb845fd4163dec5a8c7991934c53d6cb3
      https://github.com/llvm/llvm-project/commit/1f5cacfcb845fd4163dec5a8c7991934c53d6cb3
  Author: Pushpinder Singh <Pushpinder.Singh at amd.com>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M clang/lib/Driver/Driver.cpp
    M clang/test/Driver/amdgpu-openmp-toolchain.c

  Log Message:
  -----------
  [AMDGPU][OpenMP] Fix clang driver crash when provided -c

The offload action is used in four different ways as explained
in Driver.cpp:4495. When -c is present, the final phase will be
assemble (linker when -c is not present). However, this phase
is skipped according to D96769 for amdgcn. So, offload action
arrives into following situation,

 compile (device) ---> offload ---> offload

without -c the chain looks like,
 compile (device) ---> offload ---> linker (device)
				---> offload

The former situation creates an unhandled case which causes
problem. The solution presented in this patch delays the D96769
logic until job creation time. This keeps the offload action
in the 1 of the 4 specified situations.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D101901




More information about the All-commits mailing list