• dterei's avatar
    LLVM: Use getelementptr instruction for a lot of situations · a42400e6
    dterei authored
    LLVM supports creating pointers in two ways, firstly through
    pointer arithmetic (by casting between pointers and ints)
    and secondly using the getelementptr instruction. The second way
    is preferable as it gives LLVM more information to work with.
    
    This patch changes a lot of pointer related code from the first
    method to the getelementptr method.
    a42400e6
CodeGen.hs 41.3 KB