[PATCH] D97077: [SCEV] Pass an explicit context to computeKnownBits

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 12:14:40 PST 2021


reames created this revision.
reames added reviewers: nikic, fhahn.
Herald added subscribers: dantrushin, hiraditya, mcrosier.
Herald added a reviewer: bollu.
reames requested review of this revision.
Herald added a project: LLVM.

This actually changes less than it appears.  computeKnownBits will chose it's own context if one is not passed in.  However, since it doesn't know which function is being queried, it can't use an context for the non-instruction case.  So the only actual change in behavior here is for arguments, global values, etc..

The test changes are a bit weird, but I left them in (as opposed to rebasing over them) as I think it's relevant.  The interesting instruction has to come before the assume or the ephemeral value logic ignores the assume.  That's, well, a bit weird.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97077

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/ranges.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97077.325056.patch
Type: text/x-patch
Size: 4179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210219/d7e1242b/attachment.bin>


More information about the llvm-commits mailing list