[PATCH] D149423: [ValueTracking] Use knownbits interface for determining if `div`/`rem` are safe to speculate

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 14:17:37 PDT 2023


goldstein.w.n updated this revision to Diff 523937.
goldstein.w.n added a comment.
Herald added subscribers: hoy, pcwang-thead, Enna1.

Add a new flag `PreservesOpCharacteristics`. **If its true** it is
assumed that the user will not do anything to the `Inst` argument that
would change the result of
`isSafeToSpeculativelyExecute{WithOpcode}`. If it true,
`isSafeToSpeculativelyExecute{WithOpcode}` will use KnownBits / proper
ValueTracking analysis. **If its false**,
`isSafeToSpeculativelyExecute{WithOpcode}` not use KnownBits / proper
ValueTracking analysis and the user may modify the operands in a way
that may change their values with respect to the analysis.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149423

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Analysis/IVUsers.cpp
  llvm/lib/Analysis/LazyValueInfo.cpp
  llvm/lib/Analysis/LoopInfo.cpp
  llvm/lib/Analysis/LoopNestAnalysis.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/CodeGen/Analysis.cpp
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/CodeGen/ExpandVectorPredication.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/lib/Transforms/Scalar/GuardWidening.cpp
  llvm/lib/Transforms/Scalar/JumpThreading.cpp
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/lib/Transforms/Scalar/LoopFlatten.cpp
  llvm/lib/Transforms/Scalar/LoopRerollPass.cpp
  llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
  llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
  llvm/lib/Transforms/Utils/FlattenCFG.cpp
  llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Transforms/LICM/speculate-div.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149423.523937.patch
Type: text/x-patch
Size: 33522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230519/d6a09fe8/attachment-0001.bin>


More information about the llvm-commits mailing list