OSDN Git Service

AArch64: Replace a RegScavenger instance with LivePhysRegs
authorMatthias Braun <matze@braunis.de>
Wed, 6 Jul 2016 21:31:27 +0000 (21:31 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 6 Jul 2016 21:31:27 +0000 (21:31 +0000)
commit2a63bae27bd2b969e10bc61f526822da73a86281
treed6a910415b72ebc52f44f3e74fe01d2396511b8e
parent705101d8000f9ce5f13d4c6e439b1bd63b6380dc
AArch64: Replace a RegScavenger instance with LivePhysRegs

findScratchNonCalleeSaveRegister() just needs a simple liveness
analysis, use LivePhysRegs for that as it is simpler and does not depend
on the kill flags.

This commit adds a convenience function available() to LivePhysRegs:
This function returns true if the given register is not reserved and
neither the register nor any of its aliases are alive.

Differential Revision: http://reviews.llvm.org/D21865

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274685 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LivePhysRegs.h
lib/CodeGen/LivePhysRegs.cpp
lib/Target/AArch64/AArch64FrameLowering.cpp