systems-nuts / unifico

Compiler and build harness for heterogeneous-ISA binaries with the same stack layout.
4 stars 1 forks source link

Different number of callsite records in treeAdd #241

Closed blackgeorge-boom closed 1 year ago

blackgeorge-boom commented 1 year ago
cd unified_abi/layout/olden/treeadd
make clean; make stackmaps-check CFLAGS=-DTORONTO -j10

 [STACKMAPS CHECK] Checking stackmaps for main_aarch64_aligned.out main_x86_64_aligned.out
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/home/blackgeorge/Documents/phd/unified_abi/stack-metadata'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/blackgeorge/Documents/phd/unified_abi/stack-metadata'
WARNING: number of records for stackmap section 1 doesn't match (18 vs. 19)
...
blackgeorge-boom commented 1 year ago

Probably, one of the functions in main, is not lowered properly in the stackmaps:

...

    OLDEN_TIME(total_stop);
    chatting("olden: total time (in ms): %f\n",
             OLDEN_DURATION_MS(total_start, total_stop));

    exit(0);
}

I think we had a problem with exit() in NPB also, so it makes sense to fix this issue.

compor commented 1 year ago

Maybe just open a low-priority issue and record this (if we haven't already) and replace it with a return 0? At a low level I know that an exit call creates an unreachable path following it in LLVM code; not sure if this relates to stackmaps, but maybe it is relevant

blackgeorge-boom commented 1 year ago

Indeed, I think I've seen the unreachable path in LLVM IR! Ok, I'll have a brief look, otherwise, I'll replace it with return 0 or something.