I don't think anyone is trying to throw away phi's... I think what Connor
is proposing is more a better interface to this cloning operation than
anything else. Instead of having a separate list of phi's, you can just
pre-populate the remap table before doing the clone. For the first loop
iteratio
On Mon, 2016-08-29 at 21:06 -0400, Connor Abbott wrote:
> So, you've noticed that your method of handling phi's while cloning
> doesn't handle phi's that point to other phi's in the same block.
> Particularly, something like:
>
> a = phi(b, ...)
> b = phi(a, ...)
>
> which is supposed to swap a a
So, you've noticed that your method of handling phi's while cloning
doesn't handle phi's that point to other phi's in the same block.
Particularly, something like:
a = phi(b, ...)
b = phi(a, ...)
which is supposed to swap a and b each iteration. Here's a better
strategy which should be simpler th
---
src/compiler/nir/nir.h | 3 +++
src/compiler/nir/nir_clone.c | 64 +++-
2 files changed, 60 insertions(+), 7 deletions(-)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 0ab3ebc..9083bd0 100644
--- a/src/compiler/nir/nir.h
+++