This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Add opcode reduction pass
ClosedPublic

Authored by arsenm on Oct 10 2022, 9:48 PM.

Details

Summary

Try some dumb strength reductions to "simpler" opcodes.
Make some opcode substitutions I typically try to get smaller
MIR out of codegen. This is a bit target specific and I have a
lot of increasingly target specific modifications I try
during manual reduction.

Diff Detail

Event Timeline

arsenm created this revision.Oct 10 2022, 9:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 9:48 PM
arsenm requested review of this revision.Oct 10 2022, 9:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 9:48 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm updated this revision to Diff 466698.Oct 10 2022, 9:58 PM

Add a few more cases

arsenm updated this revision to Diff 466702.Oct 10 2022, 10:52 PM

Handle a few easy cases where it's easy to replace a target specific intrinsic with a structurally identical generic intrinsic

aeubanks accepted this revision.Oct 11 2022, 1:30 PM

nice!

llvm/tools/llvm-reduce/DeltaManager.cpp
91

looks like this patch is on top of something not in LLVM

llvm/tools/llvm-reduce/deltas/ReduceOpcodes.h
8

extra line

This revision is now accepted and ready to land.Oct 11 2022, 1:30 PM
arsenm marked 2 inline comments as done.Oct 11 2022, 7:21 PM