14 #define DEBUG_TYPE "mips-os16"
23 "mips32-function-mask",
25 cl::desc(
"Force function to be mips32"),
59 if (needsFPFromSig(F))
66 case Instruction::FAdd:
67 case Instruction::FSub:
68 case Instruction::FMul:
69 case Instruction::FDiv:
70 case Instruction::FRem:
71 case Instruction::FPToUI:
72 case Instruction::FPToSI:
73 case Instruction::UIToFP:
74 case Instruction::SIToFP:
75 case Instruction::FPTrunc:
76 case Instruction::FPExt:
77 case Instruction::FCmp:
82 if (
const CallInst *CI = dyn_cast<CallInst>(
I)) {
83 DEBUG(
dbgs() <<
"Working on call" <<
"\n");
84 Function &F_ = *CI->getCalledFunction();
85 if (needsFPFromSig(F_))
97 bool doneUsingMask =
false;
101 unsigned int functionIndex = 0;
102 bool modified =
false;
107 if (!doneUsingMask) {
116 doneUsingMask =
true;
LLVM Argument representation.
The main container class for the LLVM Intermediate Representation.
Type * getReturnType() const
StringRef getName() const
static cl::opt< std::string > Mips32FunctionMask("mips32-function-mask", cl::init(""), cl::desc("Force function to be mips32"), cl::Hidden)
void addFnAttr(Attribute::AttrKind N)
Add function attributes to this function.
const Type::TypeID FloatTyID
initializer< Ty > init(const Ty &Val)
virtual bool runOnModule(Module &M)
ModulePass * createMipsOs16(MipsTargetMachine &TM)
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
bool isDeclaration() const
const Type::TypeID DoubleTyID
unsigned getOpcode() const
getOpcode() returns a member of one of the enums like Instruction::Add.
const ArgumentListType & getArgumentList() const