Halide icon indicating copy to clipboard operation
Halide copied to clipboard

Add support to CodeGen_LLVM for generating architecture specific assertions.

Open zvookin opened this issue 1 year ago • 2 comments

CodeGen_ARM, for SVE, generates a runtime check that the current processor supports the vector length compiled for. This is done in begin_func by checking if the current function does not have internal linkage. Adding a specific method to accomplisht his would be cleaner.

zvookin avatar Feb 13 '24 03:02 zvookin

See b0e4f995b8ab5ece0edab896703048f2c9b32410 .

zvookin avatar Feb 13 '24 03:02 zvookin

I suspect the thing to do is override compile(Module) in CodeGen_ARM to run an inject-assertions IRMutator on the right LoweredFunc, and then call the base class method. Or maybe override compile(LoweredFunc) and just mutate the ones with an external linkage type

abadams avatar Feb 16 '24 20:02 abadams