effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Switch to LLVM's tailcc calling convention by passing arguments without env

Open marvinborner opened this issue 1 year ago • 1 comments

It's not clear how much this change influences the performance of the LLVM backend; we should write/merge the new benchmarking infrastructure first before merging this.

marvinborner avatar Jun 04 '24 12:06 marvinborner

I was able to fix the stack overflows after some amount of debugging. However, certain tests now take >10min or do not seem to finish at all (EDIT: before the LLVM opt pass, after optimization the slow-down seems to be around 5-10x). I'm unsure whether this can be easily fixed or is implied by our use of tailcc.

IO tests still segfault, but not with stack overflows but NPE.

marvinborner avatar Jun 17 '24 23:06 marvinborner

To document what @phischu told me: we only have three locations where we really NEED tailcc. All of which are generated and not in hand-written LLVM code:

  1. jumps
  2. return
  3. invoke

Since we are in CPS those need to be tail, for all others we do not care necessarily.

b-studios avatar Jul 23 '24 09:07 b-studios