This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cse won't pull an expr out of a function call
- To: zack at bitmover dot com (Zack Weinberg)
- Subject: Re: cse won't pull an expr out of a function call
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 29 Jul 1999 03:14:28 +0100 (BST)
- Cc: gcc at gcc dot gnu dot org
> check_failed is declared noreturn. The expression
>
> (decl->foo == BLAH ? decl : check_failed(decl, BLAH))->bar
>
> appears three times. cse ought to be able to extract it entirely,
cse mainly does its work inside a single basic block. The expression
you want be be cse'd itself creates multiple basic blocks.
gcse can handle expressions that are scattered about multiple basic
blocks, but it has to be able to recognize them as expressions with
a particular value first, and to be able to move the instructions that
calculate the expression.
You'll have to do a lot of work to get to this point for a conditional
expression like the one you quoted.