Page MenuHomePhabricator

[OpenCL] Allow -cl-std and other standard -cl- options in driver

Authored by ashi1 on Jun 6 2016, 10:29 AM.

Diff Detail


Event Timeline

ashi1 updated this revision to Diff 59746.Jun 6 2016, 10:29 AM
ashi1 retitled this revision from to [OpenCL] Allow -cl-std and other standard -cl- options in driver.
ashi1 updated this object.
ashi1 added a reviewer: Anastasia.
ashi1 added subscribers: yaxunl, cfe-commits, pxli168 and 3 others.
Anastasia added inline comments.Jun 10 2016, 7:43 AM
670 ↗(On Diff #59746)

Is this code below to be removed?

671 ↗(On Diff #59746)

This isn't part of this change but could we improve the wording a bit for these items:

The default is optimizations are enabled -> By default optimizations are enabled

673 ↗(On Diff #59746)

This option does nothing and is for compatibility with OpenCL 1.0 -> This option is added for compatibility with OpenCL 1.0.
finish with .

Btw, ideally this option should be deprivcated for CL > 1.0. Could we give diagnostic in this case?

681 ↗(On Diff #59746)

Finish with .

683 ↗(On Diff #59746)

Finish with .

685 ↗(On Diff #59746)

Enable less precise MAD instructions to be generated. -> Allow use of less precise MAD computations in the generated binary.

ashi1 marked 6 inline comments as done.EditedJun 20 2016, 11:37 AM
This comment has been deleted.
670 ↗(On Diff #59746)

Yes, I removed the code from and added replacement in

673 ↗(On Diff #59746)

I've added a diagnostic. Can you take a look?

ashi1 updated this revision to Diff 61275.Jun 20 2016, 11:39 AM
ashi1 marked 2 inline comments as done.

Revised with Anastasia's comments. Please take a look at the diagnostic to see if it is what we want.

Anastasia added inline comments.Jun 21 2016, 5:19 AM
220 ↗(On Diff #61275)

Looks good. If we could output the current OpenCL version as well to match the diagnostic style from, it would be nice.

32 ↗(On Diff #61275)

Could you also test the new diagnostic message you are adding please?

ashi1 updated this revision to Diff 61423.Jun 21 2016, 12:24 PM
ashi1 marked 2 inline comments as done.

Revised based on Anastasia's comments. Also clang-test run passes, the testcases should be working correctly.

Anastasia added inline comments.Jun 22 2016, 8:13 AM
1673 ↗(On Diff #61423)

Could you check the OpenCL version here instead?

1675 ↗(On Diff #61423)

It seems OK to use Opts.OpenCLVersion directly!

1 ↗(On Diff #61423)

Since you are not checking anything here, do we even need this RUN line?

20 ↗(On Diff #61423)

Could you please separate with an empty line here and order the CHECK lines the same way as RUN lines if possible. It will make it more readable then.


ashi1 updated this revision to Diff 61574.Jun 22 2016, 10:54 AM
ashi1 marked 4 inline comments as done.

Revised to Anastasia's comments.

Anastasia accepted this revision.Jun 23 2016, 3:35 AM
Anastasia edited edge metadata.

LGTM! Thanks!

This revision is now accepted and ready to land.Jun 23 2016, 3:35 AM
This revision was automatically updated to reflect the committed changes.
jvesely added a subscriber: jvesely.Jul 1 2016, 1:59 PM
jvesely added inline comments.

It'd be nice if you added cl-no-signed-zeros since it's mentioned here

We will add it. Thanks.


ashi1 marked an inline comment as done.Jul 7 2016, 2:54 PM
ashi1 added inline comments.

Can you review ? Thanks