[llvm] r200612 - [LPM] Apply a really big hammer to fix PR18688 by recursively reforming

Tobias Grosser tobias at grosser.es
Mon Feb 3 07:35:51 PST 2014


On 02/01/2014 02:35 PM, Chandler Carruth wrote:
> Author: chandlerc
> Date: Sat Feb  1 07:35:14 2014
> New Revision: 200612
>
> URL: http://llvm.org/viewvc/llvm-project?rev=200612&view=rev
> Log:
> [LPM] Apply a really big hammer to fix PR18688 by recursively reforming
> LCSSA when we promote to SSA registers inside of LICM.
>
> Currently, this is actually necessary. The promotion logic in LICM uses
> SSAUpdater which doesn't understand how to place LCSSA PHI nodes.
> Teaching it to do so would be a very significant undertaking. It may be
> worthwhile and I've left a FIXME about this in the code as well as
> starting a thread on llvmdev to try to figure out the right long-term
> solution.
>
> For now, the PR needs to be fixed. Short of using the promition
> SSAUpdater to place both the LCSSA PHI nodes and the promoted PHI nodes,
> I don't see a cleaner or cheaper way of achieving this. Fortunately,
> LCSSA is relatively lazy and sparse -- it should only update
> instructions which need it. We can also skip the recursive variant when
> we don't promote to SSA values.

Just for information, this change did not cause any compile time or run 
time changes in the LLVM test suite:

http://llvm.org/perf/db_default/v4/nts/21641?num_comparison_runs=10&aggregation_fn=median&compare_to=21640

Cheers,
Tobias




More information about the llvm-commits mailing list