<div dir="ltr">Hi,<div><br></div><div>Can anyone help me with the stack slot coloring optimization?</div><div>This corresponding file is /lib/codegen/stackslotcoloring.cpp.</div><div><br></div><div>It is said this optimization was for stack slot overlay for frame size reduction, after register allocation phase.</div><div>And this transformation pass relies on the LiveStack analysis pass.</div><div><br></div><div>How, when checking the source code, it seems the LiveStack analysis has not been implemented, since the code  was found in LiveStackAnalysis.cpp: </div><div><br><div><i>bool LiveStacks::runOnMachineFunction(MachineFunction &MF) {</i></div><div><i>  TRI = MF.getTarget().getRegisterInfo();</i></div><div><i>  // FIXME: No analysis is being done right now. We are relying on the</i></div><div><i>  // register allocators to provide the information.</i></div><div><i>  return false;</i></div><div><i>}</i></div><div><br></div><div>And I found the greedy register allocator did nothing to fill the LiveStackAnalysis::<i>S2IMap, </i>which is critical for the stack slot coloring.</div><div>Furthermore, the LiveInterval analysis only computes live intervals for virtual registers, but not for stack slots which has frame indexes.</div>Does it mean this optimization has not been implemented yet ? And any advice for me to do it by myself?<br>Or am I misunderstanding the implementation?<br><br></div><div>I really need some advice eagerly! <br>Any help is greatly appreciated!</div><div><div><br></div>-- <br>Best regards,<div><br></div><div>Li Qingan</div>
</div></div>