[llvm-dev] What is register scavenging?
陳韋任 via llvm-dev
llvm-dev at lists.llvm.org
Sun Apr 2 15:56:48 PDT 2017
> It's a helper for passes that run after register allocation but still
> need a new register they can use without breaking anything. It looks
> around nearby instructions[*] to see if there's anything it can prove
> is unused at the moment, and as a last ditch effort can spill
> registers to the stack.
I am reading TriCore document . It mention `eliminateFrameIndex`,
which is a pass after register allocation,
translates virtual stack slot reference to a register-offset pair. If the
offset is too large, additional instructions are
needed to compute the effective address, which need more register after the
register allocation. Now comes the
Now I understand what it said after your help.
One last point, I am not native English speaker. By "as a last ditch
effort can spill registers to the stack.", you
mean if register scavenging cannot save us, then we have to do the spilling?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev