For 'OMP_CLAUSE' in 'dump_generic_node', dump the whole OMP clause chain

Thomas Schwinge thomas@codesourcery.com
Fri Jun 11 14:04:35 GMT 2021


Hi!

See attached.  OK to push after testing -- or would there ever be a
reason where this is not appropriate?


For example, for 'gcc.dg/gomp/simd-clones-2.c', this changes ("corrects")
the '*.optimized' dump file as follows:

    @@ -1,7 +1,7 @@

     ;; Function addit (addit, funcdef_no=0, decl_uid=2073, cgraph_uid=1, symbol_order=0)

    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     int addit (int a, int b, int * c)
     {
       int _3;
    @@ -16,7 +16,7 @@ int addit (int a, int b, int * c)

     ;; Function setArray (setArray, funcdef_no=1, decl_uid=2078, cgraph_uid=2, symbol_order=1)

    -__attribute__((omp declare simd (notinbranch)))
    +__attribute__((omp declare simd (notinbranch uniform(0) aligned(0:32) linear(2:1))))
     float setArray (float * a, float x, int k)
     {
       long unsigned int _1;
    @@ -40,7 +40,7 @@ float setArray (float * a, float x, int k)

     ;; Function setArray.simdclone.0 (_ZGVbN4ua32vl_setArray, funcdef_no=2, decl_uid=2089, cgraph_uid=3, symbol_order=2)

    -__attribute__((omp declare simd (notinbranch)))
    +__attribute__((omp declare simd (notinbranch uniform(0) aligned(0:32) linear(2:1))))
     vector(4) float setArray.simdclone.0 (float * a, vector(4) float simd.4, int k)
     {
       vector(4) float vect__8.86;
    @@ -65,7 +65,7 @@ vector(4) float setArray.simdclone.0 (float * a, vector(4) float simd.4, int k)

     ;; Function setArray.simdclone.1 (_ZGVcN8ua32vl_setArray, funcdef_no=3, decl_uid=2100, cgraph_uid=5, symbol_order=4)

    -__attribute__((omp declare simd (notinbranch)))
    +__attribute__((omp declare simd (notinbranch uniform(0) aligned(0:32) linear(2:1))))
     vector(8) float setArray.simdclone.1 (float * a, vector(8) float simd.8, int k)
     {
       vector(8) float vect__8.98;
    @@ -90,7 +90,7 @@ vector(8) float setArray.simdclone.1 (float * a, vector(8) float simd.8, int k)

     ;; Function setArray.simdclone.2 (_ZGVdN8ua32vl_setArray, funcdef_no=4, decl_uid=2372, cgraph_uid=6, symbol_order=5)

    -__attribute__((omp declare simd (notinbranch)))
    +__attribute__((omp declare simd (notinbranch uniform(0) aligned(0:32) linear(2:1))))
     vector(8) float setArray.simdclone.2 (float * a, vector(8) float simd.12, int k)
     {
       vector(8) float vect__8.110;
    @@ -115,7 +115,7 @@ vector(8) float setArray.simdclone.2 (float * a, vector(8) float simd.12, int k)

     ;; Function setArray.simdclone.3 (_ZGVeN16ua32vl_setArray, funcdef_no=5, decl_uid=2558, cgraph_uid=7, symbol_order=6)

    -__attribute__((omp declare simd (notinbranch)))
    +__attribute__((omp declare simd (notinbranch uniform(0) aligned(0:32) linear(2:1))))
     vector(16) float setArray.simdclone.3 (float * a, vector(16) float simd.16, int k)
     {
       vector(16) float vect__8.122;
    @@ -140,7 +140,7 @@ vector(16) float setArray.simdclone.3 (float * a, vector(16) float simd.16, int

     ;; Function addit.simdclone.0 (_ZGVbN4vvva32_addit, funcdef_no=6, decl_uid=3029, cgraph_uid=8, symbol_order=7)

    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(4) int addit.simdclone.0 (vector(4) int simd.22, vector(4) int simd.23, vector(2) unsigned long simd.24, vector(2) unsigned long simd.25)
     {
       vector(4) int vect__3.134;
    @@ -155,7 +155,7 @@ vector(4) int addit.simdclone.0 (vector(4) int simd.22, vector(4) int simd.23, v

     ;; Function addit.simdclone.1 (_ZGVcN4vvva32_addit, funcdef_no=7, decl_uid=3046, cgraph_uid=9, symbol_order=8)

    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(4) int addit.simdclone.1 (vector(4) int simd.31, vector(4) int simd.32, vector(2) unsigned long simd.33, vector(2) unsigned long simd.34)
     {
       vector(4) int vect__3.144;
    @@ -170,7 +170,7 @@ vector(4) int addit.simdclone.1 (vector(4) int simd.31, vector(4) int simd.32, v

     ;; Function addit.simdclone.2 (_ZGVdN8vvva32_addit, funcdef_no=8, decl_uid=3063, cgraph_uid=10, symbol_order=9)

    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(8) int addit.simdclone.2 (vector(8) int simd.40, vector(8) int simd.41, vector(4) unsigned long simd.42, vector(4) unsigned long simd.43)
     {
       vector(8) int vect__3.154;
    @@ -185,7 +185,7 @@ vector(8) int addit.simdclone.2 (vector(8) int simd.40, vector(8) int simd.41, v

     ;; Function addit.simdclone.3 (_ZGVeN16vvva32_addit, funcdef_no=9, decl_uid=3080, cgraph_uid=11, symbol_order=10)

    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(16) int addit.simdclone.3 (vector(16) int simd.49, vector(16) int simd.50, vector(8) unsigned long simd.51, vector(8) unsigned long simd.52)
     {
       vector(16) int vect__3.164;
    @@ -202,7 +202,7 @@ vector(16) int addit.simdclone.3 (vector(16) int simd.49, vector(16) int simd.50

     Removing basic block 7
     Removing basic block 8
    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(4) int addit.simdclone.4 (vector(4) int simd.57, int b, int * c, vector(4) int mask.58)
     {
       sizetype ivtmp.180;
    @@ -251,7 +251,7 @@ vector(4) int addit.simdclone.4 (vector(4) int simd.57, int b, int * c, vector(4

     Removing basic block 7
     Removing basic block 8
    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(4) int addit.simdclone.5 (vector(4) int simd.63, int b, int * c, vector(4) int mask.64)
     {
       sizetype ivtmp.195;
    @@ -299,7 +299,7 @@ vector(4) int addit.simdclone.5 (vector(4) int simd.63, int b, int * c, vector(4
     ;; Function addit.simdclone.6 (_ZGVdM8vl66u_addit, funcdef_no=12, decl_uid=3125, cgraph_uid=14, symbol_order=13)

     Removing basic block 5
    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(8) int addit.simdclone.6 (vector(8) int simd.69, int b, int * c, vector(8) int mask.70)
     {
       vector(8) <signed-boolean:32> mask__35.206;
    @@ -335,7 +335,7 @@ vector(8) int addit.simdclone.6 (vector(8) int simd.69, int b, int * c, vector(8
     ;; Function addit.simdclone.7 (_ZGVeM16vl66u_addit, funcdef_no=13, decl_uid=3139, cgraph_uid=15, symbol_order=14)

     Removing basic block 5
    -__attribute__((omp declare simd (notinbranch), omp declare simd (inbranch)))
    +__attribute__((omp declare simd (notinbranch aligned(2:32)), omp declare simd (inbranch uniform(2) linear(1:66))))
     vector(16) int addit.simdclone.7 (vector(16) int simd.74, int b, int * c, unsigned int mask.75)
     {
       vector(16) <signed-boolean:1> mask__36.219;


Grüße
 Thomas


-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-For-OMP_CLAUSE-in-dump_generic_node-dump-the-whole-O.patch
Type: text/x-diff
Size: 4646 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210611/c2ff6a13/attachment-0001.bin>


More information about the Gcc-patches mailing list