A question about redudant load elimination

2011-11-14 Thread Jiangning Liu
Hi, For this test case, int x; extern void f(void); void g(int *a) { a[x] = 1; if (x == 100) f(); a[x] = 2; } For trunk, the x86 assembly code is like below, movlx, %eax movl16(%esp), %ebx movl$1, (%ebx,%eax,4)

Re: A question about redudant load elimination

2011-11-14 Thread Ye Joey
From tree dump we can see that there are two assignments from x, one to unsigned and one to signed. I guess that's the reason. Apparently there is room to improve though. int prephitmp.8; int * D.2027; unsigned int D.2026; unsigned int x.1; int x.0; # BLOCK 2 freq:1 # PRED: ENTR

Re: bootstrap regression on sparc

2011-11-14 Thread Rainer Orth
David Miller writes: > While building libstdc++ I get an assertion failure in haifa-sched.c, > specifically the assertion on line 3437 is failing: > > gcc_assert (!jump_p > || ((common_sched_info->sched_pass_id == SCHED_RGN_PASS) > && IS_SPECULA

Re: When is the hardware related register is allocated?

2011-11-14 Thread Feng LI
Hi Ian, Thanks, it helps a lot! One more question is that during split phase, I'll generate 2 instructions in the following order for some reason, CLC; CMOVC reg imm32; But I need to keep the following condition: 1. The compiler will not optimize out the code or break the sequence here. I'm doing

Re: When is the hardware related register is allocated?

2011-11-14 Thread Ian Lance Taylor
Feng LI writes: > Thanks, it helps a lot! One more question is that during split phase, > I'll generate 2 instructions in the following order for some reason, > CLC; > CMOVC reg imm32; > > But I need to keep the following condition: > 1. The compiler will not optimize out the code or break the se

Re: Bugzilla components for target libraries

2011-11-14 Thread Matthias Klose
On 11/10/2011 06:30 PM, Joseph S. Myers wrote: > On Thu, 10 Nov 2011, Rainer Orth wrote: > >> I've recently noticed that several of our target libraries are not >> properly (if at all) represented as bugzilla components. The following >> table shows the current situation: >> >> directory

Re: Troubleshooting with gcc 4.6

2011-11-14 Thread Matthias Klose
On 11/09/2011 07:50 PM, Ian Lance Taylor wrote: > santi writes: > >> I recently updated my Ubuntu 10.10 to 11.10 and since then I have been >> having problems with my compiler. I have seen that this new Ubuntu >> distribution uses gcc 4.6 whilest my old 10.10 used gcc 4.4.5 or >> 4.4.6. >> >> The

Re: Troubleshooting with gcc 4.6

2011-11-14 Thread Ian Lance Taylor
Matthias Klose writes: >> When asking a question of this sort, it helps a lot if you show us >> precisely what you did and precisely what happened. Without seeing >> that, I am going to guess that you are running into multiarch libraries. >> Debian, and therefore Ubuntu, decided to move the syst

builtin gamma function

2011-11-14 Thread James Hirschorn
I have noticed that the builtin gamma function is very accurate and extremely fast. Can someone tell me where to find the source code for the implementation? gdb skips over the call to the builtin gamma. I assume it is not implemented by the simple Lanczos algorithm in tr1/gamma.tcc because I trie

Re: builtin gamma function

2011-11-14 Thread Ian Lance Taylor
James Hirschorn writes: > I have noticed that the builtin gamma function is very accurate and > extremely fast. Can someone tell me where to find the source code for the > implementation? Are you calling it on a constant? Because gcc will fold gamma applied to a constant which meets certain cha

Auto-Vectorization, Polyhedral Model

2011-11-14 Thread steven su
Hi, Can anyone explain whether GCC has implemented Auto-Vectorization based on Polyhedral Model? Are there any related projects shooting at this, and in progress? Steven.