[llvm-commits] [llvm] r82076 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/CodeGen/LLVMTargetMachine.cpp lib/Transforms/Scalar/CodeGenLICM.cpp
Chris Lattner
clattner at apple.com
Fri Sep 18 11:40:21 PDT 2009
On Sep 16, 2009, at 1:25 PM, Dan Gohman wrote:
> Author: djg
> Date: Wed Sep 16 15:25:11 2009
> New Revision: 82076
>
> URL: http://llvm.org/viewvc/llvm-project?rev=82076&view=rev
> Log:
> Add a new pass for doing late hoisting of floating-point and vector
> constants out of loops. These aren't covered by the regular LICM
> pass, because in LLVM IR constants don't require separate
> instructions. They're not always covered by the MachineLICM pass
> either, because it doesn't know how to unfold folded constant-pool
> loads. This is somewhat experimental at this point, and off by
> default.
Hi Dan,
I'm generally accepting of short term hacks to solve real problems,
but how hard would it be to just improve machine licm's handling of
loads from constant pools? Hoisting on X86 is not necessarily a win
because you can substantially increase register pressure (always) and
pulling the constant pool load out of the loop will prevent it from
being folded into load+op instructions.
This also looks like it hoists all zero vectors which are "very
cheap", not loads. In general, I'm pretty dubious about this approach.
-Chris
More information about the llvm-commits
mailing list