Skip to content

GVN (MemDep): Pathological or infinite behavior #150531

@alinas

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvm:GVNGVN and NewGVN stages (Global value numbering)llvm:analysisIncludes value tracking, cost tables and constant folding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions