[llvm-commits] [llvm] r143600 - in /llvm/trunk: lib/CodeGen/MachineInstr.cpp test/CodeGen/X86/MachineLICM-HoistSelectorRefs.ll

Chris Lattner clattner at apple.com
Thu Nov 3 11:26:09 PDT 2011


On Nov 3, 2011, at 10:18 AM, Peter Cooper wrote:
> Hi Chris
> 
> I agree that a new linkage type is better, but that seemed overkill when there's currently only one case where this occurs.  But yes, special casing by name is particularly gross.

This sort of thing is an instance of a more general problem.  I can imagine other front ends that want to unique strings for example, or do load-time optimizations that prevent something from being marked truly constant.  Marking the load as "runtime constant load" through metadata seems a more general way to model this than by introducing a new linkage type on the global, but perhaps I'm missing something.

> I did have a solution working in the earlier LICM pass but it then struggles to do CSE on these loads.  It also meant putting my special case code in 2 places which would have been even more gross.  If i change it to a new linkage type then i'll make sure and have earlyCSE and LICM work on it too.

Can you elaborate on what the problem was?  

-Chris




More information about the llvm-commits mailing list