This is an archive of the discontinued LLVM Phabricator instance.

[ConstraintElimination] Move Value2Index map to ConstraintSystem (NFC)
ClosedPublic

Authored by zjaffal on Jan 26 2023, 9:28 AM.

Details

Summary

Move Value2Index from ConstraintElimination to ConstraintSystem to support dumping the constraintSystem equations with llvm ir variable names instead of using generic variables. Improving the overall debug output

Diff Detail

Event Timeline

zjaffal created this revision.Jan 26 2023, 9:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 9:28 AM
zjaffal requested review of this revision.Jan 26 2023, 9:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 9:28 AM
fhahn added inline comments.Feb 6 2023, 2:12 PM
llvm/include/llvm/Analysis/ConstraintSystem.h
16

Not needed, you can instead forward declare Value as in class Value;

26–30

This needs documenting. and newlines around.

63

nit: newline.

zjaffal updated this revision to Diff 495498.Feb 7 2023, 6:04 AM

Add comments to explain Value2Index map.
Address nit comments

fhahn accepted this revision.Feb 7 2023, 12:15 PM

LGTM with the inline comments addressed.

llvm/include/llvm/Analysis/ConstraintSystem.h
20

nit: newline before and after/

27

A map of variables (IR values) to their corresponding index in the constraint system. Better not mention any specific pass here.

This revision is now accepted and ready to land.Feb 7 2023, 12:15 PM
fhahn added a comment.Feb 7 2023, 1:21 PM

Could you also update the patch description/commit message to explain the motivation for the change.

zjaffal edited the summary of this revision. (Show Details)Feb 8 2023, 2:31 AM
This revision was landed with ongoing or failed builds.Feb 8 2023, 3:15 AM
This revision was automatically updated to reflect the committed changes.