[llvm-dev] What is stack pointer adjustment on scheduling?

Qiu Chaofan via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 16 08:27:41 PDT 2019

Hi there,

I'm planning to implement a prototype about scheduling across calls in 
LLVM as my school project. When I look into MachineScheduler.cpp, I 
found this piece of comments for `isSchedBoundary`:

 > MachineScheduler does not currently support scheduling across calls.
 > To handle calls, the DAG builder needs to be modified to create
 > register anti/output dependencies on the registers clobbered by the
 > call's regmask operand. In PreRA scheduling, the stack pointer
 > adjustment already prevents scheduling across calls. In PostRA
 > scheduling, we need the isCall to enforce the boundary, but there
 > would be no benefit to postRA scheduling across calls this late
 > anyway.

What I'm not sure about is the 'stack pointer adjustment'. What is it? 
Is it the stack protector or some stuff about the calling convention? 
And how does it prevents scheduling across calls?



More information about the llvm-dev mailing list