This is an archive of the discontinued LLVM Phabricator instance.

[bugpoint] Reduce metadata that does not contribute to crash.
ClosedPublic

Authored by fhahn on Oct 20 2019, 8:53 PM.

Details

Summary

Add a new reducer that drops metadata that does not contribute to the
crash from instructions.

It adjusts the metadata.ll test case, as now also the instruction level
metadata will get dropped.

Diff Detail

Event Timeline

fhahn created this revision.Oct 20 2019, 8:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 20 2019, 8:53 PM
fhahn updated this revision to Diff 225819.Oct 20 2019, 9:19 PM

Fix typo

reames requested changes to this revision.Oct 28 2019, 11:19 AM
reames added inline comments.
llvm/tools/bugpoint-passes/TestPasses.cpp
178

*range* metadata

llvm/tools/bugpoint/CrashDebugger.cpp
852

Er, it really looks like you should be iterating the instruction set above?

This revision now requires changes to proceed.Oct 28 2019, 11:19 AM
fhahn updated this revision to Diff 226873.Oct 29 2019, 4:42 AM

Update patch to retain metadata for selected instructions. Add additional test to make sure we correctly drop metadata from some instructions, while retaining it for others.

fhahn marked 3 inline comments as done.Oct 29 2019, 4:50 AM
fhahn added inline comments.
llvm/tools/bugpoint-passes/TestPasses.cpp
178

I've slightly changed the test pass, to additionally require the operand to be an fadd instruction, to avoid the call being the only remaining instruction.

llvm/tools/bugpoint/CrashDebugger.cpp
852

Yes, we should retain metadata on all instructions in Insts/Instructions! This seems to be consistent with other ListReducers.

reames accepted this revision.Oct 29 2019, 9:42 AM

LGTM

This revision is now accepted and ready to land.Oct 29 2019, 9:42 AM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.