r256854 - [OpenMP] Allow file ID to be signed in the offloading metadata.

Samuel F Antao via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 05:48:45 PST 2016


The patch was reapplied in r256933 and includes the fixes for the different
regressions that were identified, including the one reported below.

Thanks for your help!
Samuel



From:	"Liao, Michael" <michael.liao at intel.com>
To:	Samuel F Antao/Watson/IBM at IBMUS
Cc:	cfe-commits <cfe-commits at lists.llvm.org>, Artem Belevich
            <tra at google.com>
Date:	01/05/2016 07:58 PM
Subject:	RE: r256854 - [OpenMP] Allow file ID to be signed in the
            offloading metadata.



Hi Samuel

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.

Thanks
- Michael

From: Samuel F Antao [mailto:sfantao at us.ibm.com]
Sent: Tuesday, January 5, 2016 4:25 PM
To: Liao, Michael <michael.liao at intel.com>
Cc: cfe-commits <cfe-commits at lists.llvm.org>; Artem Belevich
<tra at google.com>
Subject: RE: r256854 - [OpenMP] Allow file ID to be signed in the
offloading metadata.



Hi Michael,

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.

Thanks again!
Samuel

Inactive hide details for "Liao, Michael" ---01/05/2016 05:17:13 PM---Hi
Samual The change in CL#256842 has undefined behavior "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

From: "Liao, Michael" <michael.liao at intel.com>
To: Samuel F Antao/Watson/IBM at IBMUS, Artem Belevich <tra at google.com>
Cc: cfe-commits <cfe-commits at lists.llvm.org>
Date: 01/05/2016 05:17 PM
Subject: RE: r256854 - [OpenMP] Allow file ID to be signed in the
offloading metadata.




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>
To: Samuel F Antao/Watson/IBM at IBMUS
Cc: cfe-commits <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> 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
            = !{!{{[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
            = !{!{{[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 = !{!{{[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 = !{!{{[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
            http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



--
--Artem Belevich[attachment "0001-Avoid-side-effect-in-function-call.patch"
deleted by Samuel F Antao/Watson/IBM]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160106/490d5a21/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160106/490d5a21/attachment-0001.gif>


More information about the cfe-commits mailing list