Reload problem: asm operand requires impossible reload

2009-05-01 Thread Bingfeng Mei
sable this piece of code, the code is compiled without problem. Did I misunderstand something here, or is it an possible bug? The code base is GCC 4.4 branch. Thanks in advance for help. Cheers, Bingfeng Mei Broadcom UK

RE: Reload problem: asm operand requires impossible reload

2009-05-01 Thread Bingfeng Mei
> -Original Message- > From: Ian Lance Taylor [mailto:i...@google.com] > Sent: 01 May 2009 15:32 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org; bernd.schm...@analog.com; weig...@de.ibm.com > Subject: Re: Reload problem: asm operand requires impossible reload > >

RE: Reload problem: asm operand requires impossible reload

2009-05-18 Thread Bingfeng Mei
ern has no "m" alternative, and thus causes the "asm operand requires impossible reload". I should merge these two patterns into one. Looking at the descrption of "movm" in internal manual, I found this subtle requirement is not documented. Maybe we should add some

Restrict keyword doesn't work correctly in GCC 4.4

2009-06-03 Thread Bingfeng Mei
arg 1 tst.c:7:5> tst.c:7:5> tst.c:7:5> Is the RTL expansion wrong or the orginal tree node is constructed incorrectly? Thanks, Bingfeng Mei Broadcom UK

RE: Restrict keyword doesn't work correctly in GCC 4.4

2009-06-03 Thread Bingfeng Mei
essage- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 03 June 2009 11:54 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Restrict keyword doesn't work correctly in GCC 4.4 > > On Wed, Jun 3, 2009 at 12:41 PM, Bingfeng Mei > wrote

RE: Restrict keyword doesn't work correctly in GCC 4.4

2009-06-03 Thread Bingfeng Mei
inal Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 03 June 2009 15:10 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Restrict keyword doesn't work correctly in GCC 4.4 > > On Wed, Jun 3, 2009 at 1:02 PM, Bingfeng Mei > w

RE: Questionable function renaming

2009-06-16 Thread Bingfeng Mei
Is it possible to restore the original name if the copy propagation is not profitable and doesn't go ahead? > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 16 June 2009 13:56 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Su

RE: Questionable function renaming

2009-06-16 Thread Bingfeng Mei
0.02 0.001 0.00 0.00 snocString Bingfeng > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 16 June 2009 14:02 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Questionable function renaming > > On

Unnecessary regmoves in modulo scheduler?

2009-06-22 Thread Bingfeng Mei
1(e.g., insn 53 -> insn 36 in the DDG) We can reach similar conclusion. I wonder what other scenario would require to generate reg moves. Am I missing some obvious points? Thanks in advance. Cheers, Bingfeng Mei Broadcom UK DDG from sms-6.c SMS loop num: 1, file: sms-6.c, line: 9 Nod

RE: Unnecessary regmoves in modulo scheduler?

2009-06-23 Thread Bingfeng Mei
Thanks. I didn't notice the option. Which approach is generally better according to your experience? Producing regmoves or more depedencies? > -Original Message- > From: Revital1 Eres [mailto:e...@il.ibm.com] > Sent: 23 June 2009 14:40 > To: Bingfeng Mei > Cc: Ayal Z

Can GCC scheduler take advantage of mutually exclusive predicated blocks?

2009-07-07 Thread Bingfeng Mei
or it is current limitation of GCC. Thanks, Bingfeng Mei Broadcom Uk

LTO question

2010-04-27 Thread Bingfeng Mei
Hello, I have been playing with LTO. I notice that LTO doesn't work when object files are achived into static library files and the final binary is linked against them, although these object files are compiled with -flto and I can see all the lto related sections in .a files. Is this what is descri

RE: LTO question

2010-04-28 Thread Bingfeng Mei
Thanks, I will check what I can do with collect2. LTO seems to save 6-9% code size for applications I tested and should be very useful for us. Bingfeng > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 28 April 2010 10:33 > To: Bingf

RE: LTO question

2010-04-28 Thread Bingfeng Mei
I just tried -fwhole-program. It can achieve extra 3%-4% saving. That is brilliant. Thanks. Bingfeng > -Original Message- > From: Jan Hubicka [mailto:hubi...@ucw.cz] > Sent: 28 April 2010 13:59 > To: Bingfeng Mei > Subject: Re: LTO question > > > Not yet, I mi

RE: LTO question

2010-04-28 Thread Bingfeng Mei
010 14:59 > To: Bingfeng Mei > Cc: Richard Guenther; gcc@gcc.gnu.org > Subject: Re: LTO question > > On 28/04/2010 10:44, Bingfeng Mei wrote: > > Thanks, I will check what I can do with collect2. > > I was also planning to work on this, but won't have any >

RE: LTO question

2010-04-29 Thread Bingfeng Mei
I turned on -ffunction-sections and compiled with -Os. The size gain at -O2 is less though. Bingfeng > -Original Message- > From: Xinliang David Li [mailto:davi...@google.com] > Sent: 29 April 2010 17:17 > To: Bingfeng Mei > Cc: Richard Guenther; gcc@gcc.gnu.org >

RE: Machine description question

2010-05-12 Thread Bingfeng Mei
Our architecture has the similar resource, and we use the first approach by creating an imaginary register and dependency between these instructions, i.e., every such instruction reads and write to the special register to create artificial dependency. You may need to add a (unspec:..) as an indepe

RE: Machine description question

2010-05-12 Thread Bingfeng Mei
How do you define your imaginary register in target.h? Can you post one example of your instruction pattern? Bingfeng > -Original Message- > From: Hariharan Sandanagobalane [mailto:harihar...@picochip.com] > Sent: 12 May 2010 16:40 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.or

RE: Machine description question

2010-05-13 Thread Bingfeng Mei
BXM)) (unspec:BXBC [(reg:BXBC R_BX)] UNSPEC_BX)] < Important to avoid some optimization. Our port is still porivate and not in mainline. Cheers, Bingfeng > -Original Message- > From: Hariharan Sandanagobalane [mailto:harihar...@picochip.com] > Sent: 13 May 201

RE: Machine description question

2010-05-14 Thread Bingfeng Mei
iharan Sandanagobalane [mailto:harihar...@picochip.com] > Sent: 14 May 2010 12:26 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Machine description question > > Hi Bengfeng, > Changing my instruction patterns similar to the ones that you > sent does > get over t

ICE in LTO.

2010-05-19 Thread Bingfeng Mei
appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. It seems that the cloned function lacks node_info as indicated by ip-reference.c:1245. I am not familiar with these stuff. Any suggestion on where I should look at? Thanks in advance. Cheers, Bingfeng Mei

RE: ICE in LTO.

2010-05-19 Thread Bingfeng Mei
Yes, that is the reason. One of our generated source file is compiled with -O0 with no particular reason and no one noticed. Thanks. Cheers, Bingfeng > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 19 May 2010 16:12 > To: Bingfeng M

externally_visible and resoultion file

2010-05-26 Thread Bingfeng Mei
Hi, Richard, With resolution file generated by GOLD (or I am going to hack gnu LD), is externally_visible attribute still needed to annotate those symbols accessed from non-LTO objects when compiling with -fwhole-program. In theory, it shouldn't be needed since LTO has all information. But what

RE: Using C++ in GCC is OK

2010-06-02 Thread Bingfeng Mei
Converting to C++ is a major change. Does that justify to have a major release (5.0.0)? Bingfeng > -Original Message- > From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of > Richard Guenther > Sent: 02 June 2010 10:36 > To: Gabriel Dos Reis > Cc: DJ Delorie; Hargett,

Bug in C FE or difference between C & C++

2010-06-02 Thread Bingfeng Mei
Hi, For the following simple example, int main(void) { int a=0; switch (a) { case 0: int b=2; break; } } GCC will complain: tst.c: In function 'main': tst.c:7:6: error: a label can only be part of a statement and a declaration is not a statement G++ will compil

RE: externally_visible and resoultion file

2010-06-08 Thread Bingfeng Mei
way. Thanks, Bingfeng > -Original Message- > From: Jan Hubicka [mailto:hubi...@ucw.cz] > Sent: 27 May 2010 09:04 > To: Richard Guenther > Cc: Bingfeng Mei; gcc@gcc.gnu.org > Subject: Re: externally_visible and resoultion file > > > On Wed, May 26, 2010 at 5:53 P

RE: externally_visible and resoultion file

2010-06-08 Thread Bingfeng Mei
Thanks. But why "v" is linked correctly here? Shouldn't it be treated as static with -fwhole-program? Bingfeng > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 08 June 2010 14:10 > To: Bingfeng Mei > Cc: Jan

RE: externally_visible and resoultion file

2010-06-08 Thread Bingfeng Mei
mail.com] > Sent: 08 June 2010 15:18 > To: Bingfeng Mei > Cc: Jan Hubicka; gcc@gcc.gnu.org; Cary Coutant > Subject: Re: externally_visible and resoultion file > > On Tue, Jun 8, 2010 at 4:15 PM, Bingfeng Mei wrote: > > Thanks. But why "v" is linked correctl

RE: externally_visible and resoultion file

2010-06-10 Thread Bingfeng Mei
> -Original Message- > From: Cary Coutant [mailto:ccout...@google.com] > Sent: 09 June 2010 18:43 > To: Richard Guenther > Cc: Bingfeng Mei; Jan Hubicka; gcc@gcc.gnu.org > Subject: Re: externally_visible and resoultion file > > >> Yes, this is also wha

Issue with LTO/-fwhole-program

2010-06-11 Thread Bingfeng Mei
Hi, I am still puzzled by the effect of LTO/-fwhole-program. For the following simple tests: a.c: #include int v; extern void bar(); int main() { v = 5; bar(); printf("v = %d\n", v); return 0; } b.c: int v; void bar() { v = 4; } If I just compile plainly, the output is: v = 4 I

RE: Issue with LTO/-fwhole-program

2010-06-11 Thread Bingfeng Mei
rn.cyg...@gmail.com] > Sent: 11 June 2010 14:21 > To: Richard Guenther > Cc: Manuel López-Ibáñez; Bingfeng Mei; gcc@gcc.gnu.org; Jan Hubicka > Subject: Re: Issue with LTO/-fwhole-program > > On 11/06/2010 13:59, Richard Guenther wrote: > > > Well, we can't. We specific

RE: Issue with LTO/-fwhole-program

2010-06-11 Thread Bingfeng Mei
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 11 June 2010 14:08 > To: Bingfeng Mei > Cc: Dave Korn; Manuel López-Ibáñez; gcc@gcc.gnu.org; Jan Hubicka > Subject: Re: Issue with LTO/-fwhole-program > > On Fri, Jun 11, 2

RE: Issue with LTO/-fwhole-program

2010-06-11 Thread Bingfeng Mei
> -Original Message- > From: Manuel López-Ibáñez [mailto:lopeziba...@gmail.com] > Sent: 11 June 2010 14:14 > To: Bingfeng Mei > Cc: Dave Korn; Richard Guenther; gcc@gcc.gnu.org; Jan Hubicka > Subject: Re: Issue with LTO/-fwhole-program > > On 11 June 2010 15

RE: Issue with LTO/-fwhole-program

2010-06-14 Thread Bingfeng Mei
> -Original Message- > From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of > Ian Lance Taylor > Sent: 14 June 2010 05:43 > To: David Brown > Cc: gcc@gcc.gnu.org > Subject: Re: Issue with LTO/-fwhole-program > > David Brown writes: > > > After doing a bit more readin

Broken trunk (160732)

2010-06-14 Thread Bingfeng Mei
Hi, I just updated from last week's version to 160732. It seems broken due to the latest changes in c-family directory. ./../trunk/gcc/c-family/c-cppbuiltin.c: In function 'void builtin_define_with_hex_fp_value(const char*, tree_node*, int, const char*, const char*, const char*)': ../../trunk/gc

Convert cross reference table to resolution file for LTO

2010-07-01 Thread Bingfeng Mei
Hi, I did some experiments to convert cross-reference table to resolution files. Patches are attached and still crude. The initial idea is to have as little as possible change in GNU LD. It turns out that cross reference table doesn't always print out definition at the first line. So some chan

RE: Convert cross reference table to resolution file for LTO

2010-07-01 Thread Bingfeng Mei
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 01 July 2010 16:13 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org; Jan Hubicka > Subject: Re: Convert cross reference table to resolution file for LTO > > On Thu, Jul 1, 2010

RE: Convert cross reference table to resolution file for LTO

2010-07-01 Thread Bingfeng Mei
> -Original Message- > From: Michael Matz [mailto:m...@suse.de] > Sent: 01 July 2010 16:27 > To: Richard Guenther > Cc: Bingfeng Mei; gcc@gcc.gnu.org; Jan Hubicka > Subject: Re: Convert cross reference table to resolution file for LTO > > Hi, > > On Thu

Why is debug_insn built into DDG?

2010-07-15 Thread Bingfeng Mei
Hello, I started to look at VTA recently and check whether our port passes the -fcompare-debug test. Our port contains some extra passes for our VLIW target. What I have trouble is with our modulo scheduling pass (based on IMS algorithm). I noticed that debug_insns are built into DDG, and has

No GCC summit this year?

2010-07-23 Thread Bingfeng Mei
Hello, I am interested to attend GCC summit this year, but it doesn't seem to happen, does it? Cheers, Bingfeng

Restrict qualifier still not working?

2010-08-02 Thread Bingfeng Mei
Hi, I ran a small test to see how the trunk/4.5 works with the rewritten restrict qualified pointer code. But it doesn't seem to work on both x86-64 and our port. tst.c: void foo (int * restrict a, int * restrict b, int * restrict c, int * restrict d) { *c = *a + 1; *d = *b + 1; }

RE: Restrict qualifier still not working?

2010-08-03 Thread Bingfeng Mei
> -Original Message- > From: Alexander Monakov [mailto:amona...@ispras.ru] > Sent: 02 August 2010 17:48 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org; Richard Guenther > Subject: Re: Restrict qualifier still not working? > > > > On Mon, 2 Aug 2010, Bingfeng Mei

RE: Restrict qualifier still not working?

2010-08-03 Thread Bingfeng Mei
Thanks, Bingfeng > -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 03 August 2010 10:33 > To: Bingfeng Mei > Cc: Alexander Monakov; gcc@gcc.gnu.org > Subject: Re: Restrict qualifier still not working? > > On Tue, Aug 3

RE: Restrict qualifier still not working?

2010-08-03 Thread Bingfeng Mei
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 03 August 2010 17:22 > To: Bingfeng Mei > Cc: Alexander Monakov; gcc@gcc.gnu.org > Subject: Re: Restrict qualifier still not working? > > On Tue, Aug 3, 2010 at 6:11

Shouldn't alias_sets_conflict_p be replaced with rtx_refs_may_alias_p?

2010-08-04 Thread Bingfeng Mei
Hi, alias_sets_conflict_p are still used in various places to determine whether two memory accesses are aliased. It is based on unique set number, which seems not correct with recent changes on alias oracle. For example, in ddg.c cross-iteration memory dependence is drawn by calling insn_alias_sets

RE: Shouldn't alias_sets_conflict_p be replaced with rtx_refs_may_alias_p?

2010-08-04 Thread Bingfeng Mei
Bosscher [mailto:stevenb@gmail.com] > Sent: 04 August 2010 16:26 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org; Richard Guenther > Subject: Re: Shouldn't alias_sets_conflict_p be replaced with > rtx_refs_may_alias_p? > > On Wed, Aug 4, 2010 at 2:02 PM, Bingfeng Mei wrote: &g

nobits for named section

2010-08-24 Thread Bingfeng Mei
Hello, I came across an issue regarding named section and nobits. In the following example, I expected the c is placed is placed in a section named .smemdata and nobits is set for the section since "c" is initialized to zeros. int a = 0; int b = 2000 * 512; static int c[(200 * 512)] __attribute

Function-specific optimization flags and inlining

2010-09-08 Thread Bingfeng Mei
e any function with specific optimization flags or have an extra option to choose that. What do you think? Cheers, Bingfeng Mei

RE: Function-specific optimization flags and inlining

2010-09-08 Thread Bingfeng Mei
[mailto:richard.guent...@gmail.com] > Sent: 08 September 2010 11:26 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Function-specific optimization flags and inlining > > On Wed, Sep 8, 2010 at 12:07 PM, Bingfeng Mei wrote: > > Hello, > > I found that currently if a fu

RE: Function-specific optimization flags and inlining

2010-09-08 Thread Bingfeng Mei
> Sent: 08 September 2010 11:26 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Function-specific optimization flags and inlining > > On Wed, Sep 8, 2010 at 12:07 PM, Bingfeng Mei wrote: > > Hello, > > I found that currently if a function with specific opti

Is this wrong optimization in cse1 pass?

2010-09-13 Thread Bingfeng Mei
(reg/v:V2SI 86 [ c ]) (reg:V2SI 90))) 511 {fp_predv2si} (nil)) (insn 12 11 16 2 tst.c:16 (set (reg:V2SI 87 [ ]) (reg/v:V2SI 85 [ c ])) 190 {fp_movv2si} (nil)) (insn 16 12 19 2 tst.c:18 (set (reg/i:V2SI 8 r8) (reg/v:V2SI 85 [ c ])) 190 {fp_movv2si} (nil)) Cheers, Bin

RE: Question about alias check in ddg.c

2010-09-15 Thread Bingfeng Mei
The old insns_may_alias_p is based checking alias set number. But since 4.5, the new alias oracle doesn't rely the alias set number. may_alias_p() is a new function based on alias oracle. Essentially, it is same as true_dependence function but excluding offset and TBAA based disambiguation, which

RE: Question about alias check in ddg.c

2010-09-15 Thread Bingfeng Mei
It doesn't fail on my target, which is based on 4.5 and has backported this patch. I will have a look at PowerPC. Bingfeng > -Original Message- > From: Revital1 Eres [mailto:e...@il.ibm.com] > Sent: 15 September 2010 13:51 > To: Bingfeng Mei > Subject: RE: Question

Worse code generated by PRE

2010-09-29 Thread Bingfeng Mei
like this. Maybe we should exclude such case in the first place? I read the relevant text in "Advanced Compiler Design Implementation", the example used is linear CFG and it doesn't mention how to handle loop case. Any suggestion is greatly appreciated. Thanks, Bingfeng Mei

RE: Worse code generated by PRE

2010-09-29 Thread Bingfeng Mei
e- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 29 September 2010 13:33 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Worse code generated by PRE > > On Wed, Sep 29, 2010 at 2:16 PM, Bingfeng Mei wrote: > > Hello, > > I hav

Why is -fstrict-aliasing excluded from function "optimize" attribute?

2010-11-03 Thread Bingfeng Mei
h internal manual and gcc manual. It seems not to be documented. I wonder whether there is a good reason for this? If yes, at least we should document it. BTW, the code certainly works in 4.4. Regards, Bingfeng Mei

RE: Why is -fstrict-aliasing excluded from function "optimize" attribute?

2010-11-04 Thread Bingfeng Mei
: Re: Why is -fstrict-aliasing excluded from function "optimize" > attribute? > > On 11/03/2010 08:44 PM, Richard Guenther wrote: > > On Wed, Nov 3, 2010 at 6:12 PM, Andrew Haley wrote: > >> On 11/03/2010 04:49 PM, Bingfeng Mei wrote: > >>> Hello, > &

How to debug when some rtx are wrongly reclaimed by garbage collector?

2010-11-12 Thread Bingfeng Mei
tation fault. (gdb) p vector->u.fld[0].rt_rtvec $15 = (rtvec) 0x2a95905028 (gdb) p *(vector->u.fld[0].rt_rtvec) $16 = {num_elem = -1515870811, elem = {0xa5a5a5a5a5a5a5a5}} I really have no clue on how to debug such issue. Any suggestion is greatly appreciated. Thanks Bingfeng Mei

RE: How to debug when some rtx are wrongly reclaimed by garbage collector?

2010-11-12 Thread Bingfeng Mei
I am not aware of that. Thank you very much. Cheers, Bingfeng > -Original Message- > From: Andreas Schwab [mailto:sch...@redhat.com] > Sent: 12 November 2010 11:24 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: How to debug when some rtx are wrongly recl

Should "restrictness" be preserved over function linling and casting?

2010-11-19 Thread Bingfeng Mei
Hello, I have been struggling with GCC's restrict implementation. One question is: should "restrictness" be preserved over function inlining? For example, in the following code: static int store_int (int *a, int data) { *a = data; } void foo (int * __restrict a, int *__restrict b) { int da

Revisit of pr38212 regarding restrict definition

2010-11-30 Thread Bingfeng Mei
Hi, I am working on how to improve "restrict". I noticed that my changes lead to failure of pr38212. After looking at its code, I think the test may not be valid according to c99 standard. C99 standard 6.7.3.1: EXAMPLE 4 The rule limiting assignments between restricted pointers does not distin

RE: Revisit of pr38212 regarding restrict definition

2010-11-30 Thread Bingfeng Mei
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 30 November 2010 13:53 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Revisit of pr38212 regarding restrict definition > > On Tue, Nov 30, 2010 at 2:07 PM, Bin

BImode is treated as normal byte-wide mode and causes bug.

2010-12-10 Thread Bingfeng Mei
Hi, I am investigating a bug in our target port. It is due to following optimization done by combine pass. (zero_extend:SI (reg:BI 120)) is transformed to (and:SI (subreg:SI (reg:BI 120) 0) (const_int 255 [0xff])) in expand_compound_operation (combine.c), where BImode is just treated as

RE: A question about using restrict

2010-12-13 Thread Bingfeng Mei
13 December 2010 07:59 > To: gcc@gcc.gnu.org > Cc: Bingfeng Mei > Subject: A question about using restrict > > > Hello, > > I have the loop below and I want to pass to gcc that src1 and src2 > never > alias with dst; so I used the restrict keyword as below; how

RE: A question about using restrict

2010-12-13 Thread Bingfeng Mei
0:37 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: RE: A question about using restrict > > Hello Bingfeng, > > Thanks for your reply! I would be very interested to try your patch. > > Revital > > > > > From: "Bingfeng Mei" > To: Revital

Is eliminate_regs_in_insn allowed to generate invalid instruction?

2010-12-16 Thread Bingfeng Mei
this is an wrong transformation and causes the following ICE. Is it allowed that Eliminate_regs_in_insn to generate such illegal instruction? Cheers, Bingfeng Mei

RE: Is eliminate_regs_in_insn allowed to generate invalid instruction?

2010-12-17 Thread Bingfeng Mei
(reg:SI 4 r4) (plus:SI (mult:SI (reg:SI 9 r9) (const_int 8 [0x8])) (reg:SI 4 r4))) -1 (nil)) and load from [r4] subsequently. Bingfeng > -Original Message- > From: Ian Lance Taylor [mailto:i...@google.com] > Sent: 17 December 2010 01:26 >

RE: Is eliminate_regs_in_insn allowed to generate invalid instruction?

2010-12-17 Thread Bingfeng Mei
gt; From: Ian Lance Taylor [mailto:i...@google.com] > Sent: 17 December 2010 15:10 > To: Bingfeng Mei > Cc: gcc@gcc.gnu.org > Subject: Re: Is eliminate_regs_in_insn allowed to generate invalid > instruction? > > "Bingfeng Mei" writes: > > > from gen_reload func

RE: Is eliminate_regs_in_insn allowed to generate invalid instruction?

2010-12-20 Thread Bingfeng Mei
> -Original Message- > From: Ulrich Weigand [mailto:uweig...@de.ibm.com] > Sent: 17 December 2010 18:48 > To: Bingfeng Mei > Cc: i...@google.com; gcc@gcc.gnu.org; gcc-patc...@gcc.gnu.org > Subject: Re: Is eliminate_regs_in_insn allowed to generate invalid > instructi

RE: BImode is treated as normal byte-wide mode and causes bug.

2010-12-22 Thread Bingfeng Mei
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: 22 December 2010 14:33 > To: Claudiu Zissulescu > Cc: Bingfeng Mei; gcc@gcc.gnu.org > Subject: Re: BImode is treated as normal byte-wide mode and caus

Why doesn't vetorizer skips loop peeling/versioning for target supports hardware misaligned access?

2011-01-24 Thread Bingfeng Mei
e case, we should have a compiler hook to choose between them. BTW, I mainly work on 4.5, maybe 4.6 has changed. Thanks, Bingfeng Mei

Vectorization: Loop peeling with misaligned support.

2013-11-15 Thread Bingfeng Mei
, the size is 80bytes vs. 352 bytes without patch (-O2 -ftree-vectorize gcc 4.8.3 20131114) int A[100]; int B[100]; void foo2() {   int i;   for (i = 0; i < 100; ++i)     A[i] = B[i] + 100; } What is the best way to tell vectorizer not to do peeling in such situation? Thanks, Bingfeng

RE: Vectorization: Loop peeling with misaligned support.

2013-11-15 Thread Bingfeng Mei
faster but bigger, what should be right balance? How to do with cases that are a bit faster and a lot bigger? Thanks, Bingfeng -Original Message- From: Richard Biener [mailto:richard.guent...@gmail.com] Sent: 15 November 2013 14:02 To: Bingfeng Mei Cc: gcc@gcc.gnu.org Subject: Re

RE: Vectorization: Loop peeling with misaligned support.

2013-11-15 Thread Bingfeng Mei
guarantee to generate loop peeling. Bingfeng -Original Message- From: Xinliang David Li [mailto:davi...@google.com] Sent: 15 November 2013 17:30 To: Bingfeng Mei Cc: Richard Biener; gcc@gcc.gnu.org Subject: Re: Vectorization: Loop peeling with misaligned support. The right longer

RE: Jump threading in tree dom pass prevents if-conversion & following vectorization

2013-11-22 Thread Bingfeng Mei
@gmail.com] Sent: 21 November 2013 21:26 To: Bingfeng Mei Cc: gcc@gcc.gnu.org Subject: Re: Jump threading in tree dom pass prevents if-conversion & following vectorization On Thu, Nov 21, 2013 at 7:11 AM, Bingfeng Mei wrote: > Hi, > I am doing some investigation on loops can be vectorize

RE: Jump threading in tree dom pass prevents if-conversion & following vectorization

2013-11-22 Thread Bingfeng Mei
[mailto:james.greenha...@arm.com] Sent: 22 November 2013 11:50 To: Bingfeng Mei Cc: Andrew Pinski; gcc@gcc.gnu.org Subject: Re: Jump threading in tree dom pass prevents if-conversion & following vectorization On Fri, Nov 22, 2013 at 11:03:22AM +0000, Bingfeng Mei wrote: > Well, in your modified example

RE: Jump threading in tree dom pass prevents if-conversion & following vectorization

2013-11-22 Thread Bingfeng Mei
rget now. Bingfeng -Original Message- From: Jeff Law [mailto:l...@redhat.com] Sent: 22 November 2013 16:58 To: Bingfeng Mei; Andrew Pinski Cc: gcc@gcc.gnu.org Subject: Re: Jump threading in tree dom pass prevents if-conversion & following vectorization On 11/22/13 04:03, Bingfeng Mei w

RE: Jump threading in tree dom pass prevents if-conversion & following vectorization

2013-11-22 Thread Bingfeng Mei
n be fixed without disabling jump threading. Bingfeng -Original Message- From: Jeff Law [mailto:l...@redhat.com] Sent: 22 November 2013 17:17 To: Bingfeng Mei; Andrew Pinski; Richard Biener Cc: gcc@gcc.gnu.org Subject: Re: Jump threading in tree dom pass prevents if-conversion &

VEC_WIDEN_MULT_(LO|HI)_EXPR vs. VEC_WIDEN_MULT_(EVEN|ODD)_EXPR in vectorization.

2014-01-22 Thread Bingfeng Mei
code1, code2, multi_step_cvt, interm_types)) return true; Thanks, Bingfeng Mei

Suspected bugs in ptr_difference_const & split_address_to_core_and_offset

2014-01-24 Thread Bingfeng Mei
Hi, I experienced an issue in our port, which I suspected due to bugs in ptr_difference_const & split_address_to_core_and_offset. Basically, ptr_difference_const, called by ivopts pass, tries to evaluate whether e1 & e2 differ by a const. In this example, e1 is (addr_expr (mem_ref (ssa_name1, 8))

RE: VEC_WIDEN_MULT_(LO|HI)_EXPR vs. VEC_WIDEN_MULT_(EVEN|ODD)_EXPR in vectorization.

2014-01-28 Thread Bingfeng Mei
n the output vector (operand 0)." So I thought that implementing both can help vectorizer to optimize more loops. Maybe we should improve documents. Bingfeng -Original Message- From: Richard Biener [mailto:richard.guent...@gmail.com] Sent: 28 January 2014 11:02 To: Bingfeng M

RE: VEC_WIDEN_MULT_(LO|HI)_EXPR vs. VEC_WIDEN_MULT_(EVEN|ODD)_EXPR in vectorization.

2014-01-28 Thread Bingfeng Mei
) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2014-01-28 Bingfeng Mei + + * doc/md.texi: Mention that a target shouldn't implement + vec_widen_(s|u)mul_even/odd pair if it is less efficient + than hi/lo pair. + 2014-01-28 Richard Biener Revert Index: g

No TBAA before ptr_derefs_may_alias_p?

2014-01-31 Thread Bingfeng Mei
dr_b); return refs_may_alias_p (addr_a, addr_b); This issue can be reproduced on trunk x86-64 gcc. Cheers, Bingfeng Mei

RE: No TBAA before ptr_derefs_may_alias_p?

2014-01-31 Thread Bingfeng Mei
Thanks, Richard, I will prepare a patch with test as well as filing a bug. Bingfeng -Original Message- From: Richard Biener [mailto:rguent...@suse.de] Sent: 31 January 2014 15:24 To: Bingfeng Mei; gcc@gcc.gnu.org Subject: Re: No TBAA before ptr_derefs_may_alias_p? On 1/31/14 4:02 PM

RE: No TBAA before ptr_derefs_may_alias_p?

2014-01-31 Thread Bingfeng Mei
new operator. But this example is pretty clear and has nothing to do with C++ and new statement. Isn't it too conservative to disable TBAA for anti- & output- dependency here? Bingfeng -Original Message- From: Richard Biener [mailto:rguent...@suse.de] Sent: 31 January 2014

RE: No TBAA before ptr_derefs_may_alias_p?

2014-02-03 Thread Bingfeng Mei
If it is just for C++ placement new, why don't implement it as a lang_hook. Now other languages such as C have to be made conservative and produce worse code. Bingfeng -Original Message- From: Richard Biener [mailto:rguent...@suse.de] Sent: 31 January 2014 19:44 To: Bingfeng Mei

RE: No TBAA before ptr_derefs_may_alias_p?

2014-02-03 Thread Bingfeng Mei
Weimer Cc: Jakub Jelinek; Bingfeng Mei; gcc@gcc.gnu.org Subject: Re: No TBAA before ptr_derefs_may_alias_p? On Mon, 3 Feb 2014, Florian Weimer wrote: > On 02/03/2014 10:59 AM, Jakub Jelinek wrote: > > On Mon, Feb 03, 2014 at 09:51:01AM +, Bingfeng Mei wrote: > > > I

RE: No TBAA before ptr_derefs_may_alias_p?

2014-02-03 Thread Bingfeng Mei
te: mark for run-time aliasing test between _10->real and *_7 tst3.c:12: note: versioning for alias required: can't determine dependence Bingfeng -Original Message- From: Richard Biener [mailto:rguent...@suse.de] Sent: 03 February 2014 10:35 To: Jakub Jelinek Cc: Bingfeng Mei;

RE: No TBAA before ptr_derefs_may_alias_p?

2014-02-03 Thread Bingfeng Mei
[mailto:rguent...@suse.de] Sent: 03 February 2014 13:16 To: Bingfeng Mei Cc: Florian Weimer; Jakub Jelinek; gcc@gcc.gnu.org Subject: RE: No TBAA before ptr_derefs_may_alias_p? On Mon, 3 Feb 2014, Bingfeng Mei wrote: > For the following code, why can load be moved before store instruction? >

Merge epilog loop & loop version due to alias/alignment in vectorization?

2014-02-04 Thread Bingfeng Mei
Hi, One of biggest issues we have with GCC vectorization is bloated code size. For example, vectorized version is 2.5 times of non-vectorized one for the following simple code. One reason is that GCC often creates one loop copy because of aliasing/alignment and one epilog loop because of loop itera

RE: Merge epilog loop & loop version due to alias/alignment in vectorization?

2014-02-05 Thread Bingfeng Mei
Thanks, it seems that Cong's idea is exactly what I meant. Is there a patch I can try? Bingfeng -Original Message- From: Xinliang David Li [mailto:davi...@google.com] Sent: 04 February 2014 18:57 To: Bingfeng Mei Cc: gcc@gcc.gnu.org; Cong Hou Subject: Re: Merge epilog loop &

RE: builtin function - novops

2014-03-17 Thread Bingfeng Mei
haran Sandanagobalane Cc: Bingfeng Mei; Andrew Haley; GCC Development Subject: Re: builtin function - novops On Mon, Mar 17, 2014 at 1:59 AM, Hariharan Sandanagobalane wrote: > Hello, > This question is similar to one raised by bingfeng here > > http://gcc.gnu.org/ml/gcc/2010-04/msg00241.html > &

RE: Vectorizer question

2012-05-17 Thread Bingfeng Mei
If both X & Y are vectors, GCC will report error (at least on our port based on 4.5) as invalid operands to ==. Not sure if it is extended for 4.7. Bingfeng -Original Message- From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of Iyer, Balaji V Sent: 17 May 2012 00:01

restrict keyword has no effect?

2008-01-23 Thread Bingfeng Mei
ivtmp.49]; ivtmp.49 = ivtmp.49 + 4; if (ivtmp.49 != 1024) goto ; else goto ; :; return; } Any hint to produce efficient code with "restrict" keyword? Thank in advance. Cheers, Bingfeng Mei Broadcom UK

DFA state and arc explosion

2008-03-14 Thread Bingfeng Mei
le difference. Modeling other instructions in a similar way becomes impossible therefore. It takes forever to build GCC. What I did wrong here? I just want to model resource usage in issue slot and writeback stage in order possible stall cycle. What is the cheap to do this? Thanks in advance. Cheers, Bingfeng Mei Broadcom UK

RE: DFA state and arc explosion

2008-03-14 Thread Bingfeng Mei
Sent: 14 March 2008 10:58 To: Bingfeng Mei Subject: Re: DFA state and arc explosion Hello, I maybe totally wrong, but how it is possible that your NDFA DFA and Minimal DFA are the same? I would think that this indicate some sort of error. Jan 2008/3/14, Bingfeng Mei <[EMAIL PROTECTED]>: >

Where is restrict keyword used in dependence analysis?

2008-04-15 Thread Bingfeng Mei
don't know where to look at now. Could someone point me some files/functions/data structures by which restrict keyword is used and passed to dependence anaylsis part? Thanks in advance. Bingfeng Mei Broadcom UK Example code: typedef intV4W __attribute__ ((vector_size (16))); typedef

RE: Where is restrict keyword used in dependence analysis?

2008-04-16 Thread Bingfeng Mei
o much clue. Thanks. Bingfeng Mei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Berlin Sent: 15 April 2008 18:03 To: Bingfeng Mei Cc: gcc@gcc.gnu.org Subject: Re: Where is restrict keyword used in dependence analysis? On Tue, Apr 15, 2008 at 12:

Uncessary long long produced in tree-ssa?

2008-04-17 Thread Bingfeng Mei
int) j * 4, index: D.1759]; ivtmp.19 = ivtmp.19 + 1; if (ivtmp.19 != 5) goto ; else goto ; : return; } Is it necessary to use "long long unsigned" ivtmp.19 here? It would require 64-bit addition in the loop. Cheers, Bingfeng Mei Broadcom UK

RE: Uncessary long long produced in tree-ssa?

2008-04-18 Thread Bingfeng Mei
Ian, Thanks. My pointer type is 32-bit. But when I tried the ARM target, GCC 4.3.0 does produce simpler code. It is likely my porting has some issue. Bingfneg -Original Message- From: Ian Lance Taylor [mailto:[EMAIL PROTECTED] Sent: 17 April 2008 18:31 To: Bingfeng Mei Cc: gcc

<    1   2   3   >