felipepiovezan wrote:

> > > > > do we have in mind any other languages that will implement this?
> > > > 
> > > > 
> > > > I suspect any language wanting to implement this notion of function 
> > > > splitting (e.g. all the users of corosplitter) and virtual frames could 
> > > > have a use for this
> > > 
> > > 
> > > We already have `.cold` functions that do this in clang. Might be nice to 
> > > support that on the llvm side so this could be testable here.
> > 
> > 
> > There are two things that confuse me about this idea:
> > 
> > * I thought `.cold` functions came from the hot-cold-split pass, not from 
> > Clang?
> 
> I was speaking loosely, meaning "in the llvm.org not the swift fork of 
> llvm-project (and thus testable there). We'd have to decide which runtime 
> this would go in, maybe we need an "assembly language" or a general fallback 
> runtime for this?
> 
> > * Don't those create a new frame on the stack, i.e. a new CFA?
> 
> I don't remember whether they push a frame or tail call.

I looked at the code that creates `.cold` functions, and it doesn't seem to 
tail call, creating a new frame instead (at least the `.ll` tests have no 
`musttail` attribute in those functions).

Maybe some C++-specific construct that could go through the C++ language 
plugin? I tried their coroutines, but the IR generated wasn't very promising 
either and TTTT I'm not familiar with how they are compiled.

https://github.com/llvm/llvm-project/pull/112720
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to