[PATCH] D99987: [NewGVN] Track simplification dependencies for phi-of-ops.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 13:14:37 PDT 2021


fhahn created this revision.
fhahn added reviewers: davide, efriedma, asbirlea.
Herald added subscribers: hiraditya, Prazek.
fhahn requested review of this revision.
Herald added a project: LLVM.

If we are using a simplified value, we need to add an extra
dependency this value , because changes to the class of the
simplified value may require us to invalidate any decision based on
that value.

This is done by adding such values as additional users, however the
current code does not excludes temporary instructions.

At the moment, this means that we miss those dependencies for
phi-of-ops, because they are temporary instructions at this point. We
instead need to add the extra dependencies to the root instruction of
the phi-of-ops.

This patch pushes the responsibility of adding extra users to the
callers of createExpression & performSymbolicEvaluation. At those
points, it is clearer which real instruction to pick.

Alternatively we could either pass the 'real' instruction as additional
argument or use another map, but I think the approach in the patch makes
things a bit easier to follow.

Fixes PR35074.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99987

Files:
  llvm/lib/Transforms/Scalar/NewGVN.cpp
  llvm/test/Transforms/NewGVN/phi-of-ops-simplification-dependencies.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99987.335642.patch
Type: text/x-patch
Size: 15631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210406/430d1f7b/attachment.bin>


More information about the llvm-commits mailing list