From aaffff87dc28c6cb3f08569d3164245fb92498c1 Mon Sep 17 00:00:00 2001 From: Erick Ochoa Date: Wed, 13 May 2020 15:11:33 +0200 Subject: renames hello-world pass to escape-analysis --- build.sh | 12 ++++++------ gcc/common.opt | 4 ++-- gcc/ipa-hello-world.c | 16 ++++++++-------- gcc/passes.def | 2 +- gcc/testsuite/gcc.dg/ipa/type-playground-00.c | 4 ++-- gcc/testsuite/gcc.dg/ipa/type-playground-01.c | 4 ++-- gcc/testsuite/gcc.dg/ipa/type-playground-02.c | 4 ++-- gcc/testsuite/gcc.dg/ipa/type-playground-03.c | 4 ++-- gcc/testsuite/gcc.dg/ipa/type-playground-04.c | 4 ++-- gcc/tree-pass.h | 2 +- test.sh | 3 --- 11 files changed, 28 insertions(+), 31 deletions(-) delete mode 100755 test.sh diff --git a/build.sh b/build.sh index ab3ed67cc9c..f1ebba3e23c 100755 --- a/build.sh +++ b/build.sh @@ -3,13 +3,13 @@ set -e set -u -installdir=${1:-"gcc-inst"} -mkdir -p $HOME/code/gcc-build/ -mkdir -p $HOME/code/${installdir}/ -pushd $HOME/code/gcc-build/ -$OLDPWD/configure --disable-bootstrap --disable-libsanitizer --enable-__cxa_atexit --enable-shared --disable-libsanitizer --enable-languages=c,c++,fortran --enable-lto --enable-gold --enable-linker-build-id --with-cpu-emag --prefix="$HOME/code/${installdir}/" +suffix=${1:-""} +mkdir -p $HOME/code/gcc-build${suffix}/ +mkdir -p $HOME/code/gcc-inst${suffix}/ +pushd $HOME/code/gcc-build${suffix}/ +$OLDPWD/configure --disable-bootstrap --disable-libsanitizer --enable-__cxa_atexit --enable-shared --disable-libsanitizer --enable-languages=c,c++,fortran --enable-lto --enable-gold --enable-linker-build-id --with-cpu-emag --prefix="$HOME/code/gcc-inst${suffix}/" make -j `nproc` make install -j `nproc` -${OLDPWD}/test.sh +make check-gcc RUNTESTFLAGS="ipa.exp" popd diff --git a/gcc/common.opt b/gcc/common.opt index 4c97d6dda5f..5c626286a16 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3413,8 +3413,8 @@ fipa-ra Common Report Var(flag_ipa_ra) Optimization Use caller save register across calls if possible. -fipa-hello-world -Common Report Var(flag_ipa_hello_world) Optimization +fipa-escape-analysis +Common Report Var(flag_ipa_escape_analysis) Optimization TBD ftp-types-compared= diff --git a/gcc/ipa-hello-world.c b/gcc/ipa-hello-world.c index 8aa305f8812..678faed9f1f 100644 --- a/gcc/ipa-hello-world.c +++ b/gcc/ipa-hello-world.c @@ -265,10 +265,10 @@ iphw_execute() } namespace { -const pass_data pass_data_ipa_hello_world = +const pass_data pass_data_ipa_escape_analysis = { SIMPLE_IPA_PASS, - "hello-world", + "escape-analysis", OPTGROUP_NONE, TV_NONE, (PROP_cfg | PROP_ssa), @@ -278,20 +278,20 @@ const pass_data pass_data_ipa_hello_world = 0, }; -class pass_ipa_hello_world : public simple_ipa_opt_pass +class pass_ipa_escape_analysis : public simple_ipa_opt_pass { public: - pass_ipa_hello_world (gcc::context *ctx) - : simple_ipa_opt_pass(pass_data_ipa_hello_world, ctx) + pass_ipa_escape_analysis (gcc::context *ctx) + : simple_ipa_opt_pass(pass_data_ipa_escape_analysis, ctx) {} - virtual bool gate(function*) { return flag_ipa_hello_world; } + virtual bool gate(function*) { return flag_ipa_escape_analysis; } virtual unsigned execute (function*) { return iphw_execute(); } }; } // anon namespace simple_ipa_opt_pass* -make_pass_ipa_hello_world (gcc::context *ctx) +make_pass_ipa_escape_analysis (gcc::context *ctx) { - return new pass_ipa_hello_world (ctx); + return new pass_ipa_escape_analysis (ctx); } diff --git a/gcc/passes.def b/gcc/passes.def index 66f333f81dc..853e512e227 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -149,7 +149,7 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_ipa_profile); NEXT_PASS (pass_ipa_icf); NEXT_PASS (pass_ipa_devirt); - NEXT_PASS (pass_ipa_hello_world); + NEXT_PASS (pass_ipa_escape_analysis); NEXT_PASS (pass_ipa_cp); NEXT_PASS (pass_ipa_sra); NEXT_PASS (pass_ipa_cdtor_merge); diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-00.c b/gcc/testsuite/gcc.dg/ipa/type-playground-00.c index 708b4d9d785..6bddfac9939 100644 --- a/gcc/testsuite/gcc.dg/ipa/type-playground-00.c +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-00.c @@ -1,5 +1,5 @@ /* { dg-do link } */ -/* { dg-options "-flto -fipa-hello-world -fdump-ipa-hello-world -ftp-comparison-functions=EQ_POINTER -ftp-types-compared=int " } */ +/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_POINTER -ftp-types-compared=int " } */ int main () @@ -17,5 +17,5 @@ main () // evaluates to false -/* { dg-final { scan-wpa-ipa-dump "0,32:integer_type x 0,32:integer_type = t," "hello-world" } } */ +/* { dg-final { scan-wpa-ipa-dump "0,32:integer_type x 0,32:integer_type = t," "escape-analysis" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-01.c b/gcc/testsuite/gcc.dg/ipa/type-playground-01.c index 4abd3aa6161..f85ecc13ef1 100644 --- a/gcc/testsuite/gcc.dg/ipa/type-playground-01.c +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-01.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-flto -fipa-hello-world -fdump-ipa-hello-world -ftp-comparison-functions=EQ_STRUCTURAL -ftp-types-compared=astruct_s" } */ +/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_STRUCTURAL -ftp-types-compared=astruct_s" } */ struct astruct_s { struct astruct_s* a; @@ -16,4 +16,4 @@ main(int argc, char* argv) // 0,64:astruct_s {0,64:astruct_s {}*;} x 0,0:astruct_s {} = f, // I am not an expert on regex -/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "hello-world" } } */ +/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "escape-analysis" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-02.c b/gcc/testsuite/gcc.dg/ipa/type-playground-02.c index e45f0ae7038..128dc8f3b82 100644 --- a/gcc/testsuite/gcc.dg/ipa/type-playground-02.c +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-02.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-flto -fipa-hello-world -fdump-ipa-hello-world -ftp-comparison-functions=EQ_MAIN_VARIANT -ftp-types-compared=astruct_s" } */ +/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_MAIN_VARIANT -ftp-types-compared=astruct_s" } */ struct astruct_s { struct astruct_s* a; @@ -16,4 +16,4 @@ main(int argc, char* argv) // 0,64:astruct_s {0,64:astruct_s {}*;} x 0,0:astruct_s {} = f, // I am not an expert on regex -/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "hello-world" } } */ +/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "escape-analysis" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-03.c b/gcc/testsuite/gcc.dg/ipa/type-playground-03.c index 515215aefae..4ffe949f826 100644 --- a/gcc/testsuite/gcc.dg/ipa/type-playground-03.c +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-03.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-flto -fipa-hello-world -fdump-ipa-hello-world -ftp-comparison-functions=EQ_IDENTIFIER -ftp-types-compared=astruct_s" } */ +/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_IDENTIFIER -ftp-types-compared=astruct_s" } */ struct astruct_s { struct astruct_s* a; @@ -22,4 +22,4 @@ main(int argc, char* argv) // 0,64:astruct_s {0,64:astruct_s {}*;} x 0,0:astruct_s {} = t, // I am not an expert on regex -/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = t," "hello-world" } } */ +/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = t," "escape-analysis" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-04.c b/gcc/testsuite/gcc.dg/ipa/type-playground-04.c index ba1f7361c92..7b490f6eca3 100644 --- a/gcc/testsuite/gcc.dg/ipa/type-playground-04.c +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-04.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-flto -fipa-hello-world -fdump-ipa-hello-world -ftp-comparison-functions=EQ_CANONICAL -ftp-types-compared=astruct_s" } */ +/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_CANONICAL -ftp-types-compared=astruct_s" } */ struct astruct_s { struct astruct_s* a; @@ -22,4 +22,4 @@ main(int argc, char* argv) // 0,64:astruct_s {0,64:astruct_s {}*;} x 0,0:astruct_s {} = f, // I am not an expert on regex -/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "hello-world" } } */ +/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "escape-analysis" } } */ diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 377dda689cc..a35ac21d324 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -501,7 +501,7 @@ extern ipa_opt_pass_d *make_pass_ipa_fn_summary (gcc::context *ctxt); extern ipa_opt_pass_d *make_pass_ipa_inline (gcc::context *ctxt); extern simple_ipa_opt_pass *make_pass_ipa_free_lang_data (gcc::context *ctxt); extern simple_ipa_opt_pass *make_pass_ipa_free_fn_summary (gcc::context *ctxt); -extern simple_ipa_opt_pass *make_pass_ipa_hello_world (gcc::context *ctxt); +extern simple_ipa_opt_pass *make_pass_ipa_escape_analysis (gcc::context *ctxt); extern ipa_opt_pass_d *make_pass_ipa_cp (gcc::context *ctxt); extern ipa_opt_pass_d *make_pass_ipa_sra (gcc::context *ctxt); extern ipa_opt_pass_d *make_pass_ipa_icf (gcc::context *ctxt); diff --git a/test.sh b/test.sh deleted file mode 100755 index d649022ea72..00000000000 --- a/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -pushd ${HOME}/code/gcc-build -make check-gcc RUNTESTFLAGS="ipa.exp" -popd -- cgit v1.2.3