Instruction *visitInstruction(Instruction &I) { return 0; }
private:
+ Instruction *visitCallSite(CallSite CS);
bool transformConstExprCastCall(CallSite CS);
// InsertNewInstBefore - insert an instruction New before instruction Old
// CallInst simplification
//
Instruction *InstCombiner::visitCallInst(CallInst &CI) {
- if (transformConstExprCastCall(&CI)) return 0;
- return 0;
+ return visitCallSite(&CI);
}
// InvokeInst simplification
//
Instruction *InstCombiner::visitInvokeInst(InvokeInst &II) {
- if (transformConstExprCastCall(&II)) return 0;
- return 0;
+ return visitCallSite(&II);
}
// getPromotedType - Return the specified type promoted as it would be to pass
}
}
+// visitCallSite - Improvements for call and invoke instructions.
+//
+Instruction *InstCombiner::visitCallSite(CallSite CS) {
+ if (transformConstExprCastCall(CS)) return 0;
+
+
+ return 0;
+}
+
// transformConstExprCastCall - If the callee is a constexpr cast of a function,
// attempt to move the cast to the arguments of the call/invoke.
//