[ABI] Rewrite RegisterIsCalleeSaved.
The goal of this patch is twofold: First, it removes a wrong comment (at least, not correctly describing what the function does). Then, it rewrites the function to use a StringSwitch where the registers are enumerated explicitly instead of being computed programmatically. Other than being much shorter, it's much easier to read (and given the ABI won't change anytime soon, I don't think there's need to generalize). While here, I added an assert that the register name is always empty, as the previous implementation of the function assumed so. Differential Revision: https://reviews.llvm.org/D37420 llvm-svn: 312501
Loading
Please sign in to comment