LLVM opt GVN.cpp


I wonder what PRE algorithm is used for the GVN.cpp in LLVM. Any reference will be appreciated.

GVN does not implement any real PRE algorithm. There is some ad-hoc code to catch some simple cases, but that’s all.

I just googled and found some efforts to implement SSAPRE (1997 PLDI - Fred Chow, et al.) which is dated 2011 mailing list and GVN-PRE (university of utah). I wonder whether any well-recognized algorithm(s) and development for PRE on ssa is available for LLVM.