[PBQP] Use a local bit-matrix to speedup searching an edge in the graph

Arnaud A. de Grandmaison arnaud.degrandmaison at arm.com
Tue Mar 3 14:05:58 PST 2015


Hi Lang,

 

The attached patch addresses a FIXME in RegAllocPBQP.cpp, in the
Interference class when building the graph.

 

This indeed improves compilation time when building llvm+clang+lldb.

 

However, I wonder if this check+continue for an already seen edge should
exist at all.

 

I may have missed something in my reading / understanding of
Interference::apply(), but I do not think the algorithm can exhibit such a
case --- or it would be an error, which we should trap with an assert,
either in Interference::apply, or even better in Graph::addEdge. I replaced
the continue statement with an llvm_unreachable, and it never triggered
while building llvm+clang+lldb (granted, this is not a proof, just an hint).
Removing this check+continue brings yet another nice speedup, making pbqp
build llvm+clang+lldb slightly faster than the default allocator in release
mode.

 

Cheers,

--

Arnaud A. de Grandmaison

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150303/c525a0f8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PBQP-Use-a-local-bit-matrix-to-speedup-searching-an-.patch
Type: application/octet-stream
Size: 2294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150303/c525a0f8/attachment.obj>


More information about the llvm-commits mailing list