[PATCH] D44571: [CGP] Avoid segmentation fault when doing PHI node simplifications

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 09:37:30 PDT 2018


bjope added a comment.

I had not seen https://reviews.llvm.org/D43758 so this is my attempt at solving the same problem. Although, this patch also takes care of some problems with non-deterministic behavior.

I'm also a little bit afraid that the solution in https://reviews.llvm.org/D43758 has some other limitations. See the XXX at line 2983.
The new loop that was added in https://reviews.llvm.org/D43758 (to avoid multiple eraseFromParent() in the second loop) is doing eraseFromParent() itself. Without removing the erased PHI-nodes from the PhiNodesToMatch, and without making sure that the erased PHI nodes aren't already in the MatchedPHINodeMapping.


Repository:
  rL LLVM

https://reviews.llvm.org/D44571





More information about the llvm-commits mailing list