ymandel added a comment.

Gabor -- An alternative solution to this problem, assuming the current 
structure of the CFG, is to add a map to the `Environment` of type `VarDecl` -> 
`BindingDecl` that registers `BindingDecl`s in need of initialization. Then, I 
could modify the `DeclStmt` interpretation to check this map for each VarDecl 
it processes, processing the corresponding BindingDecl if there is one.  This 
solution, while a bit more complicated, has the mild advantage of incurring 
less cost (on average) since VarDecls are less common than DeclRefExpr. Also, 
it's eager instead of lazy, which seems somewhat easier to reason about.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139544/new/

https://reviews.llvm.org/D139544

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to