[ScalarEvolution] Analyze ranges for heap allocations
authorArthur Eubanks <aeubanks@google.com>
Wed, 28 Jun 2023 21:08:38 +0000 (14:08 -0700)
committerArthur Eubanks <aeubanks@google.com>
Thu, 29 Jun 2023 16:35:20 +0000 (09:35 -0700)
commit22ca38da25e19a7c5fcfeb3f22159aba92ec381e
tree04e628375803927259b3b91bceca0e142d317573
parent110dfb4c58688fb65b2357177eca7b3bb85d1d2c
[ScalarEvolution] Analyze ranges for heap allocations

Followup to D153624. Allows for better exit count calculations for loops checking heap allocations against null.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D154001
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/malloc.ll
llvm/test/Transforms/PhaseOrdering/gep-null-compare-in-loop.ll