Page MenuHomePhabricator

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

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

Diff Detail

Event Timeline

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

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.Thu, Oct 15, 10:05 AM
clang/test/Driver/amdgpu-features-as.s
2

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

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

Addressed review feedback

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