[all-commits] [llvm/llvm-project] 3cd457: [SCEV] Make use of non-null pointers for range cal...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jun 29 00:09:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3cd4571405ba9de14072439c23257d9de3a0673b
      https://github.com/llvm/llvm-project/commit/3cd4571405ba9de14072439c23257d9de3a0673b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/alloca.ll
    M llvm/test/Analysis/ScalarEvolution/incorrect-exit-count.ll
    M llvm/test/Analysis/ScalarEvolution/load.ll
    M llvm/test/Analysis/ScalarEvolution/nsw.ll
    M llvm/test/Analysis/ScalarEvolution/ptrtoint-global.ll
    M llvm/test/Analysis/ScalarEvolution/sdiv.ll
    M llvm/test/Analysis/ScalarEvolution/srem.ll

  Log Message:
  -----------
  [SCEV] Make use of non-null pointers for range calculation

We know that certain pointers (e.g. non-extern-weak globals or
allocas in default address space) are not null, in which case the
lowest address they can be allocated at is their alignment.

This allows us to calculate better exit counts for loops that have
an additional null check in the guarding condition
(see alloca_icmp_null_exit_count).

Differential Revision: https://reviews.llvm.org/D153624




More information about the All-commits mailing list