bcardosolopes wrote:

Re @rnk @efriedma-quic 

> With the new cleanup scopes, the nesting depth is potentially O(statements), 
> which is a dimension of programs that tends to get pretty long.

That's a great observation!
My hope is that we can identify opportunities to optimize this without 
significantly impacting analysis performance, especially once we pinpoint 
real-world bottlenecks.

> Which, I guess does raise the question of, what kind of analyses or 
> transforms do we want to enable on CIR? People often talk about working on 
> std::vectors at a higher level, and those have cleanup scopes which will need 
> to get mopped up. Does this cleanup scope representation make that easy 
> enough?

While the cost isn't as high as some static analysis use cases, we will still 
need to traverse and deduplicate cleanup scopes during LLVM lowering. 
Otherwise, achieving parity with the original codegen will be difficult. I 
think that by introducing additional MLIR operation interfaces for scopes and 
abstracting some control flow queries through them, we can provide a canonical 
approach for analyzing these scopes. This should also help set clearer 
expectations for build-time overhead (dependent on which interface methods 
you'd use).

https://github.com/llvm/llvm-project/pull/177625
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to