[LLVMdev] prevent frontend from emitting i64

Alon Shaltiel (ashaltie) ashaltie at cisco.com
Thu Jan 29 00:06:06 PST 2015


Is it just an optimization pass? Maybe I can cancel it somehow with a flag or by doing some code editing? Can you point me to which passes may do that?

I'm working on editing a backend that can't work with anything larger than 32 bits. Does the legalize stage work on IR code? Maybe i can use that?

On Jan 29, 2015 5:41 AM, Ruiling Song <ruiling.song83 at gmail.com> wrote:
LLVM contains some optimization pass that will generate instructions operate on i64 or even i128 and more. The upstream backend utilize the legalize stage that can break it into instructions with smaller integer types if the target machine does not support that large integer type. There seems no way to prevent clang generate i64 instruction. Are you developing a new backend?

2015-01-28 17:55 GMT+08:00 Alon Shaltiel (ashaltie) <ashaltie at cisco.com<mailto:ashaltie at cisco.com>>:

Hello,

Is there a way to make clang create an IR file that doesn’t use 64 bit integers? My C code doesn’t use any 64bit types but still “clang –c –emit-llvm …” emits code that contains i64’s.



Thanks,

Alon

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu>         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150129/20485b58/attachment.html>


More information about the llvm-dev mailing list