[LLVMdev] Missing optimization - constant parameter

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Aug 5 09:19:29 PDT 2013


On Aug 5, 2013, at 8:34 AM, Maurice Marks <maurice.marks at gmail.com> wrote:

> Are you sure that's it? I commented that block out, rebuilt llvm 3.3,  and it still duplicates the constant.
> My concern is that long constant loads increase code size and if they can be avoided by better targeting it would be a win. My project's application of llvm tends to use a lot of long constants so this can be a significant optimization.
> I'll do some more debugging now that you have pointed me in the right direction.

It is also possible that the coalescer is duplicating the instruction like Rafael suggested. It will do that if it can't eliminate a copy.

/jakob




More information about the llvm-dev mailing list