-// Purpose:
-// Annotations used to pass information between code generation phases.
-//
-// History:
-// 5/10/02 - Vikram Adve - Created
-//**************************************************************************/
+//===----------------------------------------------------------------------===//
#ifndef MACHINE_INSTR_ANNOT_h
#define MACHINE_INSTR_ANNOT_h
#include "llvm/Annotation.h"
#include "llvm/CodeGen/MachineInstr.h"
#ifndef MACHINE_INSTR_ANNOT_h
#define MACHINE_INSTR_ANNOT_h
#include "llvm/Annotation.h"
#include "llvm/CodeGen/MachineInstr.h"
// Flag values for different argument passing methods
static const unsigned char IntArgReg = 0x1;
static const unsigned char FPArgReg = 0x2;
// Flag values for different argument passing methods
static const unsigned char IntArgReg = 0x1;
static const unsigned char FPArgReg = 0x2;
- bool usesIntArgReg() { return (bool) passingMethod & IntArgReg; }
- bool usesFPArgReg() { return (bool) passingMethod & FPArgReg; }
- bool usesStackSlot() { return (bool) passingMethod & StackSlot; }
+ bool usesIntArgReg() { return (bool) (passingMethod & IntArgReg);}
+ bool usesFPArgReg() { return (bool) (passingMethod & FPArgReg); }
+ bool usesStackSlot() { return (bool) (passingMethod & StackSlot);}
const CallInst* callInstr; // The call instruction == result value
const Value* funcPtr; // Pointer for indirect calls
TmpInstruction* retAddrReg; // Tmp value for return address reg.
const CallInst* callInstr; // The call instruction == result value
const Value* funcPtr; // Pointer for indirect calls
TmpInstruction* retAddrReg; // Tmp value for return address reg.
unsigned int getNumArgs() const { return argInfoVec.size(); }
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
return argInfoVec[op]; }
unsigned int getNumArgs() const { return argInfoVec.size(); }
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
return argInfoVec[op]; }
const Value* getIndirectFuncPtr() const { return funcPtr; }
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
bool isVarArgsFunc() const { return isVarArgs; }
bool hasNoPrototype() const { return noPrototype; }
const Value* getIndirectFuncPtr() const { return funcPtr; }
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
bool isVarArgsFunc() const { return isVarArgs; }
bool hasNoPrototype() const { return noPrototype; }
// Annotation mechanism to annotate a MachineInstr with the descriptor.
// This is not demand-driven because annotations can only be created
// at restricted points during code generation.
// Annotation mechanism to annotate a MachineInstr with the descriptor.
// This is not demand-driven because annotations can only be created
// at restricted points during code generation.