This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Add reduction for instruction defs
ClosedPublic

Authored by arsenm on Jun 27 2022, 4:49 PM.

Details

Summary

Try to insert an implicit_def to replace the instruction's value,
replacing the original instruction's def with a dead register. If all
defs are delete the instruction entirely.

This is pretty similar to the instruction reduction, but leaves the
new defs in the same place as the original instruction. This could
possibly replace it. I'm not sure if we should directly delete the
instructions here, or leave dead ones behind.

This could also further work to replace physical register defs.

Diff Detail

Event Timeline

arsenm created this revision.Jun 27 2022, 4:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 4:49 PM
Herald added a subscriber: mgorny. · View Herald Transcript
arsenm requested review of this revision.Jun 27 2022, 4:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 4:49 PM
Herald added a subscriber: wdng. · View Herald Transcript
MatzeB accepted this revision.Jul 18 2022, 10:20 AM

LGTM

llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.h
10

it's register defs isn't it?

This revision is now accepted and ready to land.Jul 18 2022, 10:20 AM