[LLVMdev] How to prevent generation of wide integers in LLVM IR?

Vasiliy Korchagin vasiliy.korchagin at gmail.com
Fri Jul 1 04:35:32 PDT 2011


On 01.07.2011 12:03, Eli Friedman wrote:
> On Fri, Jul 1, 2011 at 12:53 AM, Корчагин Василий
> <vasiliy.korchagin at gmail.com>  wrote:
>> Hello, LLVMdev.
>>
>> The problem is that C backend doesn't support integers wider than 64
>> bits, but I need to use it on programs with wide integers in LLVM IR. My
>> question is how to deny LLVM to generate wide integer? Which part of
>> LLVM should I modify?
> scalarrepl is the only pass I can think of off the top of my head that
> does that normally (although there might be others); you can either
> avoid it (in favor of the simpler mem2reg), or hack it up so it
> doesn't do that.
>
> -Eli
scalarrepl didn't help. Command "opt -scalarrepl input.bc -o output.bc" 
produced the same bitcode, there are no changes in file. Neither helped 
scalarrepl-ssa.
You wrote that I can avoid emitting such code. Could you give me 
direction, where I can begin my hack?



More information about the llvm-dev mailing list