This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Propagate BB predicates in ipa-inline-analysis
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: hubicka at ucw dot cz (Jan Hubicka)
- Cc: gcc-patches at gcc dot gnu dot org, arnd at arndb dot de
- Date: Fri, 2 Sep 2011 19:42:27 +0200 (CEST)
- Subject: Re: Propagate BB predicates in ipa-inline-analysis
Jan Hubicka wrote:
> (edge_execution_predicate): Rewrite as...
> (set_cond_stmt_execution_predicate): ... this function; handle
> __builtin_constant_p.
This causes ICEs when building recent Linux kernels with the
CONFIG_TRACE_BRANCH_PROFLING option. This reduced test case:
static inline __attribute__((always_inline)) int f (unsigned int n, unsigned int size)
{
return (__builtin_constant_p (size != 0 && n > ~0 / size)
? !!(size != 0 && n > ~0 / size)
: ({ static unsigned int count[2] = { 0, 0 };
int r = !!(size != 0 && n > ~0 / size);
count[r]++;
r; }));
}
int g (unsigned int size)
{
return f (size / 4096, 4);
}
built with -O2 (on i386) on current mainline results in:
/home/uweigand/test.i:15:1: internal compiler error: tree check: expected ssa_name, have integer_cst in set_cond_stmt_execution_predicate, at ipa-inline-analysis.c:1190
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com