I am looking for an IR that is similar to LLVM IR, with its SSA form,
module->function->block->instruction etc.
But, I wish a much reduced type model.
I wish only three types:
1) An Integer of various bit-widths.
2) A pointer, but a pointer that does not need to point to a known
type. A sort of "pointer to unknown type".
3) Floats of various varieties.
For example, if we were using a pointer to step through an array of
32bit integers.
We would use: pointer = pointer + 4; (I.e. step over 4 octets at a time)
Is anyone aware of such an IR, or is there some way for trick LLVM IR
into only using the above 2 types?
IR already does (1) and (3). It does not seem to be able to do (2).
Kind Regards
James
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Michael
Am Di., 14. Apr. 2020 um 15:06 Uhr schrieb James Courtier-Dutton via
llvm-dev <llvm...@lists.llvm.org>:
Cheers,
Johannes
Does the LLVM IRBuilder currently allow adding an opaque pointer to a
LLVM .bc file?
Even if it does not compile, just being able to add it, would be helpful.
I could then run my own experimental passes against it.
Does using opaque pointers, adversely affect alias analysis?
I would have thought that it would have been useful to have both
pointer types available.
For example, if one wished to move from an opaque pointer to MLIR, one
would need to add passes to derive types first.
So, having a pass that converts from opaque pointer to typed pointer
and back again would have been useful.
The approach you describe kind of reduces the flexibility of LLVM.
I think LLVM IR -> MLIR and MLIR -> LLVM IR round tripping is a useful goal.
On Wed, 15 Apr 2020 at 17:28, David Blaikie <dbla...@gmail.com> wrote:
>
> opaque pointers don't exist in the IR yet - the goal is to reduce the places that use non-opacity of pointer types already/today and then opacify the existing pointer type, rather than introducing an opaque pointer type & having it concurrently with non-opaque pointer types. (though in retrospect such a migration might've been worth considering and/or might still be used as part of the migration, I guess)
>
I would have thought that it would have been useful to have both
pointer types available.
For example, if one wished to move from an opaque pointer to MLIR, one
would need to add passes to derive types first.
So, having a pass that converts from opaque pointer to typed pointer
and back again would have been useful.
The approach you describe kind of reduces the flexibility of LLVM.
I think LLVM IR -> MLIR and MLIR -> LLVM IR round tripping is a useful goal.
Kind Regards
James