[PATCH] D29448: [RegAlloc] Don’t freeze reserved registers again if it is not necessary

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 10:27:45 PST 2017


MatzeB added a comment.



- Calling a `freeze` function and later changing the set of reserved registers intuitively seems wrong to me. I wonder whether this isn't more accidental than actually planned. The name `freeze` indicates to me that the information will not change anymore; What if early passes make decisions based on an incomplete reserved set, can we get into trouble? In any case I'd really like to understand why targets rely on changing the reserved register set later.
- While I am in favor to push things to a single call to freezeReservedRegs() I have no strong opinion on when this call happens; Do early passes actually need a notion of reserved registers?
- I'm not a fan of adding more and more target callbacks. We should first try hard to understand what is going on here and try to come to a solution where all targets behave the same without the need for a callback. Even if we figure out some targets need special handling we could employ existing mechanisms like having the target insert a pass at the apropriate part of the pipeline to re-freeze the registers.


https://reviews.llvm.org/D29448





More information about the llvm-commits mailing list