r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.
Liao, Michael via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 5 14:17:01 PST 2016
Hi Samual
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.
Thanks
- Michael
From: cfe-commits [mailto:cfe-commits-bounces at lists.llvm.org] On Behalf Of Samuel F Antao via cfe-commits
Sent: Tuesday, January 5, 2016 10:57 AM
To: Artem Belevich <tra at google.com>
Cc: cfe-commits <cfe-commits at lists.llvm.org>
Subject: Re: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.
Hi Art,
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.
Sorry for the trouble,
Samuel
[Inactive hide details for Artem Belevich ---01/05/2016 01:54:02 PM---Samuel, The tests are still failing:]Artem Belevich ---01/05/2016 01:54:02 PM---Samuel, The tests are still failing:
From: Artem Belevich <tra at google.com<mailto:tra at google.com>>
To: Samuel F Antao/Watson/IBM at IBMUS
Cc: cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>>
Date: 01/05/2016 01:54 PM
Subject: Re: r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.
________________________________
Samuel,
The tests are still failing:
http://lab.llvm.org:8011/builders/clang-bpf-build/builds/5759
On Tue, Jan 5, 2016 at 10:02 AM, Samuel Antao via cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
Author: sfantao
Date: Tue Jan 5 12:02:24 2016
New Revision: 256854
URL: http://llvm.org/viewvc/llvm-project?rev=256854&view=rev
Log:
[OpenMP] Allow file ID to be signed in the offloading metadata.
This fixes a regression introduced by rL256842.
Modified:
cfe/trunk/test/OpenMP/target_codegen_registration.cpp
cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp
Modified: cfe/trunk/test/OpenMP/target_codegen_registration.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_codegen_registration.cpp?rev=256854&r1=256853&r2=256854&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_codegen_registration.cpp (original)
+++ cfe/trunk/test/OpenMP/target_codegen_registration.cpp Tue Jan 5 12:02:24 2016
@@ -407,7 +407,7 @@ int bar(int a){
// Check metadata is properly generated:
// CHECK: !omp_offload.info<http://omp_offload.info/> = !{!{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}}
-// CHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}
+// CHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:-?[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}
// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SDD2Ev", i32 210, i32 13, i32 {{[0-9]}}+}
// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SEC2Ev", i32 226, i32 13, i32 {{[0-9]}}+}
// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SED2Ev", i32 232, i32 13, i32 {{[0-9]}}+}
@@ -421,7 +421,7 @@ int bar(int a){
// CHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SCC2Ev", i32 185, i32 13, i32 {{[0-9]}}+}
// TCHECK: !omp_offload.info<http://omp_offload.info/> = !{!{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}, !{{[0-9]+}}}
-// TCHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}
+// TCHECK-DAG = !{i32 0, i32 [[DEVID:[0-9]+]], i32 [[FILEID:-?[0-9]+]], !"_ZN2SB3fooEv", i32 160, i32 13, i32 {{[0-9]}}+}
// TCHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SDD2Ev", i32 210, i32 13, i32 {{[0-9]}}+}
// TCHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SEC2Ev", i32 226, i32 13, i32 {{[0-9]}}+}
// TCHECK-DAG = !{i32 0, i32 [[DEVID]], i32 [[FILEID]] !"_ZN2SED2Ev", i32 232, i32 13, i32 {{[0-9]}}+}
Modified: cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp?rev=256854&r1=256853&r2=256854&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp (original)
+++ cfe/trunk/test/OpenMP/target_codegen_registration_naming.cpp Tue Jan 5 12:02:24 2016
@@ -57,10 +57,10 @@ int nested(int a){
// Check metadata is properly generated:
// CHECK: !omp_offload.info<http://omp_offload.info/> = !{!{{[0-9]+}}, !{{[0-9]+}}}
-// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}
-// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}
+// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}
+// CHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}
// TCHECK: !omp_offload.info<http://omp_offload.info/> = !{!{{[0-9]+}}, !{{[0-9]+}}}
-// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}
-// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}
+// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T1L]], i32 [[T1C]], i32 {{[0-9]+}}}
+// TCHECK-DAG: = !{i32 0, i32 {{[0-9]+}}, i32 {{-?[0-9]+}}, !"[[NNAME]]", i32 [[T2L]], i32 [[T2C]], i32 {{[0-9]+}}}
#endif
_______________________________________________
cfe-commits mailing list
cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
--
--Artem Belevich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160105/b66afab9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 105 bytes
Desc: image001.gif
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160105/b66afab9/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-side-effect-in-function-call.patch
Type: application/octet-stream
Size: 2005 bytes
Desc: 0001-Avoid-side-effect-in-function-call.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160105/b66afab9/attachment.obj>
More information about the cfe-commits
mailing list