Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Andrew Pinski
On Wed, Feb 26, 2020 at 12:30 AM Richard Biener wrote: > > On Wed, 26 Feb 2020, luoxhu wrote: > > > On 2020/2/18 17:57, Richard Biener wrote: > > > On Tue, 18 Feb 2020, Xionghu Luo wrote: > > > > > >> Store-merging pass should run twice, the reason is pass fre/pre will do > > >> some kind of optim

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, Richard Biener wrote: > On Wed, 26 Feb 2020, luoxhu wrote: > > > On 2020/2/18 17:57, Richard Biener wrote: > > > On Tue, 18 Feb 2020, Xionghu Luo wrote: > > > > > >> Store-merging pass should run twice, the reason is pass fre/pre will do > > >> some kind of optimizations to

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Jakub Jelinek
On Wed, Feb 26, 2020 at 04:09:16PM +0800, luoxhu wrote: > Thanks Richard, not sure about my understanding and please correct if any. > > I tried Jukub's latest patch of "sccvn: Handle bitfields in push_partial_def". > Got to know fre pass checks the load instruction's vuse chain and do the > cons

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread Richard Biener
On Wed, 26 Feb 2020, luoxhu wrote: > On 2020/2/18 17:57, Richard Biener wrote: > > On Tue, 18 Feb 2020, Xionghu Luo wrote: > > > >> Store-merging pass should run twice, the reason is pass fre/pre will do > >> some kind of optimizations to instructions by: > >>1. Converting the load from addre

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-26 Thread luoxhu
On 2020/2/18 17:57, Richard Biener wrote: > On Tue, 18 Feb 2020, Xionghu Luo wrote: > >> Store-merging pass should run twice, the reason is pass fre/pre will do >> some kind of optimizations to instructions by: >>1. Converting the load from address to load from function arguments >>(store_

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-18 Thread Richard Biener
On Tue, 18 Feb 2020, Xionghu Luo wrote: > Store-merging pass should run twice, the reason is pass fre/pre will do > some kind of optimizations to instructions by: > 1. Converting the load from address to load from function arguments > (store_merging_30.c:foo1). > 2. Converting the byte acces

Re: [RFC] Run store-merging pass once more before pass fre/pre

2020-02-18 Thread Jakub Jelinek
On Tue, Feb 18, 2020 at 03:27:39AM -0600, Xionghu Luo wrote: > Store-merging pass should run twice, the reason is pass fre/pre will do > some kind of optimizations to instructions by: > 1. Converting the load from address to load from function arguments > (store_merging_30.c:foo1). > 2. Conve

[RFC] Run store-merging pass once more before pass fre/pre

2020-02-18 Thread Xionghu Luo
Store-merging pass should run twice, the reason is pass fre/pre will do some kind of optimizations to instructions by: 1. Converting the load from address to load from function arguments (store_merging_30.c:foo1). 2. Converting the byte access to BIT_FIELD_REF(store_merging_30.c:foo2). 3. O