This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Customize CUDA-based tool chain selection
ClosedPublic

Authored by gtbercea on Feb 7 2017, 8:37 AM.

Event Timeline

gtbercea created this revision.Feb 7 2017, 8:37 AM
gtbercea added a reviewer: ABataev.
gtbercea added a subscriber: cfe-commits.
Hahnfeld requested changes to this revision.Mar 31 2017, 2:48 AM
Hahnfeld added inline comments.
lib/Frontend/CompilerInvocation.cpp
2181–2190 ↗(On Diff #87454)

This is unrelated to CUDA, please split that into its own patch.

This revision now requires changes to proceed.Mar 31 2017, 2:48 AM
gtbercea updated this revision to Diff 93679.Mar 31 2017, 10:13 AM
gtbercea edited edge metadata.

Split patch.

Is there a way to actually test the changed code? The current test changes seem unrelated...

include/clang/Basic/DiagnosticDriverKinds.td
165–166 ↗(On Diff #93679)

This diagnostic seems unrelated to the code.

test/OpenMP/target_messages.cpp
7–8 ↗(On Diff #93679)

This test seems unrelated to the changes to the code.

gtbercea updated this revision to Diff 95171.Apr 13 2017, 11:10 AM

Remove tests which belong into a different patch.

gtbercea marked 2 inline comments as done.Apr 13 2017, 11:11 AM
Hahnfeld accepted this revision.Apr 20 2017, 2:13 AM

LGTM with one small note

lib/Driver/Driver.cpp
583

The code above uses HostTriple.str(), maybe better align to this?

This revision is now accepted and ready to land.Apr 20 2017, 2:13 AM
ABataev edited edge metadata.Apr 20 2017, 12:41 PM

Tests?

lib/Driver/Driver.cpp
575–590

Seems to me you're not using this initial value, so it is better to leave this variable uninitialized

gtbercea updated this revision to Diff 105320.Jul 5 2017, 12:55 PM
gtbercea edited the summary of this revision. (Show Details)

Rebase on latest master.

gtbercea marked an inline comment as done.Jul 5 2017, 12:55 PM
gtbercea added inline comments.Jul 5 2017, 1:04 PM
lib/Driver/Driver.cpp
583

HostTriple is equivalent with HostTC->getTriple(). HostTC->getTriple() is only used once so no need for a local variable unless you want me to refactor the CUDA code above and take out HostTriple from within the if statement and then re0use HostTriple that way. I'd rather not make changes to the CUDA toolchain above.

gtbercea added a comment.EditedJul 5 2017, 1:06 PM

Tests?

Can't write any meaningful tests. This will be tested implicitely by all future patches that perform offloading using OpenMP.

Hahnfeld added inline comments.Jul 5 2017, 11:25 PM
lib/Driver/Driver.cpp
583

Sorry, I meant the mismatch between .str() above and .normalize() here

gtbercea updated this revision to Diff 105446.Jul 6 2017, 9:01 AM

Use str()

gtbercea marked an inline comment as done.Jul 6 2017, 9:02 AM
gtbercea closed this revision.Jul 6 2017, 9:08 AM