This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] refactor: extract method haveNoCommonBitsSet
ClosedPublic

Authored by jingyue on May 12 2015, 10:49 PM.

Details

Summary

Extract method haveNoCommonBitsSet so that we don't have to duplicate this logic in
InstCombine and SeparateConstOffsetFromGEP.

This patch also makes SeparateConstOffsetFromGEP more precise by passing
DominatorTree to computeKnownBits.

Diff Detail

Event Timeline

jingyue updated this revision to Diff 25661.May 12 2015, 10:49 PM
jingyue retitled this revision from to [ValueTracking] refactor: extract method noCommonSetBits.
jingyue updated this object.
jingyue edited the test plan for this revision. (Show Details)
jingyue added reviewers: broune, majnemer, meheff.
jingyue added a subscriber: Unknown Object (MLST).
jingyue updated this revision to Diff 25711.May 13 2015, 10:47 AM

test that ValueTracking indeed leverages dominating conditions

jingyue edited the test plan for this revision. (Show Details)May 13 2015, 10:47 AM
majnemer accepted this revision.May 13 2015, 11:59 PM
majnemer edited edge metadata.

Looks pretty straightforward, LGTM.

include/llvm/Analysis/ValueTracking.h
51

hasNoCommonsBitsSet sounds a little more natural to me.

This revision is now accepted and ready to land.May 13 2015, 11:59 PM
broune edited edge metadata.May 14 2015, 11:22 AM

LGTM

test/Transforms/SeparateConstOffsetFromGEP/NVPTX/value-tracking-domtree.ll
17

to be 4 and does not share any set bits as 3. -> to be 4, which does not share any set bits with 3.

jingyue updated this revision to Diff 25826.May 14 2015, 4:44 PM
jingyue edited edge metadata.

rename noCommonSetBits to haveNoCommonBitsSet

jingyue retitled this revision from [ValueTracking] refactor: extract method noCommonSetBits to [ValueTracking] refactor: extract method haveNoCommonBitsSet.May 14 2015, 4:45 PM
jingyue updated this object.
jingyue closed this revision.May 14 2015, 4:56 PM