OSDN Git Service

[SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or poisoned PHI...
authorMax Kazantsev <max.kazantsev@azul.com>
Mon, 25 Dec 2017 09:35:10 +0000 (09:35 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Mon, 25 Dec 2017 09:35:10 +0000 (09:35 +0000)
commitcbe298eee6ea9aa21fa062244e5e449b2da1052b
tree6fe1c9d0801e920cbe3f17b354c483e9f56facb9
parent7ab8fb9a274c9a9b62c09b38c8f8771f539fa1f5
[SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or poisoned PHI nodes

PHI that has at least one unrelocated input cannot cause any issues by itself,
though its uses should be carefully verified. With this patch PHIs are allowed
to have any inputs but when all inputs are unrelocated the PHI is marked as
unrelocated and if not all inputs are unrelocated then the PHI is marked as
poisoned. Poisoned pointers can be used only in three ways: to derive new
pointers, in PHIs or in comparisons against constants that are exclusively
derived from null.

Patch by Daniil Suchkov!

Differential Revision: https://reviews.llvm.org/D41006

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321438 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/SafepointIRVerifier.cpp
test/SafepointIRVerifier/from-same-relocation-in-phi-nodes.ll [new file with mode: 0644]
test/SafepointIRVerifier/unrecorded-live-at-sp.ll
test/SafepointIRVerifier/uses-in-phi-nodes.ll