bool shouldOptForSize(const MachineBasicBlock &MBB, ProfileSummaryInfo *PSI,
BlockFrequencyInfo *BFI);
-/// \returns the intrinsic ID for a G_INTRINSIC or G_INTRINSIC_W_SIDE_EFFECTS
-/// instruction \p MI.
-unsigned getIntrinsicID(const MachineInstr &MI);
-
} // End namespace llvm.
#endif
return F.hasOptSize() || F.hasMinSize() ||
llvm::shouldOptimizeForSize(MBB.getBasicBlock(), PSI, BFI);
}
-
-unsigned llvm::getIntrinsicID(const MachineInstr &MI) {
-#ifndef NDEBUG
- unsigned Opc = MI.getOpcode();
- assert(Opc == TargetOpcode::G_INTRINSIC ||
- Opc == TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS);
-#endif
- return MI.getOperand(MI.getNumExplicitDefs()).getIntrinsicID();
-}
const TargetRegisterInfo &TRI,
unsigned Depth) const {
unsigned Op = MI.getOpcode();
- if (Op == TargetOpcode::G_INTRINSIC && isFPIntrinsic(getIntrinsicID(MI)))
+ if (Op == TargetOpcode::G_INTRINSIC && isFPIntrinsic(MI.getIntrinsicID()))
return true;
// Do we have an explicit floating point instruction?
case TargetOpcode::G_INTRINSIC: {
// Check if we know that the intrinsic has any constraints on its register
// banks. If it does, then update the mapping accordingly.
- unsigned ID = getIntrinsicID(MI);
+ unsigned ID = MI.getIntrinsicID();
unsigned Idx = 0;
if (!isFPIntrinsic(ID))
break;