[PATCH] D102550: [ValueTracking] Mark GEP operand as nonnull if the result was loaded or stored

Danila Kutenin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 15 04:03:54 PDT 2021


danlark created this revision.
danlark added reviewers: nikic, spatel, lebedev.ri, RKSimon.
Herald added a subscriber: hiraditya.
danlark requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Nonnull inbounds GEP cannot be obtained from null pointer. So I decided to mark the GEP operand as non null if this happens. This saves around 0.05%-0.1% of the binary size at Google. I don't have commit rights. Danila Kutenin. kutdanila at yandex.ru


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102550

Files:
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/test/Analysis/ValueTracking/known-nonnull-at.ll
  llvm/test/Transforms/InstCombine/select-cmp-br.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102550.345622.patch
Type: text/x-patch
Size: 12935 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210515/809703d4/attachment.bin>


More information about the llvm-commits mailing list