This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] Radically simplify emission of balanced tree for switch statements.


On 05/21/2018 01:18 PM, Rainer Orth wrote:
> 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

Hi.

You are right, it's using -O2, thus your patch is right. Please install the patch 
after testing. It's obvious fix.

Martin

> 
> 
>> From 7ae0c7d4a81166dbf5e9dff5d35e4c9d63b1c058 Mon Sep 17 00:00:00 2001
>> From: marxin <mliska@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  <mliska@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);
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]