[PATCH] D78503: RFC: [ValueTracking] Let analyses assume a value cannot be partially poison

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 09:43:59 PDT 2020


aqjune created this revision.
aqjune added reviewers: spatel, lebedev.ri, jdoerfert, reames, nikic, nlopes, regehr.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

This is RFC for fixes in poison-related functions of ValueTracking.
These functions assume that a value can be poison bitwisely, but the semantics
of bitwise poison is not clear at the moment.
Allowing a value to have bitwise poison adds complexity to reasoning about
correctness of optimizations.

This patch makes the analysis functions simply assume that a value is
either fully poison or not, which has been used to understand the correctness
of a few previous optimizations.
The bitwise poison semantics seems to be only used by these functions as well.

In terms of implementation, using value-wise poison concept makes existing
functions do more precise analysis, which is what this patch contains.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78503

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp
  llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
  llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  llvm/test/Analysis/ScalarEvolution/flags-from-poison.ll
  llvm/test/Analysis/ScalarEvolution/nsw.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78503.258772.patch
Type: text/x-patch
Size: 13577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200420/ae4924e6/attachment.bin>


More information about the llvm-commits mailing list