Re: suspect code in fold-const.c

2013-11-18 Thread Kenneth Zadeck
committed as revision 204987. thanks kenny On 11/18/2013 05:38 AM, Richard Biener wrote: On Fri, 15 Nov 2013, Kenneth Zadeck wrote: This patch fixes a number of places where the mode bitsize had been used but the mode precision should have been used. The tree level is somewhat sloppy about

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Hendrik Greving
I see what you're saying. You mean because the VLA stack space can be dynamically "free'd" right away, as opposed to be there until the epilogue. That is true :( Is still seems odd when just looking at it. It's hard to imagine somebody would actually code myarray[const_thousand_var] as opposed to m

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Jakub Jelinek
On Mon, Nov 18, 2013 at 12:43:50PM -0800, Hendrik Greving wrote: > Hmm don't VLA's obey the same lifetime rules as regular automatic > arrays on the stack? In the languages yes, in GCC no. There is code to determine possibilities of sharing some stack space between variables that can't be used at

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Hendrik Greving
Hmm don't VLA's obey the same lifetime rules as regular automatic arrays on the stack? On Mon, Nov 18, 2013 at 11:48 AM, Jakub Jelinek wrote: > On Mon, Nov 18, 2013 at 11:22:22AM -0800, Hendrik Greving wrote: >> Interesting, I just read up on it and I didn't know that. Thanks. Is >> it correct to

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Jakub Jelinek
On Mon, Nov 18, 2013 at 11:22:22AM -0800, Hendrik Greving wrote: > Interesting, I just read up on it and I didn't know that. Thanks. Is > it correct to say though that it is a missing optimization and > frame_pointer_needed shouldn't evaluate to true? Certainly not unconditionally. It depends on

Re: OpenACC or OpenMP 4.0 target directives

2013-11-18 Thread Tobias Burnus
Güray Özen wrote: I came across a news about gcc will support OpenACC/OpenMP target directive. How can i download this version? Well, the support is at an early stage, targetting several different backends. The work is done by several teams and, hence, not always very well coordinated. I thin

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Hendrik Greving
Interesting, I just read up on it and I didn't know that. Thanks. Is it correct to say though that it is a missing optimization and frame_pointer_needed shouldn't evaluate to true? On Mon, Nov 18, 2013 at 10:55 AM, Andrew Pinski wrote: > On Mon, Nov 18, 2013 at 10:47 AM, Hendrik Greving > wrote:

Re: RFC: Use 32-byte PLT to preserve bound registers

2013-11-18 Thread H.J. Lu
There is a typo in pushq offset computation. It should be pushq_offset += ((unsigned char *) pushq_offset)[-6] == 0xf2 ? 1 : 0 instead of pushq_offset += ((unsigned char *) pushq_offset)[6] == 0xf2 ? 1 : 0 H.J. On Mon, Nov 18, 2013 at 11:03 AM, H.J. Lu wrote: > Here is a proposal to use

RFC: Use 32-byte PLT to preserve bound registers

2013-11-18 Thread H.J. Lu
Here is a proposal to use 32-byte PLT to preserve bound registers. Any comments? BTW, we are working on another proposal to use a second PLT section with 8 byte or 16 byte memory overhead, instead of 24 byte overhead. -- H.J. --- Intel MPX: http://software.intel.com/sites/default/files/319433-0

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Andrew Pinski
On Mon, Nov 18, 2013 at 10:47 AM, Hendrik Greving wrote: > What's the difference in the C vs. the C++ spec that makes it a VLA in GNU-C? max in C++ is considered an integer constant expression while in C it is just an expression. Thanks, Andrew Pinski > > On Fri, Nov 15, 2013 at 10:07 AM, Andr

Re: Frame pointer, bug or feature? (x86)

2013-11-18 Thread Hendrik Greving
What's the difference in the C vs. the C++ spec that makes it a VLA in GNU-C? On Fri, Nov 15, 2013 at 10:07 AM, Andrew Pinski wrote: > On Fri, Nov 15, 2013 at 9:31 AM, Hendrik Greving > wrote: >> In the below test case, "CASE_A" actually uses a frame pointer, while >> !CASE_A doesn't. I can't im

Re: PLUGIN_HEADER_FILE event for tracing of header inclusions.

2013-11-18 Thread Joseph S. Myers
On Mon, 18 Nov 2013, Basile Starynkevitch wrote: > On Mon, 2013-11-18 at 13:17 +, Joseph S. Myers wrote: > > On Sun, 17 Nov 2013, Basile Starynkevitch wrote: > > > > > What would be the good way to add such a plugin event to GCC 4.9? > > > > See the cpp_callbacks structure, used to make diag

Re: PLUGIN_HEADER_FILE event for tracing of header inclusions.

2013-11-18 Thread Basile Starynkevitch
On Mon, 2013-11-18 at 13:17 +, Joseph S. Myers wrote: > On Sun, 17 Nov 2013, Basile Starynkevitch wrote: > > > What would be the good way to add such a plugin event to GCC 4.9? > > See the cpp_callbacks structure, used to make diagnostics go through GCC's > diagnostics machinery, for example

OpenACC or OpenMP 4.0 target directives

2013-11-18 Thread guray ozen
Hello, I'm doing master at Polytechnic University of Catalonia, BarcelonaTech and I started to my master thesis. My topic is code generation for hardware accelerator into OmpSs. OmpSs is being developed by Barcelona Supercomputer Center, and it has a runtime for gpu. It can manage kernel invocatio

Re: memset zero bytes at NULL - isolate-erroneous-paths

2013-11-18 Thread Ondřej Bílka
On Mon, Nov 18, 2013 at 07:24:46AM -0700, Jeff Law wrote: > On 11/18/13 04:08, Richard Biener wrote: > >>I'd say that turning memset (0, '\0', 0) into a trap is bad from a QOI > >perspective. Jeff, is there an easy way to avoid this? Testcase: > > > >void fn (void *addr, int a) > >{ > > if (a =

Re: memset zero bytes at NULL - isolate-erroneous-paths

2013-11-18 Thread Jeff Law
On 11/18/13 04:08, Richard Biener wrote: I'd say that turning memset (0, '\0', 0) into a trap is bad from a QOI perspective. Jeff, is there an easy way to avoid this? Testcase: void fn (void *addr, int a) { if (a == 0) addr = (void *)0; __builtin_memset (addr, '\0', a); } I wonder

Re: PLUGIN_HEADER_FILE event for tracing of header inclusions.

2013-11-18 Thread Joseph S. Myers
On Sun, 17 Nov 2013, Basile Starynkevitch wrote: > What would be the good way to add such a plugin event to GCC 4.9? See the cpp_callbacks structure, used to make diagnostics go through GCC's diagnostics machinery, for example. I'm not clear why the existing callbacks (in particular the file_c

Re: memset zero bytes at NULL - isolate-erroneous-paths

2013-11-18 Thread Jakub Jelinek
On Mon, Nov 18, 2013 at 12:08:27PM +0100, Richard Biener wrote: > I'd say that turning memset (0, '\0', 0) into a trap is bad from a QOI > perspective. Jeff, is there an easy way to avoid this? Testcase: > > void fn (void *addr, int a) > { > if (a == 0) > addr = (void *)0; > __builtin_me

Re: memset zero bytes at NULL - isolate-erroneous-paths

2013-11-18 Thread Richard Biener
On Mon, Nov 18, 2013 at 8:11 AM, Florian Weimer wrote: > * Jeff Law: > >>> Is this new in C11? Does it apply to functions such as strnlen as well? > >> No, it's C99 I think. There was a clarification which came in after >> C99 which clarified that even if the length is zero, the pointers must >>

Re: suspect code in fold-const.c

2013-11-18 Thread Richard Biener
On Fri, 15 Nov 2013, Kenneth Zadeck wrote: > > This patch fixes a number of places where the mode bitsize had been used but > the mode precision should have been used. The tree level is somewhat sloppy > about this - some places use the mode precision and some use the mode bitsize. > It seems th