Patchwork Cleanup tree-switch-conversion a bit

login
register
mail settings
Submitter Steven Bosscher
Date April 19, 2012, 3:13 p.m.
Message ID <CABu31nPihqLLJ5S0ViC7oeVxZYuTf2xtu3sefqbxDhUcEHtqRw@mail.gmail.com>
Download mbox | patch
Permalink /patch/153811/
State New
Headers show

Comments

Steven Bosscher - April 19, 2012, 3:13 p.m.
On Thu, Apr 19, 2012 at 4:55 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Apr 17, 2012 at 9:15 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>>> My goal for GCC 4.8 is to do just that: Move switch expansion to
>>> GIMPLE and add value profiling for switch expressions.
>>
>> And the idea is to put all that code in tree-switch-conversion.c. But
>> there are a few clean-ups I wish to do on that code before that.
>> First, there is a global pass info structure that contains useful data
>> for all forms of GIMPLE_SWITCH lowering. I've "un-globalized" that
>> data with the attached patch. While there, I made the dump messages
>> uniform.
>>
>> Bootstrapped and tested on powerpc-unknown-linux-gnu. OK?
>>
>
> I think it caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53043

Yes.

	* gcc.target/i386/pr45830.c: Update scan-tree-dump.

 /* { dg-final { scan-assembler-not "CSWTCH" } } */
 /* { dg-final { cleanup-tree-dump "switchconv" } } */

Patch

Index: gcc.target/i386/pr45830.c
===================================================================
--- gcc.target/i386/pr45830.c	(revision 186596)
+++ gcc.target/i386/pr45830.c	(working copy)
@@ -26,6 +26,6 @@  foo (int *a)
     }
 }

-/* { dg-final { scan-tree-dump "Expanding as bit test is preferable"
"switchconv" } } */
+/* { dg-final { scan-tree-dump "expanding as bit test is preferable"
"switchconv" } } */