This is an archive of the discontinued LLVM Phabricator instance.

[NFC][ValueTracking] Add OffsetZero into findAllocaForValue
ClosedPublic

Authored by vitalybuka on Aug 27 2020, 2:28 AM.

Details

Summary

For StackLifetime after finding alloca we need to check that
values ponting to the begining of alloca.

Diff Detail

Event Timeline

vitalybuka created this revision.Aug 27 2020, 2:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2020, 2:28 AM
vitalybuka requested review of this revision.Aug 27 2020, 2:28 AM
vitalybuka retitled this revision from [NFC,ValueTracking] Add OffsetZero into findAllocaForValue to [NFC][ValueTracking] Add OffsetZero into findAllocaForValue.Aug 27 2020, 3:29 AM
eugenis accepted this revision.Aug 27 2020, 1:16 PM

LGTM

llvm/lib/Analysis/ValueTracking.cpp
4371

Please address the lint warning.

This revision is now accepted and ready to land.Aug 27 2020, 1:16 PM
nikic added a subscriber: nikic.Aug 27 2020, 1:20 PM
nikic added inline comments.
llvm/lib/Analysis/ValueTracking.cpp
4375

You can just use GEP->hasAllZeroIndices() here.

vitalybuka marked 2 inline comments as done.

comments

This revision was landed with ongoing or failed builds.Aug 27 2020, 1:46 PM
This revision was automatically updated to reflect the committed changes.