Issue 150531
Summary GVN (MemDep): Pathological or infinite behavior
Labels llvm:GVN
Assignees
Reporter alinas
    GVN triggers either a pathological behavior or it's going into an infinite loop in the attached repoducer.

The reason is its use of MemDepAnalysis, specifically 30-50% of the time is spent in `getNonLocalPointerDependency`, out of which most of the time is in the `std::sort` called from `SortNonLocalDepInfoCache`
The cache used keeps expanding to order of tens of thousands entries and I don't see a cap for this or a clear indication this didn't go into an infinite loop.

Reproducer:
`bin/opt --passes=gvn LoopInterchange.bc` on attached file (note: this is a large input!)

[LoopInterchange.bc.txt](https://github.com/user-attachments/files/21419390/LoopInterchange.bc.txt)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to