[LLVMdev] Problem of stack slot coloring

Qingan Li ww345ww at gmail.com
Mon Oct 13 06:29:38 PDT 2014


Hi,

Can anyone help me with the stack slot coloring optimization?
This corresponding file is /lib/codegen/stackslotcoloring.cpp.

It is said this optimization was for stack slot overlay for frame size
reduction, after register allocation phase.
And this transformation pass relies on the LiveStack analysis pass.

How, when checking the source code, it seems the LiveStack analysis has not
been implemented, since the code  was found in LiveStackAnalysis.cpp:

*bool LiveStacks::runOnMachineFunction(MachineFunction &MF) {*
*  TRI = MF.getTarget().getRegisterInfo();*
*  // FIXME: No analysis is being done right now. We are relying on the*
*  // register allocators to provide the information.*
*  return false;*
*}*

And I found the greedy register allocator did nothing to fill the
LiveStackAnalysis::*S2IMap, *which is critical for the stack slot coloring.
Furthermore, the LiveInterval analysis only computes live intervals for
virtual registers, but not for stack slots which has frame indexes.
Does it mean this optimization has not been implemented yet ? And any
advice for me to do it by myself?
Or am I misunderstanding the implementation?

I really need some advice eagerly!
Any help is greatly appreciated!

-- 
Best regards,

Li Qingan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141013/24f2518b/attachment.html>


More information about the llvm-dev mailing list