<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 25, 2015 at 3:51 PM Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eric,<br>
<br>
Can you please update the test case for this change?<br>
<br></blockquote><div><br></div><div>Hmm? The testcases are pretty exhaustive and should be checking exactly what's here. (i.e. I don't expect a functional change).</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks again,<br>
Hal<br>
<br>
----- Original Message -----<br>
> From: "Eric Christopher via cfe-commits" <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>><br>
> To: <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> Sent: Monday, August 24, 2015 7:59:11 PM<br>
> Subject: r245914 - Reimplement the PPC explicit option checking to be a bit more obvious<br>
><br>
> Author: echristo<br>
> Date: Mon Aug 24 19:59:11 2015<br>
> New Revision: 245914<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=245914&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=245914&view=rev</a><br>
> Log:<br>
> Reimplement the PPC explicit option checking to be a bit more obvious<br>
> that we're looking for conflicting options and give an explanation.<br>
><br>
> Modified:<br>
> cfe/trunk/lib/Basic/Targets.cpp<br>
><br>
> Modified: cfe/trunk/lib/Basic/Targets.cpp<br>
> URL:<br>
> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245914&r1=245913&r2=245914&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=245914&r1=245913&r2=245914&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Basic/Targets.cpp (original)<br>
> +++ cfe/trunk/lib/Basic/Targets.cpp Mon Aug 24 19:59:11 2015<br>
> @@ -1070,14 +1070,25 @@ bool PPCTargetInfo::handleTargetFeatures<br>
> // TODO: Finish this list and add an assert that we've handled<br>
> them<br>
> // all.<br>
> }<br>
> - if (!HasVSX && (HasP8Vector || HasDirectMove)) {<br>
> - if (HasP8Vector)<br>
> - Diags.Report(diag::err_opt_not_valid_with_opt) <<<br>
> "-mpower8-vector" <<<br>
> - "-mno-vsx";<br>
> - else if (HasDirectMove)<br>
> - Diags.Report(diag::err_opt_not_valid_with_opt) <<<br>
> "-mdirect-move" <<<br>
> - "-mno-vsx";<br>
> - return false;<br>
> +<br>
> + // Handle explicit options being passed to the compiler here: if<br>
> we've<br>
> + // explicitly turned off vsx and turned on power8-vector or<br>
> direct-move then<br>
> + // go ahead and error since the customer has expressed a somewhat<br>
> incompatible<br>
> + // set of options.<br>
> + if (std::find(Features.begin(), Features.end(), "-vsx") !=<br>
> Features.end()) {<br>
> + if (std::find(Features.begin(), Features.end(),<br>
> "+power8-vector") !=<br>
> + Features.end()) {<br>
> + Diags.Report(diag::err_opt_not_valid_with_opt) <<<br>
> "-mpower8-vector"<br>
> + << "-mno-vsx";<br>
> + return false;<br>
> + }<br>
> +<br>
> + if (std::find(Features.begin(), Features.end(), "+direct-move")<br>
> !=<br>
> + Features.end()) {<br>
> + Diags.Report(diag::err_opt_not_valid_with_opt) <<<br>
> "-mdirect-move"<br>
> + << "-mno-vsx";<br>
> + return false;<br>
> + }<br>
> }<br>
><br>
> return true;<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
><br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</blockquote></div></div>