[PATCH] D42576: [test-suite] Add prototypes to functions in Olden and MiBench

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 11:22:04 PST 2018


dschuff added a comment.

I'll just add that what we do in WebAssembly right now for unprototyped functions is to codegen them using the fixed-arg calling convention; at link-time if there are any mismatches between the definition and any calls, then the program has UB, and the resulting WebAssembly module will be invalid. I think this currently has the problem that if the definition does turn out to be vararg, then we have generated an invalid module even though the program is correct (I consider that a bug or shortcoming in our toolchain though). In any case, we do aim to support correct programs with prototypeless functions. If the test suite has non-vararg cases where there are mismatches between the callsites and/or the definition (I have seen that in some other test/benchmark suites), then even though that works on most X86 and ARM ABIs that I know of it's still UB and I'd be in favor of removing it from LLVM's test suite.


Repository:
  rT test-suite

https://reviews.llvm.org/D42576





More information about the llvm-commits mailing list