WenleiHe wrote:

> but I would like more agreement that this is a good idea

This seems like a natural extension of existing flatten attribute. 

> Deeply nested hot paths in performance-sensitive applications

I can see this being useful -- for some perf critical path, sometimes it's 
desirable to inline everything and avoid calls. Without such extension, this 
currently cannot be achieved reliably without side effects outside of a 
particular call tree. 

That said, I agree that using this to handle PGO stale profile may not be 
sustainable -- i won't do that. 

But disregard the PGO use case mentioned above, I think having the extension 
just for perf critical path is enough of a justification. 

FWIW, I've personally used existing flatten attempting to flatten the entire 
call tree for critical path, but only to realize it only inlines one level. I'd 
argue that the literal meaning of flatten is reduce *to* one level, not reduce 
*by* level. I think this extension at least would fill the gap for such use 
case to reduce to one level. 

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

Reply via email to