https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110423

--- Comment #3 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #2)

> This is derived heavily from Click's work in the 90s. 
> This would happen in gimple most likely, though I guess one could do it in
> RTL if they have a high pain threshold.

If a gimple pass, it won't help catch the late reload induced
rematerializations, which is seen on a lot of SPEC workloads, e.g. cactu for
stack addressing. Although I guess Manolis' fold const offset pass patch would
help things a bit.

> Click's paper is much more general, but the same concepts apply.  His paper
> doesn't cover anything like bifurcating the graph (thus allowing multiple
> constant loads in an effort to reduce undesired speculation or register
> allocation conflicts).
> 
> We might be able to get away with this precisely because these are constant
> loads and thus subject to rematerialization later if register pressure is
> high.
> 
> https://courses.cs.washington.edu/courses/cse501/06wi/reading/click-pldi95.
> pdf

The prospect of implementing Cliff's Global Value Numbering is very exciting,
however I would like to start small. Started digging into gcse.cc Hoist pass,
granted this is still pre-reload. It seems Hoist has some global redundancy
elimination capabilities for constants, added by Maxim Kuvyrkov back in 2010. I
need to see what it can and can not do.

Reply via email to