This is an archive of the discontinued LLVM Phabricator instance.

Delete dead code in PBQP (NFC)
ClosedPublic

Authored by vsk on Sep 9 2016, 1:26 PM.

Details

Summary

I tested this with "ninja llc check-llvm-codegen" on a Debug (x86, aarch64, arm) build.

Found with llvm-cov.

Diff Detail

Event Timeline

vsk updated this revision to Diff 70894.Sep 9 2016, 1:26 PM
vsk retitled this revision from to Delete dead code in PBQP (NFC).
vsk updated this object.
vsk added reviewers: aadg, jnspaulsson, lhames.
vsk added a subscriber: llvm-commits.
dblaikie added inline comments.
include/llvm/CodeGen/PBQP/Math.h
65–85

Looks like this (& other parts of this class) could be simplified by making it use unique_ptr<PBQPNum[]> for Data. There's still be some explicit code for the assignment operator (I'd suggest the copy-and-swap idiom) and while this code might not be used right now, it's probably generically useful enough (& once the change is made, simple enough) to keep around, but might deserve a unit test or two if it doesn't have any.

(same goes for similar Matrix changes - and probably for the various operator overloads too (eg: they're probably of sufficient general utility, but should have unit tests))

But I leave the final decisions up to Lang.

vsk added a comment.Oct 10 2016, 6:21 PM

@lhames ping?

include/llvm/CodeGen/PBQP/Math.h
65–85

Thanks for the note, using a unique_ptr for Data sounds like a good idea.

lhames accepted this revision.Oct 18 2016, 12:38 PM
lhames edited edge metadata.

Yep - go ahead and kill this off. :)

  • Lang.
This revision is now accepted and ready to land.Oct 18 2016, 12:38 PM
This revision was automatically updated to reflect the committed changes.