[llvm] [NewGVN] Prevent cyclic dependencies by ensuring Leader has min RPO number (PR #82110)

Michael Berg via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 16:22:44 PST 2024


================
@@ -297,7 +297,8 @@ class CongruenceClass {
   using MemoryMemberSet = SmallPtrSet<const MemoryMemberType *, 2>;
 
   explicit CongruenceClass(unsigned ID) : ID(ID) {}
-  CongruenceClass(unsigned ID, Value *Leader, const Expression *E)
+  CongruenceClass(unsigned ID, std::pair<Value *, unsigned int> Leader,
----------------
mcberg2021 wrote:

Manuel, I work on a RISC-V compiler and wanted to try out your patch to see if it addressed some issues I am seeing in NewGVN.  I am seeing assertions in NewGVN::verifyIterationSettled(...) in an otherwise unmodified compiler.

I am Using: -static -O3 -mllvm -funcspec-propagate-constants -mllvm -enable-newgvn
for compiling Spec2017/557.xz_r (the rate metric).  The issues arise in xz/file_io.c and liblzma/lz/lz_encoder_mf.c.  I also see some other assertions with -flto on also in NewGVN.
Please try to see if you can reproduce these issues on a target of your choice.

https://github.com/llvm/llvm-project/pull/82110


More information about the llvm-commits mailing list