[PATCH] D45330: [WIP][IPSCCP] Use PredicateInfo to propagate facts from cmp instructions.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 10:57:28 PDT 2018


fhahn created this revision.
fhahn added reviewers: davide, mssimpso, dberlin, efriedma.

This patch is an early proof-of-concept patch: it only handles
propagates facts to the true branch of an ICMP instruction and some
things are not done as efficiently as possible.

I am sharing it now to get some feedback on the overall approach: using
PredicateInfo in IPSCCP. It allows us to propagate facts about
conditions in the solver without much effort, at the cost of building
PredicateInfo for all functions up-front. If building it up-front is a
big issue, I suppose we could try to only insert copies for cmp
instructions involving operands that are not undefined or overdefined.

We should be able to extend it to also propagate additional facts about floats and nonnull.

What do you think?


https://reviews.llvm.org/D45330

Files:
  include/llvm/Transforms/Scalar/SCCP.h
  lib/Transforms/IPO/SCCP.cpp
  lib/Transforms/Scalar/SCCP.cpp
  test/Transforms/SCCP/ipsccp-predicated.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45330.141183.patch
Type: text/x-patch
Size: 9415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180405/d2b57cbf/attachment.bin>


More information about the llvm-commits mailing list