[LLVMdev] Disabling certain optimizations in llvm-gcc and llc (original) (raw)

Harel Cain harel.cain at gmail.com
Wed Sep 7 06:32:10 PDT 2011


Hi all,

I'm trying to prevent two things from happening:

  1. Intrinsic memcpy calls of for example 16 bytes in the IR code being translated into movl commands in x86 assembly code, for example, this code: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %3, i8* getelementptr

inbounds ([16 x i8]* @.str1, i32 0, i32 0), i32 16, i32 1, i1 false) translated into this x86 assembly movl $6384738, 12(%ecx) # imm = 0x616C62 movl $543452274, 8(%ecx) # imm = 0x20646C72 movl $1870078063, 4(%ecx) # imm = 0x6F77206F movl $1819043176, (%ecx) # imm = 0x6C6C6568 this happens even if I run llc -O0. Any way to prevent it, instead calling memcpy in the assembly listing?

  1. sizeof's being resolved to literals already at the llvm-gcc front end stage when emitting IR, no matter if I use -O0 flag Is there any way to prevent it?

Thanks a lot in advance!

Harel Cain -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110907/bdbf4309/attachment.html>



More information about the llvm-dev mailing list