[PATCH] D153624: [SCEV] Make use of non-null pointers for range calculation

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 24 00:12:05 PDT 2023


nikic added inline comments.


================
Comment at: llvm/test/Analysis/ScalarEvolution/alloca.ll:27
 ;
   %alloca = alloca i32, align 4, addrspace(1)
   %int = ptrtoint ptr addrspace(1) %alloca to i64
----------------
arichardson wrote:
> Not related to this patch but I wonder if we could add a way to treat address spaces other than zero as also having non null allocas. For example for the CHERI targets AS200 has almost exactly the same semantics as as0 (other than pointers having additional metadata) and these AS0 only optimizations result in worse codegen. Maybe the allocas can be null should be opt-in rather than the default?
Sure -- you would have to add a new per-AS DataLayout property for this.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153624/new/

https://reviews.llvm.org/D153624



More information about the llvm-commits mailing list