<html><body><p>The patch was reapplied in r256933 and includes the fixes for the different regressions that were identified, including the one reported below.<br><br>Thanks for your help!<br>Samuel<br><br><img width="16" height="16" src="cid:1__=8FBBF5A1DFD82BFD8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for "Liao, Michael" ---01/05/2016 07:58:19 PM---Hi Samuel The issue is not related to capture feature but"><font color="#424282">"Liao, Michael" ---01/05/2016 07:58:19 PM---Hi Samuel The issue is not related to capture feature but the order of evaluation which is not speci</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">"Liao, Michael" <michael.liao@intel.com></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">Samuel F Antao/Watson/IBM@IBMUS</font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">cfe-commits <cfe-commits@lists.llvm.org>, Artem Belevich <tra@google.com></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">01/05/2016 07:58 PM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">RE: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font color="#1F497D" face="Calibri">Hi Samuel</font><br><font color="#1F497D" face="Calibri"> </font><br><font color="#1F497D" face="Calibri">The issue is not related to capture feature but the order of evaluation which is not specified for arguments in a function call in C/C++. With the side effect in each argument evaluation, it causes the trouble.</font><br><font color="#1F497D" face="Calibri"> </font><br><font color="#1F497D" face="Calibri">Thanks</font><br><font color="#1F497D" face="Calibri">- Michael</font><br><font color="#1F497D" face="Calibri"> </font><br><b><font face="Calibri">From:</font></b><font face="Calibri"> Samuel F Antao [</font><font face="Calibri"><a href="mailto:sfantao@us.ibm.com">mailto:sfantao@us.ibm.com</a></font><font face="Calibri">] </font><b><font face="Calibri"><br>Sent:</font></b><font face="Calibri"> Tuesday, January 5, 2016 4:25 PM</font><b><font face="Calibri"><br>To:</font></b><font face="Calibri"> Liao, Michael <michael.liao@intel.com></font><b><font face="Calibri"><br>Cc:</font></b><font face="Calibri"> cfe-commits <cfe-commits@lists.llvm.org>; Artem Belevich <tra@google.com></font><b><font face="Calibri"><br>Subject:</font></b><font face="Calibri"> RE: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.</font><br><font size="4" face="Times New Roman"> </font><p><font size="4" face="Times New Roman">Hi Michael,<br><br>Thanks for the patch! I am not sure I understand why the behavior is unspecified if Idx is captured by reference, but that is good to know that it fixes the problem. I reverted the patch in the meantime given that I am still trying to replicate a problem I get from the ARM bots, but I will incorporate your fix when I am ready to reapply the patch.<br><br>Thanks again!<br>Samuel<br><br></font><img src="cid:1__=8FBBF5A1DFD82BFD8f9e8a93df938690918c8FB@" width="16" height="16" alt="Inactive hide details for "Liao, Michael" ---01/05/2016 05:17:13 PM---Hi Samual The change in CL#256842 has undefined behavior "><font size="4" color="#424282" face="Times New Roman">"Liao, Michael" ---01/05/2016 05:17:13 PM---Hi Samual The change in CL#256842 has undefined behavior according to C++. Attached patch will avoid</font><font size="4" face="Times New Roman"><br></font><font color="#5F5F5F" face="Times New Roman"><br>From: </font><font face="Times New Roman">"Liao, Michael" <</font><a href="mailto:michael.liao@intel.com"><u><font color="#0000FF" face="Times New Roman">michael.liao@intel.com</font></u></a><font face="Times New Roman">></font><font color="#5F5F5F" face="Times New Roman"><br>To: </font><font face="Times New Roman">Samuel F Antao/Watson/IBM@IBMUS, Artem Belevich <</font><a href="mailto:tra@google.com"><u><font color="#0000FF" face="Times New Roman">tra@google.com</font></u></a><font face="Times New Roman">></font><font color="#5F5F5F" face="Times New Roman"><br>Cc: </font><font face="Times New Roman">cfe-commits <</font><a href="mailto:cfe-commits@lists.llvm.org"><u><font color="#0000FF" face="Times New Roman">cfe-commits@lists.llvm.org</font></u></a><font face="Times New Roman">></font><font color="#5F5F5F" face="Times New Roman"><br>Date: </font><font face="Times New Roman">01/05/2016 05:17 PM</font><font color="#5F5F5F" face="Times New Roman"><br>Subject: </font><font face="Times New Roman">RE: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.</font><br><hr width="100%" size="2" align="left" noshade><br><font size="4" face="Times New Roman"><br><br></font><font size="4" color="#1F497D" face="Calibri"><br>Hi Samual</font><font size="4" face="Times New Roman"><br></font><font size="4" color="#1F497D" face="Calibri"><br>The change in CL#256842 has undefined behavior according to C++. Attached patch will avoid side-effect code during argument evaluation of a function call. That solves the problem for me on Linux with GCC 4.9.</font><font size="4" face="Times New Roman"><br></font><font size="4" color="#1F497D" face="Calibri"><br>Thanks<br>- Michael</font><font size="4" face="Times New Roman"><br></font><b><font size="4" face="Calibri"><br>From:</font></b><font size="4" face="Calibri"> cfe-commits [</font><a href="mailto:cfe-commits-bounces@lists.llvm.org"><u><font size="4" color="#0000FF" face="Calibri">mailto:cfe-commits-bounces@lists.llvm.org</font></u></a><font size="4" face="Calibri">] </font><b><font size="4" face="Calibri">On Behalf Of </font></b><font size="4" face="Calibri">Samuel F Antao via cfe-commits</font><b><font size="4" face="Calibri"><br>Sent:</font></b><font size="4" face="Calibri"> Tuesday, January 5, 2016 10:57 AM</font><b><font size="4" face="Calibri"><br>To:</font></b><font size="4" face="Calibri"> Artem Belevich <</font><a href="mailto:tra@google.com"><u><font size="4" color="#0000FF" face="Calibri">tra@google.com</font></u></a><font size="4" face="Calibri">></font><b><font size="4" face="Calibri"><br>Cc:</font></b><font size="4" face="Calibri"> cfe-commits <</font><a href="mailto:cfe-commits@lists.llvm.org"><u><font size="4" color="#0000FF" face="Calibri">cfe-commits@lists.llvm.org</font></u></a><font size="4" face="Calibri">></font><b><font size="4" face="Calibri"><br>Subject:</font></b><font size="4" face="Calibri"> Re: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.</font><p><font size="5" face="Times New Roman">Hi Art,<br><br>That only fixed one of the problems. The other one I am having some trouble to replicate. I am trying a few things and hopefully will get a fix soon.<br><br>Sorry for the trouble,<br>Samuel<br></font><font size="4" face="Times New Roman"><br></font><img src="cid:1__=8FBBF5A1DFD82BFD8f9e8a93df938690918c8FB@" width="16" height="16" alt="Inactive hide details for Artem Belevich ---01/05/2016 01:54:02 PM---Samuel, The tests are still failing:"><font size="5" color="#424282" face="Times New Roman">Artem Belevich ---01/05/2016 01:54:02 PM---Samuel, The tests are still failing:</font><font size="4" color="#5F5F5F" face="Times New Roman"><br><br>From: </font><font size="4" face="Times New Roman">Artem Belevich <</font><a href="mailto:tra@google.com"><u><font size="4" color="#0000FF" face="Times New Roman">tra@google.com</font></u></a><font size="4" face="Times New Roman">></font><font size="4" color="#5F5F5F" face="Times New Roman"><br>To: </font><font size="4" face="Times New Roman">Samuel F Antao/Watson/IBM@IBMUS</font><font size="4" color="#5F5F5F" face="Times New Roman"><br>Cc: </font><font size="4" face="Times New Roman">cfe-commits <</font><a href="mailto:cfe-commits@lists.llvm.org"><u><font size="4" color="#0000FF" face="Times New Roman">cfe-commits@lists.llvm.org</font></u></a><font size="4" face="Times New Roman">></font><font size="4" color="#5F5F5F" face="Times New Roman"><br>Date: </font><font size="4" face="Times New Roman">01/05/2016 01:54 PM</font><font size="4" color="#5F5F5F" face="Times New Roman"><br>Subject: </font><font size="4" face="Times New Roman">Re: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.</font><br><hr width="100%" size="2" align="left" noshade><br><font size="5" face="Times New Roman"><br><br></font><font size="6" face="Times New Roman"><br><br>Samuel,<br><br>The tests are still failing:</font><u><font size="4" color="#0000FF" face="Times New Roman"><br></font></u><a href="http://lab.llvm.org:8011/builders/clang-bpf-build/builds/5759"><u><font size="6" color="#0000FF" face="Times New Roman">http://lab.llvm.org:8011/builders/clang-bpf-build/builds/5759</font></u></a><font size="5" face="Times New Roman"><br><br></font><font size="6" face="Times New Roman"><br><br>On Tue, Jan 5, 2016 at 10:02 AM, Samuel Antao via cfe-commits <</font><a href="mailto:cfe-commits@lists.llvm.org" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">cfe-commits@lists.llvm.org</font></u></a><font size="6" face="Times New Roman">> wrote:</font><ul><ul><ul><ul><font size="6" face="Times New Roman">Author: sfantao<br>Date: Tue Jan 5 12:02:24 2016<br>New Revision: 256854<br><br>URL: </font><a href="http://llvm.org/viewvc/llvm-project?rev=256854&view=rev" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">http://llvm.org/viewvc/llvm-project?rev=256854&view=rev</font></u></a><font size="6" face="Times New Roman"><br>Log:<br>[OpenMP] Allow file ID to be signed in the offloading metadata.<br><br>This fixes a regression introduced by rL256842.<br><br><br>Modified:<br>cfe/trunk/test/OpenMP/target_codegen_registration.cpp<br>cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp<br><br>Modified: cfe/trunk/test/OpenMP/target_codegen_registration.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_codegen_registration.cpp?rev=256854&r1=256853&r2=256854&view=diff" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_codegen_registration.cpp?rev=256854&r1=256853&r2=256854&view=diff</font></u></a><font size="6" face="Times New Roman"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_codegen_registration.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_codegen_registration.cpp Tue Jan 5 12:02:24 2016<br>@@ -407,7 +407,7 @@ int bar(int a){<br><br>// Check metadata is properly generated:<br>// CHECK: !</font><a href="http://omp_offload.info/" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">omp_offload.info</font></u></a><font size="6" face="Times New Roman"> = !{!{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}}<br>-// CHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}<br>+// CHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:-?[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}<br>// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SDD2Ev", i32 210, i32 13, i32 {{[0-9]}}+}<br>// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SEC2Ev", i32 226, i32 13, i32 {{[0-9]}}+}<br>// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SED2Ev", i32 232, i32 13, i32 {{[0-9]}}+}<br>@@ -421,7 +421,7 @@ int bar(int a){<br>// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SCC2Ev", i32 185, i32 13, i32 {{[0-9]}}+}<br><br>// TCHECK: !</font><a href="http://omp_offload.info/" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">omp_offload.info</font></u></a><font size="6" face="Times New Roman"> = !{!{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}}<br>-// TCHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}<br>+// TCHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:-?[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}<br>// TCHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SDD2Ev", i32 210, i32 13, i32 {{[0-9]}}+}<br>// TCHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SEC2Ev", i32 226, i32 13, i32 {{[0-9]}}+}<br>// TCHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SED2Ev", i32 232, i32 13, i32 {{[0-9]}}+}<br><br>Modified: cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp?rev=256854&r1=256853&r2=256854&view=diff" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp?rev=256854&r1=256853&r2=256854&view=diff</font></u></a><font size="6" face="Times New Roman"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp Tue Jan 5 12:02:24 2016<br>@@ -57,10 +57,10 @@ int nested(int a){<br><br>// Check metadata is properly generated:<br>// CHECK: !</font><a href="http://omp_offload.info/" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">omp_offload.info</font></u></a><font size="6" face="Times New Roman"> = !{!{{[0-9]+}}, !{{[0-9]+}}}<br>-// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}<br>-// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}<br>+// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}<br>+// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}<br><br>// TCHECK: !</font><a href="http://omp_offload.info/" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">omp_offload.info</font></u></a><font size="6" face="Times New Roman"> = !{!{{[0-9]+}}, !{{[0-9]+}}}<br>-// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}<br>-// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}<br>+// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}<br>+// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}<br>#endif<br><br><br>_______________________________________________<br>cfe-commits mailing list</font><u><font size="4" color="#0000FF" face="Times New Roman"><br></font></u><a href="mailto:cfe-commits@lists.llvm.org"><u><font size="6" color="#0000FF" face="Times New Roman">cfe-commits@lists.llvm.org</font></u></a><u><font size="4" color="#0000FF" face="Times New Roman"><br></font></u><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank"><u><font size="6" color="#0000FF" face="Times New Roman">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</font></u></a></ul></ul></ul></ul><font size="5" face="Times New Roman"><br></font><font size="6" face="Times New Roman"><br><br>-- <br>--Artem Belevich[attachment "0001-Avoid-side-effect-in-function-call.patch" deleted by Samuel F Antao/Watson/IBM] </font><br><BR>
</body></html>