usx95 wrote: > Thanks! > > I have one more question. So we need the reverse post order property of the > CFG to ensure that we visit everything in the right order. The only reason > why I am a bit unsure here, is because I wonder if it can ever cause some > trouble that the RAV visiting the subexpressions is crossing a basic block > boundary and venturing into that block too early, before all of its > predecessors have been visited. > > If this cannot happen, I think the current approach should be fine.
In principle, if the CFG is correct, this should not happen. Inner parts of a larger expression belonging to different blocks should be visited before outer parts of the expression. While visiting the outer expression, this would "try" to go into subexpressions but this should be skipped as we must have seen the subexpressions "before" the outer expressions. Added a test for a ternary operator where this could have happened. We verify that the loans are created in different blocks. https://github.com/llvm/llvm-project/pull/153661 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits