Closed robdockins closed 4 years ago
I don't believe there's an upper limit in LLVM -- changing this to a larger type seems totally reasonable 👍
For reference, LLVM uses uint64_t
for the number of elements in a sequential type. I think it would be totally reasonable to just change this to Int64
. Do you want to make that change? I'd be happy to review it.
Yeah, I'm working on some changes in conjunction with llvm-pretty-bc-parser to figure out what should be done.
One curious thing I've noticed... character data seems like it is sometimes being stored using 10-bit fields for each character, even though I haven't seen anything outside the ASCII range. Any idea why that might be happening?
I can't recall exactly what's happening there, but I remember there being a lot of weird corner cases around the encoding. Character data showing up as 10-bit values seems totally in-line with what I would expect from the bitcode format.
CF #74
Closed via #74
For example, in the definition of types,
Int32
is used to describe the length of arrays. clang is happy to compile code that allocates arrays with more than2^31 -1
elements, and then then the llvm-pretty-bc-parser builds a type with a negative array length.It seems clear that these should be
Word32
at least; but maybe they should just beNatural
instead. Is there some upper limit on these sizes arising from the LLVM bitcode format itself?