This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Fix some artifact combiner worklist inconsistencies
ClosedPublic

Authored by arsenm on Jun 16 2020, 12:13 PM.

Details

Summary

In one case, UpdateDefs was not getting set and a dead SmallVector
constructed In another, it was adding new vreg defs to the updated set
which should be unnecessary. This also wasn't considering the multiple
defs of G_UNMERGE_VALUES.

Also increase the small vector sizes for merge/unmerge operands to the
usual semi-arbitrary 8. While debugging these, I'm usually seeing
merges and unmerges with at least 4 uses/defs.

I haven't run into an actual problem from any of these though.

Diff Detail

Event Timeline

arsenm created this revision.Jun 16 2020, 12:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2020, 12:13 PM
Herald added subscribers: rovka, wdng. · View Herald Transcript
aemerson added inline comments.Jun 16 2020, 10:27 PM
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
755

A G_MERGE should never have multiple defs?

arsenm marked an inline comment as done.Jun 17 2020, 5:39 AM
arsenm added inline comments.
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
755

This is handling G_UNMERGE_VALUES, not merge

arsenm marked an inline comment as done.Jun 17 2020, 5:42 AM
arsenm added inline comments.
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
755

Oh I can't read, the user is G_UNEMRGE

arsenm updated this revision to Diff 271347.Jun 17 2020, 5:43 AM

Drop unnecessary part

aemerson accepted this revision.Jun 17 2020, 9:53 AM
This revision is now accepted and ready to land.Jun 17 2020, 9:53 AM