This is an archive of the discontinued LLVM Phabricator instance.

Give up on array allocas in getPointerDereferenceableBytes
ClosedPublic

Authored by dotdash on Dec 19 2017, 8:53 AM.

Details

Summary

As suggested by Eli Friedman, don't try to handle array allocas here,
because of possible overflows, instead rely on instcombine converting
them to allocations of array types.

Diff Detail

Repository
rL LLVM

Event Timeline

dotdash created this revision.Dec 19 2017, 8:53 AM
efriedma accepted this revision.Dec 19 2017, 12:00 PM

LGTM with one minor change.

lib/IR/Value.cpp
659 ↗(On Diff #127542)

The allocated type of an alloca is always sized (the verifier checks this).

This revision is now accepted and ready to land.Dec 19 2017, 12:00 PM
This revision was automatically updated to reflect the committed changes.