Add TRI::getCallPreservedMask() hook.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 14 Jan 2012 01:45:25 +0000 (01:45 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 14 Jan 2012 01:45:25 +0000 (01:45 +0000)
commitbd6dc3be1dac2d153f29927cad517af9e579b204
tree73e91764a64e57b50aa8f83a733e065106292738
parent92180988a4495c9c41ff2d19f6e700cef0bf0b2c
Add TRI::getCallPreservedMask() hook.

The hook returns a bit-mask of call-preserved registers that will
eventually replace the current list of implicit defs on call
instructions.  This will make it possible to support multiple calling
conventions without duplicating call instruction descriptors.

The call-preserved mask is slightly different from the list returned by
the getCalleeSavedRegs() hook, it includes all aliases that are
preserved by calls.

The hook takes a CallingConv::ID argument instead of a MachineFunction
pointer, so it can provide information about calls to extern functions,
and even indirect function calls.

TRI::getCalleeSavedRegs() returns information about the function
currently being compiled. TRI::getCallPreservedMask() returns
information about the functions it is calling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148165 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetRegisterInfo.h