LLVM API Documentation
#include <MachineInstrAnnot.h>
Collaboration diagram for llvm::CallArgsDescriptor:
Public Member Functions | |
CallArgsDescriptor (CallInst *_callInstr, TmpInstruction *_retAddrReg, bool _isVarArgs, bool _noPrototype) | |
unsigned int | getNumArgs () const |
CallArgInfo & | getArgInfo (unsigned int op) |
CallInst * | getCallInst () const |
CallInst * | getReturnValue () const |
Value * | getIndirectFuncPtr () const |
TmpInstruction * | getReturnAddrReg () const |
bool | isVarArgsFunc () const |
bool | hasNoPrototype () const |
Static Public Member Functions | |
static CallArgsDescriptor * | get (const MachineInstr *MI) |
Definition at line 63 of file MachineInstrAnnot.h.
CallArgsDescriptor::CallArgsDescriptor | ( | CallInst * | _callInstr, | |
TmpInstruction * | _retAddrReg, | |||
bool | _isVarArgs, | |||
bool | _noPrototype | |||
) |
Definition at line 61 of file MachineCodeForInstruction.cpp.
References llvm::MachineCodeForInstruction::get(), llvm::CallInst::getCalledValue(), llvm::User::getNumOperands(), llvm::User::getOperand(), and llvm::MachineCodeForInstruction::setCallArgsDescriptor().
CallArgsDescriptor * CallArgsDescriptor::get | ( | const MachineInstr * | MI | ) | [static] |
CallArgsDescriptor::get - Mechanism to get the descriptor for a CALL MachineInstr. We get the LLVM CallInst from the return-address register argument of the CALL MachineInstr (which is explicit operand #2 for indirect calls or the last implicit operand for direct calls). We then get the CallArgsDescriptor from the MachineCodeForInstruction object for the CallInstr. This is roundabout but avoids adding a new map or annotation just to keep track of CallArgsDescriptors.
Definition at line 94 of file MachineCodeForInstruction.cpp.
References llvm::SparcV9::g0, llvm::MachineCodeForInstruction::get(), llvm::MachineCodeForInstruction::getCallArgsDescriptor(), llvm::MachineInstr::getImplicitRef(), llvm::MachineInstr::getNumImplicitRefs(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getType(), llvm::MachineOperand::getVRegValue(), MI, llvm::MachineOperand::MO_MachineRegister, and llvm::MachineOperand::MO_VirtualRegister.
Referenced by llvm::SparcV9RegInfo::suggestRegs4CallArgs().
CallArgInfo& llvm::CallArgsDescriptor::getArgInfo | ( | unsigned int | op | ) | [inline] |
Definition at line 79 of file MachineInstrAnnot.h.
Referenced by llvm::SparcV9RegInfo::suggestRegs4CallArgs().
CallInst* llvm::CallArgsDescriptor::getCallInst | ( | ) | const [inline] |
Definition at line 81 of file MachineInstrAnnot.h.
Value* llvm::CallArgsDescriptor::getIndirectFuncPtr | ( | ) | const [inline] |
Definition at line 83 of file MachineInstrAnnot.h.
unsigned int llvm::CallArgsDescriptor::getNumArgs | ( | ) | const [inline] |
Definition at line 78 of file MachineInstrAnnot.h.
Referenced by llvm::SparcV9RegInfo::suggestRegs4CallArgs().
TmpInstruction* llvm::CallArgsDescriptor::getReturnAddrReg | ( | ) | const [inline] |
Definition at line 84 of file MachineInstrAnnot.h.
CallInst * CallArgsDescriptor::getReturnValue | ( | ) | const |
Definition at line 82 of file MachineCodeForInstruction.cpp.
References llvm::Value::getType(), and llvm::Type::VoidTy.
Referenced by llvm::SparcV9RegInfo::suggestRegs4CallArgs().
bool llvm::CallArgsDescriptor::hasNoPrototype | ( | ) | const [inline] |
Definition at line 86 of file MachineInstrAnnot.h.
bool llvm::CallArgsDescriptor::isVarArgsFunc | ( | ) | const [inline] |
Definition at line 85 of file MachineInstrAnnot.h.