diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-07-11 14:39:14 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-07-11 14:39:14 +0000 |
commit | 9e34db2e031f28f7cc622b6955c241b47bbc081e (patch) | |
tree | 21b739dd274b2a95675872c3a30088a41bbab009 /gcc/function-tests.c | |
parent | f51606c71ab31d906d499108b1a2b8d8e45d9e06 (diff) | |
download | gcc-9e34db2e031f28f7cc622b6955c241b47bbc081e.tar.gz |
Support running the selftests under valgrind
gcc/ChangeLog:
* Makefile.in (selftest-valgrind): New phony target.
* function-tests.c (selftest::build_cfg): Delete pass instances
created by the test.
(selftest::convert_to_ssa): Likewise.
(selftest::test_expansion_to_rtl): Likewise.
* tree-cfg.c (selftest::test_linear_chain): Release dominator
vectors.
(selftest::test_diamond): Likewise.
From-SVN: r238209
Diffstat (limited to 'gcc/function-tests.c')
-rw-r--r-- | gcc/function-tests.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/function-tests.c b/gcc/function-tests.c index c8188e769fa..edd355fa153 100644 --- a/gcc/function-tests.c +++ b/gcc/function-tests.c @@ -296,6 +296,7 @@ build_cfg (tree fndecl) push_cfun (fun); lower_cf_pass->execute (fun); pop_cfun (); + delete lower_cf_pass; /* We can now convert to CFG form; for our trivial test function this gives us: @@ -310,6 +311,7 @@ build_cfg (tree fndecl) push_cfun (fun); build_cfg_pass->execute (fun); pop_cfun (); + delete build_cfg_pass; } /* Convert a gimple+CFG function to SSA form. */ @@ -325,6 +327,7 @@ convert_to_ssa (tree fndecl) push_cfun (fun); build_ssa_pass->execute (fun); pop_cfun (); + delete build_ssa_pass; } /* Assuming we have a simple 3-block CFG like this: @@ -594,6 +597,7 @@ test_expansion_to_rtl () init_function_start (fndecl); expand_pass->execute (fun); pop_cfun (); + delete expand_pass; /* On x86_64, I get this: (note 3 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK) |