This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Fix not removing first instruction in MachineBasicBlock
ClosedPublic

Authored by arsenm on Apr 19 2022, 3:43 PM.

Details

Summary

This had the surprising behavior of using whatever instruction
happened to be first in the block as an anchor point to stick random
implicit defs on. Use a real implicit_def instead.

Diff Detail

Event Timeline

arsenm created this revision.Apr 19 2022, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 3:43 PM
arsenm requested review of this revision.Apr 19 2022, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 3:43 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm updated this revision to Diff 423759.Apr 19 2022, 4:06 PM

Fix test for generic registers

markus added inline comments.Apr 20 2022, 5:33 AM
llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
111

When I originally decided to just slap a implicit-def to the first MI in the entry block instead of building a new instruction I thought it would be unsafe for the delta debugging algorithm to add instructions here. I did not dig deep into that though so maybe it is of no concern.

arsenm added inline comments.Apr 20 2022, 5:41 AM
llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
111

It’s not unsafe, but gives suboptimal results. D124049 tries to address this problem

markus accepted this revision.Apr 24 2022, 10:56 PM
This revision is now accepted and ready to land.Apr 24 2022, 10:56 PM