[llvm-commits] [PATCH] Fix llvm.invariant support

Kenneth Uildriks kennethuil at gmail.com
Sat Nov 13 17:00:03 PST 2010


A less drastic attempt to fix issues with support for
llvm.invariant.start and llvm.invariant.end.  It involves adding
invariant tracking by block to MemoryDependenceAnalysis.  When a load
is analyzed, the invariant information for that block and its
predecessors is lazily computed and consulted.  If the load's target
is not invariant anywhere in the block, there is no need to look for
invariant markers during the scan.  If it is invariant throughout the
block, no def or clobber can be in that block, so we can skip
backwards to the block(s) that began the invariance.  If it is
invariant through part of the block, we need to continue scanning
backwards past clobbers until we find the def or an invariant marker -
we can't assume that the scan starts after the invariant end, but
instead assume that we *might* have started scanning in the middle of
an invariant region until we can prove otherwise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MemDep.patch
Type: text/x-patch
Size: 11695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101113/1a430c26/attachment.bin>


More information about the llvm-commits mailing list