summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-05-15 10:50:54 +0200
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-09-08 08:59:06 +0200
commit25c0df2a964e843eae54b06d255e666bf423d241 (patch)
tree38adb75234fe0ee3fb7dbb51bd69ac71cd3c813e
parentd8ddee60a6dfe75d4815b754fbef9eaecdef9b34 (diff)
Renames escape analysis to type playground
-rw-r--r--gcc/Makefile.in1
-rw-r--r--gcc/common.opt3
-rw-r--r--gcc/ipa-type-collector.c (renamed from gcc/ipa-escape-analysis.c)18
-rw-r--r--gcc/ipa-type-collector.h (renamed from gcc/ipa-escape-analysis.h)0
-rw-r--r--gcc/passes.def1
-rw-r--r--gcc/testsuite/gcc.dg/ipa/type-playground-00.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/type-playground-01.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/type-playground-02.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/type-playground-03.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/type-playground-04.c4
-rw-r--r--gcc/tree-pass.h1
11 files changed, 25 insertions, 19 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 7bb373a8451..5a7f6a26bfd 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1411,6 +1411,7 @@ OBJS = \
ipa-type-escape-analysis.o \
ipa-hello-world.o \
ipa-escape-analysis.o \
+ ipa-type-collector.o \
compare-types.o \
collect-types.o \
name-types.o \
diff --git a/gcc/common.opt b/gcc/common.opt
index c8b64314710..de8159ccb15 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -3482,6 +3482,9 @@ Hello world
fipa-escape-analysis
Common Report Var(flag_ipa_escape_analysis) Optimization
+
+fipa-type-collector
+Common Report Var(flag_ipa_type_collector) Optimization
TBD
ftp-types-compared=
diff --git a/gcc/ipa-escape-analysis.c b/gcc/ipa-type-collector.c
index cdc249e55fb..69a3abac95a 100644
--- a/gcc/ipa-escape-analysis.c
+++ b/gcc/ipa-type-collector.c
@@ -36,7 +36,7 @@
#include "collect-types.h"
#include "name-types.h"
-#include "ipa-escape-analysis.h"
+#include "ipa-type-collector.h"
//#define FUZZ_MODE 1
@@ -816,10 +816,10 @@ iphw_execute()
}
namespace {
-const pass_data pass_data_ipa_escape_analysis =
+const pass_data pass_data_ipa_type_collector =
{
SIMPLE_IPA_PASS,
- "escape-analysis",
+ "type-collector",
OPTGROUP_NONE,
TV_NONE,
(PROP_cfg | PROP_ssa),
@@ -829,20 +829,20 @@ const pass_data pass_data_ipa_escape_analysis =
0,
};
-class pass_ipa_escape_analysis : public simple_ipa_opt_pass
+class pass_ipa_type_collector : public simple_ipa_opt_pass
{
public:
- pass_ipa_escape_analysis (gcc::context *ctx)
- : simple_ipa_opt_pass(pass_data_ipa_escape_analysis, ctx)
+ pass_ipa_type_collector (gcc::context *ctx)
+ : simple_ipa_opt_pass(pass_data_ipa_type_collector, ctx)
{}
- virtual bool gate(function*) { return flag_ipa_escape_analysis; }
+ virtual bool gate(function*) { return flag_ipa_type_collector; }
virtual unsigned execute (function*) { return iphw_execute(); }
};
} // anon namespace
simple_ipa_opt_pass*
-make_pass_ipa_escape_analysis (gcc::context *ctx)
+make_pass_ipa_type_collector (gcc::context *ctx)
{
- return new pass_ipa_escape_analysis (ctx);
+ return new pass_ipa_type_collector (ctx);
}
diff --git a/gcc/ipa-escape-analysis.h b/gcc/ipa-type-collector.h
index 16611c2db56..16611c2db56 100644
--- a/gcc/ipa-escape-analysis.h
+++ b/gcc/ipa-type-collector.h
diff --git a/gcc/passes.def b/gcc/passes.def
index 931eb766e44..5f1e15c4a66 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -153,6 +153,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_ipa_type_escape_analysis);
NEXT_PASS (pass_ipa_hello_world);
NEXT_PASS (pass_ipa_escape_analysis);
+ NEXT_PASS (pass_ipa_type_collector);
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 6bddfac9939..8a38de1dbfb 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-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_POINTER -ftp-types-compared=int " } */
+/* { dg-options "-flto -fipa-type-collector -fdump-ipa-type-collector -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," "escape-analysis" } } */
+/* { dg-final { scan-wpa-ipa-dump "0,32:integer_type x 0,32:integer_type = t," "type-collector" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-01.c b/gcc/testsuite/gcc.dg/ipa/type-playground-01.c
index f85ecc13ef1..d8c69aef4db 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-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_STRUCTURAL -ftp-types-compared=astruct_s" } */
+/* { dg-options "-flto -fipa-type-collector -fdump-ipa-type-collector -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," "escape-analysis" } } */
+/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "type-collector" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-02.c b/gcc/testsuite/gcc.dg/ipa/type-playground-02.c
index 128dc8f3b82..1101bb51d8a 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-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_MAIN_VARIANT -ftp-types-compared=astruct_s" } */
+/* { dg-options "-flto -fipa-type-collector -fdump-ipa-type-collector -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," "escape-analysis" } } */
+/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "type-collector" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-03.c b/gcc/testsuite/gcc.dg/ipa/type-playground-03.c
index 4ffe949f826..5de12a31158 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-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_IDENTIFIER -ftp-types-compared=astruct_s" } */
+/* { dg-options "-flto -fipa-type-collector -fdump-ipa-type-collector -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," "escape-analysis" } } */
+/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = t," "type-collector" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-04.c b/gcc/testsuite/gcc.dg/ipa/type-playground-04.c
index 7b490f6eca3..f6f32c09d4f 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-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_CANONICAL -ftp-types-compared=astruct_s" } */
+/* { dg-options "-flto -fipa-type-collector -fdump-ipa-type-collector -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," "escape-analysis" } } */
+/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "type-collector" } } */
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 5959c25c372..a8996559d54 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -504,6 +504,7 @@ extern simple_ipa_opt_pass *make_pass_ipa_free_fn_summary (gcc::context *ctxt);
extern simple_ipa_opt_pass *make_pass_ipa_type_escape_analysis (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 simple_ipa_opt_pass *make_pass_ipa_type_collector (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);