[PATCH] D75980: [LV] Generate RT checks up-front and remove them if required. (WIP)
Evgeniy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 23:32:20 PDT 2020
ebrevnov added a comment.
I'm glad to see this discussion alive again. Thanks Roman!
I think it deserves a dedicated discussion on dev list in a wider audience because the subject is not trivial one.
In fact I have an experience of doing similar thing in SLP and it was mainly negative. Things look simple in the beginning and we went ahead and implemented this approach. The problem was that over the time it became hard to manage pre-generated instructions correctly and we started having nasty bugs. Everything is simple until you don't have sharing. If you have references from multiple places (both from inside IR and internal data structures) things become complex and error prone. I would not like to go this direction again until we 1000% sure things will remain simple.
One more thing is concerning me in this particular implementation. I think the way we are trying to "hide" Checks.TmpBlock from all global analysis and data structures is fragile and can be source of bugs in future. In my opinion it would be much easier and cleaner to make pre-generated code runtime dead (by changing guarding condition to be unconditionally false) and let dedicated cleanup passes make their job.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75980/new/
https://reviews.llvm.org/D75980
More information about the llvm-commits
mailing list