When addresses are a displacement from a constant (this can happen in device drivers), the resulting address gets folded rather than using base+displacement addressing. This results in code bloat. Example test attached. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: const-addr.ll URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091201/89479493/attachment.ksh>
Right. I am aware of this problem but am not sure about what to do about it. It's common for a number 32-bit immediates in the same block with the same lower or higher 16-bit. Since the immediates will not be split until late in codegen, the target independent optimizer will not CSE them. Please file a bug, I need to think about a proper solution. Evan On Dec 1, 2009, at 11:19 AM, Bagel wrote:> When addresses are a displacement from a constant (this can happen in device drivers), the resulting address gets folded rather than using base+displacement addressing. This results in code bloat. Example test attached. > <const-addr.ll>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
I'm not authorized to file bugs. Would someone please enter this? Thank you, bagel Evan Cheng wrote: > Right. I am aware of this problem but am not sure about what to do about it. > It's common for a number 32-bit immediates in the same block with the same > lower or higher 16-bit. Since the immediates will not be split until late in > codegen, the target independent optimizer will not CSE them. > > Please file a bug, I need to think about a proper solution. > > Evan
Eli Friedman
2009-Dec-01 23:13 UTC
[LLVMdev] thumb2 folding of constant addresses unhelpful
On Tue, Dec 1, 2009 at 3:08 PM, Bagel <bagel99 at gmail.com> wrote:> I'm not authorized to file bugs. Would someone please enter this?Anyone can create an account at llvm.org/bugs/ and file a bug. -Eli