This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Rework isAllUsesReadW in RISCVSExtWRemoval. NFCI
ClosedPublic

Authored by craig.topper on Nov 4 2022, 10:15 AM.

Details

Summary

Instead of storing the uses to check in the worklist, store the
instruction we want to check uses for.

Now we pop and instruction from the worklist, loop over its uses
and check them. If it's something we need to look across, we'll push
it to the worklist.

By doing it this way, we can have access to which operand
of the user is using the instruction. This will allow supporting
store instructions since we'll be able to disambiguate the the value
operand and the pointer operand. We can also improve support for
*add.uw instructions and shift amount uses.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 4 2022, 10:15 AM
craig.topper requested review of this revision.Nov 4 2022, 10:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2022, 10:15 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Nov 7 2022, 4:15 AM
asb accepted this revision.Nov 8 2022, 3:16 AM

LGTM.