You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently basic haskell list type is used, but we often want to index the list (even in llvm-hs itself eg IRBuilder.gep)
eg. AST.Type.StructureType , Constant.Array etc..
The text was updated successfully, but these errors were encountered:
andrew-wja
changed the title
Data.Vector more appropriate for aggregate types
Data.Vector more appropriate to represent the subtypes of aggregate types
Aug 31, 2021
@jfaure there's certainly an argument to be made for it. Do we actually use numerical indexing on a list of types with Data.List.!! in the code? If so we probably should switch to an array rather than a list, I would be happy to review a patch with this change.
Edit: I looked in LLVM.AST.Typed and we do indeed index into the list of types using an integer. It would be worth looking for all instances of Data.List.!! in the codebase and considering whether more things should become vectors rather than lists.
In the same vein, Integer is used everywhere for llvm int literals.
Since I use Word64 whenever possible (ie. pretty much always since anything larger than i64 is very rare), i have to call 'fromIntegral' frequently.
The issue here is that the overhead from unnecessarily using gmp is massive.
currently basic haskell list type is used, but we often want to index the list (even in llvm-hs itself eg IRBuilder.gep)
eg. AST.Type.StructureType , Constant.Array etc..
The text was updated successfully, but these errors were encountered: