This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][2/2] Make SCCVN use conditional equivalences
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 16 Aug 2015 11:44:12 -0700
- Subject: Re: [PATCH][2/2] Make SCCVN use conditional equivalences
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1508121114170 dot 19642 at zhemvz dot fhfr dot qr> <alpine dot LSU dot 2 dot 11 dot 1508121621510 dot 19642 at zhemvz dot fhfr dot qr>
On Wed, Aug 12, 2015 at 7:23 AM, Richard Biener <rguenther@suse.de> wrote:
> On Wed, 12 Aug 2015, Richard Biener wrote:
>
>>
>> This brings FRE/PRE up to the same level as DOM in being able to
>> remove redundant conditionals. It does so by inserting temporary
>> conditional expressions proved to be true on single predecessor
>> edges.
>>
>> I've had to do a lot of testcase adjustments, thus the patch is
>> now re-bootstrapping / testing on x86_64-unknown-linux-gnu.
>
> I've applied with a slight change, trimming down the number of
> equivalences recorded (basically only record anything off
> conditions not already optimized to go either way).
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
>
> Richard.
>
> 2015-08-12 Richard Biener <rguenther@suse.de>
>
> * tree-ssa-sccvn.c (vn_nary_op_compute_hash): Also canonicalize
> comparison operand order and commutative ternary op operand order.
> (sccvn_dom_walker::cond_stack): New state to track temporary
> expressions.
> (sccvn_dom_walker::after_dom_children): Remove tempoary expressions
> no longer valid.
> (sccvn_dom_walker::record_cond): Add a single temporary conditional
> expression.
> (sccvn_dom_walker::record_conds): Add a temporary conditional
> expressions and all related expressions also true/false.
> (sccvn_dom_walker::before_dom_children): Record temporary
> expressions based on the controlling condition of a single
> predecessor. When trying to simplify a conditional statement
> lookup expressions we might have inserted earlier.
>
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67241
H.J.