[LLVMdev] Moving towards a singular pointer type
Antoine Pitrou
antoine at python.org
Tue Feb 17 08:56:54 PST 2015
Hi,
Dirkjan Ochtman <dirkjan <at> ochtman.nl> writes:
>
> As far as I understand, this change is wanted because the LLVM
> infrastructure derives no value from knowing the types, and there's a
> cost in terms of code spent to support all of it. I've been creating a
> frontend that mostly writes out plain-text IR.
>
> Is the type-checking of pointer types still done when constructing IR
> through builder APIs? Otherwise this makes debugging significantly
> harder for me. I've also really liked how readable LLVM IR is, and it
> would seem like this change would negatively affect the readability.
I kindof agree with Dirkjan. We use a similar approach (Numba calls into
llvmlite to generate textual LLVM IR), and the type checking can come in
handy to avoid later crashes (otherwise it's very easy to mess up a
getelementptr instruction).
However, llvmlite does track types on its own, so we could also add our
own error checking before generating the IR.
Regards
Antoine.
More information about the llvm-dev
mailing list