COFF: De-virtualize and inline garbage collector functions.
authorRui Ueyama <ruiu@google.com>
Wed, 10 Jun 2015 04:21:47 +0000 (04:21 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 10 Jun 2015 04:21:47 +0000 (04:21 +0000)
commit8b33f59bfd3ea3c9da56fc3a8b4e0341bf499509
tree36400f82baae7e10bab28215a27e728bd8748d43
parentd290eb4565b379d25ef067967d32ac5d65f6b804
COFF: De-virtualize and inline garbage collector functions.

isRoot, isLive and markLive functions are called very frequently.
Previously, they were virtual functions. This patch make them
non-virtual.

Also this patch checks chunk liveness before calling its mark().
Previously, we did that at beginning of markLive(), so the virtual
function would return immediately if it's live. That was inefficient.

llvm-svn: 239458
lld/COFF/Chunks.cpp
lld/COFF/Chunks.h