patch: simplify getUnderlyingObjectsForInstr

Nick Lewycky nlewycky at google.com
Wed Feb 19 21:03:04 PST 2014


getUnderlyingObjects (the CodeGen one, not to be confused
with llvm::GetUnderlyingObjects the IR one) never puts any
PseudoSourceValue's in its objects list, except in the case where it's
given one as its starting Value in which case it only puts that one in and
returns.

Thus we don't need to test for PSV's every iteration through the loop, and
can simplify away local variable MayAlias. Remove one call to
Objects.clear() as all callers call with an empty UnderlyingObjectsVector.

I claim there's no functionality change in this patch. All tests still
pass. Convinced?

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140219/6e0a6979/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplify-getunderlyingobjectsforinstr-1.patch
Type: text/x-patch
Size: 1582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140219/6e0a6979/attachment.bin>


More information about the llvm-commits mailing list