This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Make sure both cc1 and cc1as process -m[no-]code-object-v3
ClosedPublic

Authored by kzhuravl on Oct 15 2020, 8:56 AM.

Diff Detail

Event Timeline

kzhuravl created this revision.Oct 15 2020, 8:56 AM
kzhuravl requested review of this revision.Oct 15 2020, 8:56 AM
yaxunl added inline comments.Oct 15 2020, 9:19 AM
clang/lib/Driver/ToolChains/Clang.cpp
6125

this does not work if you have multiple options, you may need something like

// Get the last argument of -mwavefrontsize64 or -mno-wavefrontsize64.
  if (auto *WaveArg = Args.getLastArg(options::OPT_mwavefrontsize64,
                                      options::OPT_mno_wavefrontsize64)) {
    if (WaveArg->getOption().getID() == options::OPT_mwavefrontsize64) {
    } else {
    }
  }

Also better extract this part as a function and call it in two places.

scott.linder added inline comments.Oct 15 2020, 10:05 AM
clang/test/Driver/amdgpu-features-as.s
1

Going along with Sam's request, can you add a test case for specifying multiple options?

kzhuravl updated this revision to Diff 298417.Oct 15 2020, 10:39 AM
kzhuravl marked 2 inline comments as done.

Addressed review feedback

scott.linder accepted this revision.Oct 15 2020, 10:57 AM
This revision is now accepted and ready to land.Oct 15 2020, 10:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2020, 11:03 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript