Корчагин Василий
2011-Jul-01 07:53 UTC
[LLVMdev] How to prevent generation of wide integers in LLVM IR?
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? Best regards, V. Korchagin.
Eli Friedman
2011-Jul-01 08:03 UTC
[LLVMdev] How to prevent generation of wide integers in LLVM IR?
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
Vasiliy Korchagin
2011-Jul-01 11:35 UTC
[LLVMdev] How to prevent generation of wide integers in LLVM IR?
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. > > -Eliscalarrepl 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?
Reasonably Related Threads
- [LLVMdev] How to prevent generation of wide integers in LLVM IR?
- [LLVMdev] How to prevent generation of wide integers in LLVM IR?
- [LLVMdev] How to prevent generation of wide integers in LLVM IR?
- [LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA
- [LLVMdev] Lowering "memcpy" intrinsic function on ARM using LDMIA/STMIA