I tested this with "ninja llc check-llvm-codegen" on a Debug (x86, aarch64, arm) build.
Found with llvm-cov.
Paths
| Differential D24424
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 Timelinevsk updated this object. dblaikie added inline comments.
This revision is now accepted and ready to land.Oct 18 2016, 12:38 PM Closed by commit rL285018: [pbqp] Delete some dead code, NFC. (authored by vedantk). · Explain WhyOct 24 2016, 1:44 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 70894 include/llvm/CodeGen/PBQP/CostAllocator.h
include/llvm/CodeGen/PBQP/Graph.h
include/llvm/CodeGen/PBQP/Math.h
include/llvm/CodeGen/PBQP/Solution.h
include/llvm/CodeGen/RegAllocPBQP.h
|
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.