Page MenuHomePhabricator

[mlir][llvm] Fix bug in constant import from LLVM IR.

Authored by gysit on Feb 2 2023, 1:07 AM.



The revision addresses a bug during constant expression traversal
when importing LLVM IR. A constant expression may have cyclic
dependencies, for example, when a constant is initialized with its
address. This revision extends the constant expression traversal
to detect cyclic dependencies and adds a test to verify this
case is handled properly.

Diff Detail

Event Timeline

gysit created this revision.Feb 2 2023, 1:07 AM
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Feb 2 2023, 1:07 AM
gysit updated this revision to Diff 494627.Feb 3 2023, 7:14 AM

Switch to a hopefully easier to understand algorithm.

Dinistro accepted this revision.Feb 3 2023, 7:34 AM

The algorithm change made it indeed more easy to understand.

This revision is now accepted and ready to land.Feb 3 2023, 7:34 AM
This revision was automatically updated to reflect the committed changes.