[LLVMdev] larger-than-legal types in LLVM IR
Arnold
aschwaighofer at apple.com
Tue Jan 20 06:14:14 PST 2015
Sent from my iPhone
> On Jan 19, 2015, at 4:38 PM, Sanjay Patel <spatel at rotateright.com> wrote:
>
> Are there any LLVM guidelines / documentation for handling larger-than-legal data types (either scalars or vectors)?
>
> Currently, the backend may crash [1], miscompile [2], or make a big mess [3] when presented with data types that are bigger than native.
>
> In the case of [3], is it a bug in the vectorizer to produce a non-legal vector type (<16 x i64>) or should the backend be able to handle that more reasonably? In that particular case, things are further complicated because -loop-unroll is able to completely remove the loop and the large vector type disappears.
Crashing on an illegal type is a bug.
We can sometimes get bigger than legal types if the loop has code that goes from type to the (e.g casts).
What should happen is that codegen handles those types gracefully and that the cost model estimated the cost of the generated code correctly (conservatively).
If the cost does not match the genarated code we should fix the cost model: either by returning a target specific cost eg. X86TTI or by adjusting the shared cost model basictti.
>
> [1] http://llvm.org/bugs/show_bug.cgi?id=19797
> [2] http://llvm.org/bugs/show_bug.cgi?id=21184
> [3] http://llvm.org/bugs/show_bug.cgi?id=20225
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150120/819f339d/attachment.html>
More information about the llvm-dev
mailing list