Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

[RepoHashAlgorithm] A diamond path leading to a loop did not cache what it should have. #98

Description

@MaggieYingYi

The new cached hash algorithm is implemented in commit 000ebc2.
The algorithm could get further improvement if it solve the following issue.

Start with the following IR graph:

//       A
//       |
//   +-------+
//   |       |
//   v       v
//   D-----> B <----+
//           |      |
//           v      |
//           C ----->
//

Here we have a loop formed by “b → c → b” which leads directly from a ("a → b") and indirectly via d (“a → d → b”). The current algorithm would consider “d” to be later/deeper than “b” and thus consider it to lie inside the loop and not cached, which is clearly wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions