[PATCH] D16403: Add scope information to CFG

Peter Szecsi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 07:28:38 PST 2018


szepet added a comment.

In https://reviews.llvm.org/D16403#1011218, @NoQ wrote:

> Yeah, i mean, like, if we change the scope markers to also appear even when no variables are present in the scope, then it would be possible to replace loop markers with some of the scope markers, right?


OK, probably I am a bit too slow for this, but I dont get it. Yes, it would be possible to replace them IF these markers appears even in case of no variables. However, this patch is based on LocalScopes which practically means that VarDecls are needed.  Aaand here we are, it would require a different approach to consistently mark things like LoopExit.
 Another thing that what should be the TriggerStmt? I guess the Stmt of the loop. So, LoopExit and ScopeExit would be the same but the underlying TriggerStmt would decide which marks a loop and which marks a variable? Then I can just rewrite LoopExit into ScopeEnd. Or if you would like to see that, a subclass of ScopeEnd. However, the main functionality should stay the same (I guess).
So, could you help me out what are those things I do not see/understand?


Repository:
  rL LLVM

https://reviews.llvm.org/D16403





More information about the llvm-commits mailing list