Put pass_sancov_O0 before pass_lower_switch with -O0 (PR sanitizer/82183).

Message ID 58d690e5-15b9-6065-6bae-a37deca1a20e@suse.cz
State New
Headers show
Series
  • Put pass_sancov_O0 before pass_lower_switch with -O0 (PR sanitizer/82183).
Related show

Commit Message

Martin Liška Feb. 19, 2018, 9:11 a.m.
Hi.

Sorry that it took me quite some time. The patch puts sancov pass before switch
lowering on -O0.

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
The test-case now works on aarch64.

Ready to be installed?
Martin

gcc/ChangeLog:

2018-02-16  Martin Liska  <mliska@suse.cz>

	PR sanitizer/82183
	* passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
---
 gcc/passes.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law Feb. 19, 2018, 4:49 p.m. | #1
On 02/19/2018 02:11 AM, Martin Liška wrote:
> Hi.

> 

> Sorry that it took me quite some time. The patch puts sancov pass before switch

> lowering on -O0.

> 

> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

> The test-case now works on aarch64.

> 

> Ready to be installed?

> Martin

> 

> gcc/ChangeLog:

> 

> 2018-02-16  Martin Liska  <mliska@suse.cz>

> 

> 	PR sanitizer/82183

> 	* passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.

OK.
jeff

Patch

diff --git a/gcc/passes.def b/gcc/passes.def
index 9802f08ecfc..3ebcfc30349 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -397,8 +397,8 @@  along with GCC; see the file COPYING3.  If not see
   NEXT_PASS (pass_lower_vaarg);
   NEXT_PASS (pass_lower_vector);
   NEXT_PASS (pass_lower_complex_O0);
-  NEXT_PASS (pass_lower_switch);
   NEXT_PASS (pass_sancov_O0);
+  NEXT_PASS (pass_lower_switch);
   NEXT_PASS (pass_asan_O0);
   NEXT_PASS (pass_tsan_O0);
   NEXT_PASS (pass_sanopt);