[llvm] [Exegesis] Do not assume the size and layout of the assembled snippet (PR #79636)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 15:43:45 PST 2024


boomanaiden154 wrote:

> I thought about this too: ideally we could insert an artificially-created object file with more than 3 symbols right before we ran it with JIT. But IIUC llvm-exegesis currently lacks such functionality (I think using snippet file as input doesn't exercise this program path) so it would be difficult to write a test at this moment.

Using the snippet file does exercise this path (as the assembly needs to be wrapped in setup code, duplicated/wrapped in a loop, and then emitted into an in-memory object file), but it only lets you load in textual assembly that gets assembled (through the same path) within `llvm-exegesis`, so doesn't help with testing. Yeah, I can't think of a good way to write a test. I'm perfectly fine without landing it with a test given the difficulty of writing an appropriate test.

https://github.com/llvm/llvm-project/pull/79636


More information about the llvm-commits mailing list