[PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

Martin Liška mliska@suse.cz
Thu Aug 24 17:21:00 GMT 2017


On 08/18/2017 12:25 PM, Martin Liška wrote:
> On 08/18/2017 11:30 AM, Richard Biener wrote:
>> On Tue, Aug 15, 2017 at 2:37 PM, Martin Liška <mliska@suse.cz> wrote:
>>> On 08/14/2017 10:32 AM, Richard Biener wrote:
>>>> Hmm, but the existing "lowering" part is called from the
>>>> switch-conversion pass.  So
>>>> I'm not sure a new file is good.
>>>
>>> Good, I'm not against having that in a single file. So new version of the patch
>>> does that.
>>>
>>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>>
>>> Ready to be installed?
>>
>> Hmm, I see you duplicate add_case_node for example.  Is that just temporary?
>> If not can you please factor out the data structure and common code?
>> (case.[Ch]?)
> 
> You are right. As we'll generate just jump table in stmt.c the proper fix is to remove
> all usages of 'case_node' in the file because simple iteration of labels will work fine.
> Let me do it incrementally to minimize fall out :)

Hello.

So lesson learned. I should follow your recommendation and make the clean-up in stmt.c. I didn't
so adding new variant of case_node with a different size caused bootstrap failure on aarch64 and
it was quite hard to debug. So sending updated version of the patch which has cleaned up stmt.c.

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Same of aarch64-linux-gnu.

Ready to be installed?
Martin
> 
> Martin
> 
>>
>> Thanks,
>> Richard.
>>
>>> Martin
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-expansion-of-balanced-binary-trees-of-switches-.patch
Type: text/x-patch
Size: 86862 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170824/c4689453/attachment.bin>


More information about the Gcc-patches mailing list