Re: SRA generates uninitialized var use

2011-06-23 Thread Martin Jambor
Hi, On Mon, Jun 20, 2011 at 10:47:58PM +0200, Richard Guenther wrote: > On Mon, Jun 20, 2011 at 6:15 PM, Xinliang David Li wrote: > > It is used to indicate the fact the var decl needs to have a memory > > home (addressable) -- is there another way to do this? this is to > > avoid the following s

Re: SRA generates uninitialized var use

2011-06-22 Thread Martin Jambor
Hi, On Tue, Jun 21, 2011 at 06:08:27PM +0200, Richard Guenther wrote: > On Tue, Jun 21, 2011 at 5:51 PM, Xinliang David Li wrote: > > On Tue, Jun 21, 2011 at 1:42 AM, Richard Guenther > > wrote: > >> On Tue, Jun 21, 2011 at 1:28 AM, Xinliang David Li > >> wrote: > >>> Good point -- but why doe

Re: SRA generates uninitialized var use

2011-06-21 Thread Richard Guenther
On Tue, Jun 21, 2011 at 5:51 PM, Xinliang David Li wrote: > On Tue, Jun 21, 2011 at 1:42 AM, Richard Guenther > wrote: >> On Tue, Jun 21, 2011 at 1:28 AM, Xinliang David Li >> wrote: >>> Good point -- but why does SRA have to be so complicated? If it just >>> do structure expansion and let subs

Re: SRA generates uninitialized var use

2011-06-21 Thread Xinliang David Li
On Tue, Jun 21, 2011 at 1:42 AM, Richard Guenther wrote: > On Tue, Jun 21, 2011 at 1:28 AM, Xinliang David Li wrote: >> Good point -- but why does SRA have to be so complicated? If it just >> do structure expansion and let subsequent phases to clean it up, would >> it be simpler? Anyway this is o

Re: SRA generates uninitialized var use

2011-06-21 Thread Richard Guenther
On Tue, Jun 21, 2011 at 1:28 AM, Xinliang David Li wrote: > Good point -- but why does SRA have to be so complicated? If it just > do structure expansion and let subsequent phases to clean it up, would > it be simpler? Anyway this is off the topic. Well, it's certainly non-optimal to insert new m

Re: SRA generates uninitialized var use

2011-06-20 Thread Xinliang David Li
Good point -- but why does SRA have to be so complicated? If it just do structure expansion and let subsequent phases to clean it up, would it be simpler? Anyway this is off the topic. Thanks, David On Mon, Jun 20, 2011 at 1:47 PM, Richard Guenther wrote: > On Mon, Jun 20, 2011 at 6:15 PM, Xin

Re: SRA generates uninitialized var use

2011-06-20 Thread Richard Guenther
On Mon, Jun 20, 2011 at 6:15 PM, Xinliang David Li wrote: > It is used to indicate the fact the var decl needs to have a memory > home (addressable) -- is there another way to do this? this is to > avoid the following situation: > > 1) after SRA before update SSA, the IR looks like: > >   MEM[

Re: SRA generates uninitialized var use

2011-06-20 Thread Xinliang David Li
It is used to indicate the fact the var decl needs to have a memory home (addressable) -- is there another way to do this? this is to avoid the following situation: 1) after SRA before update SSA, the IR looks like: MEM[ &SR_123] = ... other_var = SR_123; < (x) In this case, SR

Re: SRA generates uninitialized var use

2011-06-20 Thread Richard Guenther
On Sat, Jun 18, 2011 at 10:56 AM, Xinliang David Li wrote: > Compiling the test case in the patch with -O2 -m32 without the fix, > the program will abort. The problem is a var decl whose address is > taken is not marked as addressable leading to bad SSA update (missing > VUSE).  (the triaging used

Re: SRA generates uninitialized var use

2011-06-19 Thread Xinliang David Li
Bootstrap and tested on linux/x86_64. Ok for trunk? David On Sat, Jun 18, 2011 at 1:56 AM, Xinliang David Li wrote: > Compiling the test case in the patch with -O2 -m32 without the fix, > the program will abort. The problem is a var decl whose address is > taken is not marked as addressable le

SRA generates uninitialized var use

2011-06-18 Thread Xinliang David Li
Compiling the test case in the patch with -O2 -m32 without the fix, the program will abort. The problem is a var decl whose address is taken is not marked as addressable leading to bad SSA update (missing VUSE). (the triaging used the the .after and .after_cleanup dump diff and found the problem).