Hi Martin,

> On 05/18/2018 03:55 PM, Rainer Orth wrote:
>> Hi Martin,
>> 
>>> So the patch looks fine, only very very slightly binary is produced. I'm
>>> going to install the patch so that
>>> I can carry on more complex patches based on this one.
>> 
>> it seems you didn't properly test the testsuite part: I see
>> 
>> +UNRESOLVED: gcc.dg/tree-prof/update-loopch.c scan-tree-dump switchlower
>> "Removing basic block"
>> +UNRESOLVED: gcc.dg/tree-prof/update-loopch.c scan-tree-dump switchlower
>> "loop depth 1, count 33333"
>> +UNRESOLVED: gcc.dg/tree-prof/update-loopch.c scan-tree-dump-not
>> switchlower "Invalid sum"
>> +UNRESOLVED: gcc.dg/tree-prof/update-loopch.c scan-tree-dump-not
>> switchlower "loop depth 1, count 33332"
>> 
>> everywhere.  The log has
>> 
>> gcc.dg/tree-prof/update-loopch.c: dump file does not exist
>> 
>> Obviously you forgot the adapt the dg-final* files for the dumpfile
>> name.  If I do, three of the failures go away, but
>> 
>> FAIL: gcc.dg/tree-prof/update-loopch.c scan-tree-dump switchlower1
>> "Removing basic block"
>> 
>> remains (on 32 and 64-bit Linux/x86_64).
>> 
>> Please fix.
>> 
>>      Rainer
>> 
>
> Thanks for opened eyes, following patch will fix that.
> It's quite obvious, I'll install it right after tests will finish.

unfortunately, it didn't fix either issue:

* The switchlower -> switchlower1 renames in the dg-final* lines
  (attached) are still necessary to avoid the UNRESOLVED errors.
  Although obvious, I haven't installed them since ...

* ... even so

FAIL: gcc.dg/tree-prof/update-loopch.c scan-tree-dump switchlower1 "Removing 
basic block"

  remains.

        Rainer


> From 7ae0c7d4a81166dbf5e9dff5d35e4c9d63b1c058 Mon Sep 17 00:00:00 2001
> From: marxin <mli...@suse.cz>
> Date: Fri, 18 May 2018 16:17:57 +0200
> Subject: [PATCH] Remove redundand pass pass_lower_switch.
>
> gcc/ChangeLog:
>
> 2018-05-18  Martin Liska  <mli...@suse.cz>
>
>       * passes.def: Remove a redundant pass.
> ---
>  gcc/passes.def | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gcc/passes.def b/gcc/passes.def
> index 050009464ea..055d354f959 100644
> --- a/gcc/passes.def
> +++ b/gcc/passes.def
> @@ -399,9 +399,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_O0);
>    NEXT_PASS (pass_sancov_O0);
> -  NEXT_PASS (pass_lower_switch);
> +  NEXT_PASS (pass_lower_switch_O0);
>    NEXT_PASS (pass_asan_O0);
>    NEXT_PASS (pass_tsan_O0);
>    NEXT_PASS (pass_sanopt);

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


diff --git a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
--- a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
@@ -16,7 +16,7 @@ main ()
    edge.  */
 /* autofdo cannot do that precise counts */
 /* { dg-final-use-not-autofdo { scan-ipa-dump "loop depth 1, count 33334" "profile"} } */
-/* { dg-final-use-not-autofdo { scan-tree-dump "loop depth 1, count 33333" "switchlower"} } */
-/* { dg-final-use-not-autofdo { scan-tree-dump-not "loop depth 1, count 33332" "switchlower"} } */
-/* { dg-final-use-not-autofdo { scan-tree-dump "Removing basic block" "switchlower"} } */
-/* { dg-final-use { scan-tree-dump-not "Invalid sum" "switchlower"} } */
+/* { dg-final-use-not-autofdo { scan-tree-dump "loop depth 1, count 33333" "switchlower1"} } */
+/* { dg-final-use-not-autofdo { scan-tree-dump-not "loop depth 1, count 33332" "switchlower1"} } */
+/* { dg-final-use-not-autofdo { scan-tree-dump "Removing basic block" "switchlower1"} } */
+/* { dg-final-use { scan-tree-dump-not "Invalid sum" "switchlower1"} } */

Reply via email to