Re: rtx_cost of insns

2015-06-29 Thread Segher Boessenkool
On Tue, Jun 30, 2015 at 02:16:19PM +0930, Alan Modra wrote: > On Mon, Jun 29, 2015 at 09:34:40AM -0500, Segher Boessenkool wrote: > > On Mon, Jun 29, 2015 at 05:16:39PM +0930, Alan Modra wrote: > > > Note that we already have insn_rtx_cost, and it returns a minimum cost > > > for a SET, so register

Re: rtx_cost of insns

2015-06-29 Thread Alan Modra
On Mon, Jun 29, 2015 at 09:34:40AM -0500, Segher Boessenkool wrote: > On Mon, Jun 29, 2015 at 05:16:39PM +0930, Alan Modra wrote: > > Note that we already have insn_rtx_cost, and it returns a minimum cost > > for a SET, so register move insns get a cost of 1 insn. However, > > despite insn_rtx_cos

Re: New build warning: implicit declaration of function ‘asprintf’ when building lto-plugin.o

2015-06-29 Thread Mikhail Maltsev
On 29.06.2015 14:24, Uros Bizjak wrote: > Hello! > > Recent commit introduced following build warning: > > /home/uros/gcc-svn/trunk/lto-plugin/lto-plugin.c: In function > ‘claim_file_handler’: > /home/uros/gcc-svn/trunk/lto-plugin/lto-plugin.c:930:16: warning: > implicit declaration of function ‘

Re: C as used/implemented in practice: analysis of responses

2015-06-29 Thread Peter Sewell
ack, thanks - in that case, it's a nice example, but not really relevant to what we're asking about Peter On 30 June 2015 at 00:21, Andreas Hollmann wrote: > Sorry for my first misleading email. The code needs disabled > optimizations to ensure that the execution time is long enough > to measur

Re: C as used/implemented in practice: analysis of responses

2015-06-29 Thread Andreas Hollmann
Sorry for my first misleading email. The code needs disabled optimizations to ensure that the execution time is long enough to measure jitter. It has nothing to do with the correctness of the C code. It might be still an issue, to depend on an optimization level. "To ensure that optimizations are

Re: C as used/implemented in practice: analysis of responses

2015-06-29 Thread Andreas Hollmann
There is some recent code added to Linux 4.2, that relies on disabled optimization. This might be an interesting case of unclear interpretation/misuse of the C language. #ifdef __OPTIMIZE__ #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation.

Re: Multi-version IF-THEN-ELSE conditional

2015-06-29 Thread Jeff Law
On 06/27/2015 06:10 AM, Ajit Kumar Agarwal wrote: All: The presence of aliases disables many optimizations like CCP(conditional constant propagation) , PRE(Partial Redundancy Elimination), Scalar Replacements for conditional IF-THEN-ELSE. The presence of aliasing also disables the IF-convers

Re: C++ coding style inconsistencies

2015-06-29 Thread Jeff Law
On 06/27/2015 01:18 AM, Richard Sandiford wrote: Mikhail Maltsev writes: Perhaps one disappointing exception is mixed space/tabs indentation. It is often inconsistent (i.e. some parts use space-only indentation). Yeah. Been hitting that recently too. commit-hooks are the solution to this cla

Re: rtx_cost of insns

2015-06-29 Thread Segher Boessenkool
On Mon, Jun 29, 2015 at 05:16:39PM +0930, Alan Modra wrote: > Note that we already have insn_rtx_cost, and it returns a minimum cost > for a SET, so register move insns get a cost of 1 insn. However, > despite insn_rtx_cost starting life in combine.c, even combine doesn't > use it in all whole ins

New build warning: implicit declaration of function ‘asprintf’ when building lto-plugin.o

2015-06-29 Thread Uros Bizjak
Hello! Recent commit introduced following build warning: /home/uros/gcc-svn/trunk/lto-plugin/lto-plugin.c: In function ‘claim_file_handler’: /home/uros/gcc-svn/trunk/lto-plugin/lto-plugin.c:930:16: warning: implicit declaration of function ‘asprintf’ [-Wimplicit-function-declaration] t = hi

Re: Question about DRAP register and reserving hard registers

2015-06-29 Thread Richard Henderson
On 06/22/2015 11:14 PM, Steve Ellcey wrote: On Fri, 2015-06-19 at 09:09 -0400, Richard Henderson wrote: On 06/16/2015 07:05 PM, Steve Ellcey wrote: I have a question about the DRAP register (used for dynamic stack alignment) and about reserving/using hard registers in general. I am trying to

Re: ifcvt limitations?

2015-06-29 Thread Richard Henderson
On 06/10/2015 02:36 PM, Kyrill Tkachov wrote: On 02/06/15 17:50, Jeff Law wrote: On 06/02/2015 09:57 AM, Kyrill Tkachov wrote: I'm stuck on noce_process_if_block (in ifcvt.c) and what I think is a restriction that the THEN-block contents have to be only a single set insn. This fails on aarch64

Re: rtx_cost of insns

2015-06-29 Thread Oleg Endo
On 29 Jun 2015, at 16:46, Alan Modra wrote: > On Thu, Jun 25, 2015 at 01:28:39PM +0100, Richard Earnshaw wrote: >> Perhaps the best thing to do is to use the OUTER code to spot the >> specific case where you've got a SET and return non-zero in that case. > > That's exactly the path I've been fo

rtx_cost of insns

2015-06-29 Thread Alan Modra
On Thu, Jun 25, 2015 at 01:28:39PM +0100, Richard Earnshaw wrote: > Perhaps the best thing to do is to use the OUTER code to spot the > specific case where you've got a SET and return non-zero in that case. That's exactly the path I've been following. It's not as easy as it sounds.. First, some