LLVM 19.0.0git
Macros | Functions | Variables
RISCVRedundantCopyElimination.cpp File Reference
#include "RISCV.h"
#include "RISCVInstrInfo.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/Debug.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "riscv-copyelim"
 

Functions

 STATISTIC (NumCopiesRemoved, "Number of copies removed.")
 
 INITIALIZE_PASS (RISCVRedundantCopyElimination, "riscv-copyelim", "RISC-V Redundant Copy Elimination", false, false) static bool guaranteesZeroRegInBlock(MachineBasicBlock &MBB
 
 assert (TBB !=nullptr &&"Expected branch target basic block")
 
 if (CC==RISCVCC::COND_EQ &&Cond[2].getReg()==RISCV::X0 &&TBB==&MBB) return true
 

Variables

const SmallVectorImpl< MachineOperand > & Cond
 
const SmallVectorImpl< MachineOperand > MachineBasicBlockTBB
 
auto CC = static_cast<RISCVCC::CondCode>(Cond[0].getImm())
 
return false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "riscv-copyelim"

Definition at line 35 of file RISCVRedundantCopyElimination.cpp.

Function Documentation

◆ assert()

assert ( TBB = nullptr &&"Expected branch target basic block")

◆ if()

if ( CC  = =RISCVCC::COND_EQ &&Cond[2].getReg()==RISCV::X0 &&TBB==&MBB)

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( RISCVRedundantCopyElimination  ,
"riscv-copyelim"  ,
"RISC-V Redundant Copy Elimination"  ,
false  ,
false   
) &

◆ STATISTIC()

STATISTIC ( NumCopiesRemoved  ,
"Number of copies removed."   
)

Variable Documentation

◆ CC

auto CC = static_cast<RISCVCC::CondCode>(Cond[0].getImm())

Definition at line 79 of file RISCVRedundantCopyElimination.cpp.

Referenced by llvm::AMDGPUMachineFunction::AMDGPUMachineFunction(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::DWARFTypePrinter::appendSubroutineNameAfter(), llvm::DwarfUnit::applySubprogramAttributes(), ARCCondCodeToString(), areCallingConvEligibleForTCO_64SVR4(), llvm::ARMCondCodeFromString(), llvm::ARMCondCodeToString(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::ARMVectorCondCodeFromString(), llvm::ARMVPTPredToString(), canGuaranteeTCO(), CanInvertMVEVCMP(), carryFlagToValue(), llvm::SwitchCG::SwitchLowering::caseClusterRank(), llvm::AMDGPUCallLowering::CCAssignFnForCall(), llvm::AMDGPUTargetLowering::CCAssignFnForCall(), llvm::AArch64TargetLowering::CCAssignFnForCall(), llvm::R600TargetLowering::CCAssignFnForCall(), llvm::ARMTargetLowering::CCAssignFnForCall(), llvm::PPCTargetLowering::ccAssignFnForCall(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::AMDGPUCallLowering::CCAssignFnForReturn(), llvm::AMDGPUTargetLowering::CCAssignFnForReturn(), llvm::ARMTargetLowering::CCAssignFnForReturn(), CCMaskForCondCode(), changeFPCCToAArch64CC(), changeFPCCToANDAArch64CC(), changeFPCCToORAArch64CC(), changeIntCCToAArch64CC(), changeVectorFPCCToAArch64CC(), checkBoolTestSetCCCombine(), checkVSELConstraints(), classifySecond(), llvm::X86::classifySecondCondCodeInMacroFusion(), classifySecondInstInMacroFusion(), llvm::DISubroutineType::cloneWithCC(), combine_CC(), combineAddOrSubToADCOrSBB(), combineBrCond(), combineCMov(), combineExtSetcc(), llvm::AMDGPUTargetLowering::combineFMinMaxLegacy(), llvm::AMDGPUTargetLowering::combineFMinMaxLegacyImpl(), combineM68kBrCond(), combineM68kSetCC(), combineMinNumMaxNumImpl(), combinePredicateReduction(), combinePTESTCC(), llvm::VETargetLowering::combineSelect(), combineSelect(), llvm::VETargetLowering::combineSelectCC(), combineSelectOfTwoConstants(), combineSelectToBinOp(), combineSetCC(), combineSetCCAtomicArith(), combineSetCCCCR(), combineSetCCEFLAGS(), combineSetCCMOVMSK(), combineSubABS(), combineSubSetcc(), combineVectorSizedSetCCEquality(), combineVSelectWithAllOnesOrZeros(), combineX86SetCC(), llvm::X86InstrInfo::commuteInstructionImpl(), llvm::ARMBaseInstrInfo::commuteInstructionImpl(), llvm::RISCVInstrInfo::commuteInstructionImpl(), computeBytesPoppedByCalleeForSRet(), computeCalleeSaveRegisterPairs(), llvm::SwitchCG::SwitchLowering::computeSplitWorkItemInfo(), condCodeToFCC(), llvm::DwarfUnit::constructTypeDIE(), llvm::dwarf::ConventionString(), createCMovFP(), createFPCmp(), llvm::createLibcall(), llvm::ARMBaseInstrInfo::createMIROperandComment(), createPHIsForCMOVsInSinkBB(), llvm::DIBuilder::createSubroutineType(), llvm::CSKYTargetLowering::CSKYTargetLowering(), decideComp(), EmitAVX512Test(), EmitCMP(), emitComparison(), emitConditionalComparison(), emitConjunctionRec(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), EmitPALMetadataCommon(), emitSelectPseudo(), EmitVectorComparison(), llvm::examineCFlagsUse(), llvm::TargetLowering::expandABD(), llvm::TargetLowering::expandIntMINMAX(), llvm::SparcTargetLowering::expandSelectCC(), llvm::TargetLowering::expandUADDSUBO(), ExtendUsesToFormExtLoad(), foldADCToCINC(), foldAddSubBoolOfMaskedVal(), foldAndOrOfSETCC(), foldCSELOfCSEL(), foldCSELofCTTZ(), foldExtendedSignBitTest(), foldLogOpOfMaskedICmps(), foldOverflowCheck(), llvm::TargetFolder::FoldSelect(), llvm::ConstantFolder::FoldSelect(), foldSelectOfConstantsUsingSra(), foldVSelectToSignBitSplatMask(), FPCCToARMCC(), FPCondCCodeToFCC(), llvm::fpCondCode2Fcc(), llvm::GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(), generateComparison(), getAArch64Cmp(), getAArch64XALUOOp(), llvm::Constant::getAggregateElement(), getArgBaseReg(), getAssignFnsForCC(), getBitTestCondition(), llvm::AVRInstrInfo::getBrCond(), llvm::RISCVCC::getBrCond(), llvm::RISCVInstrInfo::getBrCond(), llvm::MipsABIInfo::GetCalleeAllocdArgSizeInBytes(), llvm::SIRegisterInfo::getCalleeSavedRegs(), llvm::X86RegisterInfo::getCalleeSavedRegs(), getCallOpcode(), llvm::SystemZELFRegisters::getCallPreservedMask(), llvm::PPCRegisterInfo::getCallPreservedMask(), llvm::SystemZRegisterInfo::getCallPreservedMask(), llvm::VERegisterInfo::getCallPreservedMask(), llvm::AArch64RegisterInfo::getCallPreservedMask(), llvm::SIRegisterInfo::getCallPreservedMask(), llvm::ARMBaseRegisterInfo::getCallPreservedMask(), llvm::LoongArchRegisterInfo::getCallPreservedMask(), llvm::RISCVRegisterInfo::getCallPreservedMask(), llvm::X86RegisterInfo::getCallPreservedMask(), llvm::DISubroutineType::getCC(), getCCForBRcc(), getCmpToAddCondition(), llvm::M68k::GetCondBranchFromCond(), GetCondBranchFromCond(), llvm::TargetLoweringBase::getCondCodeAction(), getCopyFromParts(), getCRIdxForSetCC(), getCSETCondCode(), llvm::AArch64RegisterInfo::getDarwinCallPreservedMask(), llvm::AMDGPUSubtarget::getDefaultFlatWorkGroupSize(), llvm::SIModeRegisterDefaults::getDefaultForCallingConv(), llvm::getFCmpCode(), llvm::getFCmpCodeWithoutNaN(), llvm::MDNodeKeyImpl< DISubroutineType >::getHashValue(), getIntrinsicCmp(), getMinMaxOpcodeForFP(), llvm::Mangler::getNameWithPrefix(), llvm::AArch64TargetLowering::getNumRegistersForCallingConv(), llvm::SITargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::X86TargetLowering::getNumRegistersForCallingConv(), getOperandsForBranch(), getOppositeBranchCondition(), llvm::X86::GetOppositeBranchCondition(), llvm::RISCVCC::getOppositeBranchCondition(), llvm::M68k::GetOppositeBranchCondition(), GetOppositeBranchCondition(), llvm::AVRInstrInfo::getOppositeCondition(), llvm::ARMCC::getOppositeCondition(), getOppositeCondition(), llvm::SIProgramInfo::getPGMRSrc1(), llvm::SIProgramInfo::getPGMRSrc2(), getPredicateForSetCC(), getPTest(), getPTXCmpMode(), llvm::AArch64TargetLowering::getRegisterTypeForCallingConv(), llvm::SITargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::SystemZTargetLowering::getRegisterTypeForCallingConv(), llvm::X86TargetLowering::getRegisterTypeForCallingConv(), llvm::M68kRegisterInfo::getReservedRegs(), llvm::X86RegisterInfo::getReservedRegs(), llvm::GetReturnInfo(), llvm::RISCVDAGToDAGISel::getRISCVCCForIntCC(), getRsrc1Reg(), getScratchSizeKey(), getSETCC(), getStageName(), llvm::ARMCC::getSwappedCondition(), getSwappedCondition(), llvm::AArch64RegisterInfo::getThisReturnPreservedMask(), llvm::ARMBaseRegisterInfo::getThisReturnPreservedMask(), getUsedNZCV(), getVCmpInst(), getVectorComparison(), getVectorComparisonOrInvert(), llvm::AArch64TargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::SITargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::MipsTargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::RISCVTargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::X86TargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::X86::getVPCMPImmForCond(), llvm::X86::getX86ConditionCode(), getX86SSEConditionCode(), handleMaskRegisterForCallingConv(), hasByteCountSuffix(), hasChangeableCCImpl(), INITIALIZE_PASS(), llvm::AVRInstrInfo::insertBranch(), llvm::M68kInstrInfo::insertBranch(), llvm::RISCVInstrInfo::insertBranch(), llvm::SparcInstrInfo::insertBranch(), llvm::X86InstrInfo::insertBranch(), llvm::AArch64InstrInfo::insertSelect(), llvm::GCNTTIImpl::instCombineIntrinsic(), IntCCToARMCC(), llvm::intCCToAVRCC(), IntCondCCodeToICC(), intCondCCodeToRcond(), llvm::intCondCode2Icc(), invertFPCondCodeUser(), llvm::AMDGPU::isArgPassedInSGPR(), llvm::AArch64RegisterInfo::isArgumentRegister(), llvm::X86RegisterInfo::isArgumentRegister(), llvm::M68k::isCalleePop(), isCallingConvCCompatible(), llvm::AArch64Subtarget::isCallingConvWin64(), llvm::X86Subtarget::isCallingConvWin64(), llvm::AMDGPU::isChainCC(), isCMN(), IsCMPZCSINC(), llvm::TargetLoweringBase::isCondCodeLegal(), llvm::TargetLoweringBase::isCondCodeLegalOrCustom(), isConditionalZeroOrAllOnes(), llvm::AMDGPU::isEntryFunctionCC(), isEquivalentMaskless(), isGTorGE(), IsIntegerCC(), llvm::isIntVECondCode(), llvm::AMDGPU::isKernel(), llvm::MDNodeKeyImpl< DISubroutineType >::isKeyOf(), isLegalDSPCondCode(), isLowerSaturate(), isLowerSaturatingConditional(), isLTorLE(), llvm::AMDGPU::isModuleEntryFunctionCC(), isSaturatingMinMax(), isValidMVECond(), isValueTypeInRegForCC(), llvm::RISCVTargetLowering::joinRegisterPartsIntoValue(), llvm::LPCC::lanaiCondCodeToString(), llvm::AMDGPULegalizerInfo::legalizeFExp(), llvm::AMDGPULegalizerInfo::legalizeFlogCommon(), llvm::TargetLowering::LegalizeSetCCCondCode(), LLVMSetFunctionCallConv(), LLVMSetInstructionCallConv(), llvm::AMDGPULegalizerInfo::loadInputValue(), LookThroughSetCC(), lower1BitShuffle(), LowerABD(), LowerAndToBT(), LowerAndToBTST(), llvm::X86TargetLowering::LowerAsmOutputForConstraint(), llvm::LanaiTargetLowering::LowerBR_CC(), llvm::MSP430TargetLowering::LowerBR_CC(), LowerBR_CC(), LowerBRCOND(), llvm::RISCVCallLowering::lowerCall(), llvm::TargetLowering::lowerCmpEqZeroToCtlzSrl(), llvm::AMDGPUTargetLowering::lowerFEXP(), llvm::AMDGPUTargetLowering::LowerFLOGCommon(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::RISCVCallLowering::lowerFormalArguments(), LowerINTRINSIC_W_CHAIN(), LowerIntVSETCC_AVX512(), lowerKernelArguments(), llvm::RISCVTargetLowering::LowerOperation(), lowerOverflowArithmetic(), llvm::AMDGPUCallLowering::lowerReturn(), llvm::AArch64CallLowering::lowerReturn(), llvm::LanaiTargetLowering::LowerSELECT_CC(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerSELECT_CC(), llvm::HexagonTargetLowering::LowerSETCC(), llvm::LanaiTargetLowering::LowerSETCC(), llvm::MSP430TargetLowering::LowerSETCC(), LowerTruncateToBTST(), LowerVectorAllEqual(), LowerVSETCC(), LowerXALUO(), llvm::X86TargetLowering::markLibCallAttributes(), markRegisterParameterAttributes(), matchSetCC(), MatchVectorAllEqualTest(), mayTailCallThisCC(), mayUseCarryFlag(), mayUseP9Setb(), llvm::Mips::MipsFCCToString(), needCarryOrOverflowFlag(), NegateCC(), onlyZeroFlagUsed(), llvm::operator<<(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::RISCVInstrInfo::optimizeCondBranch(), llvm::RISCVInstrInfo::optimizeSelect(), outputCallingConvention(), overflowFlagToValue(), parseCond(), parseCondBranch(), llvm::LLParser::parseMDField(), performANDSETCCCombine(), llvm::ARMTargetLowering::PerformBRCONDCombine(), performBRCONDCombine(), llvm::ARMTargetLowering::PerformCMOVCombine(), llvm::ARMTargetLowering::PerformCMOVToBFICombine(), performConcatVectorsCombine(), performCONDCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), PerformHWLoopCombine(), PerformMinMaxFpToSatCombine(), llvm::AMDGPUTargetLowering::performSelectCombine(), performSELECTCombine(), PerformSELECTCombine(), performSubsToAndsCombine(), performSunpkloCombine(), PerformUMinFpToSatCombine(), PerformVSetCCToVCTPCombine(), performXORCombine(), PerformXORCombine(), llvm::LanaiInstPrinter::printCCOperand(), llvm::SparcInstPrinter::printCCOperand(), llvm::VEInstPrinter::printCCOperand(), llvm::AArch64InstPrinter::printCondCode(), llvm::AArch64InstPrinter::printInverseCondCode(), llvm::ARMInstPrinter::printMandatoryInvertedPredicateOperand(), llvm::ARMInstPrinter::printMandatoryPredicateOperand(), llvm::ARMInstPrinter::printPredicateOperand(), llvm::LanaiInstPrinter::printPredicateOperand(), llvm::ARMInstPrinter::printVPTPredicateOperand(), processSwitches(), llvm::RegsForValue::RegsForValue(), llvm::X86InstrInfo::replaceBranchWithTailCall(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), llvm::AArch64InstrInfo::reverseBranchCondition(), llvm::ARMBaseInstrInfo::reverseBranchCondition(), llvm::AVRInstrInfo::reverseBranchCondition(), llvm::MSP430InstrInfo::reverseBranchCondition(), llvm::RISCVInstrInfo::reverseBranchCondition(), llvm::SparcInstrInfo::reverseBranchCondition(), llvm::VEInstrInfo::reverseBranchCondition(), llvm::X86InstrInfo::reverseBranchCondition(), llvm::LoopCachePrinterPass::run(), llvm::LoopInterchangePass::run(), safeWithoutCompWithNull(), SearchLoopIntrinsic(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), llvm::FunctionLoweringInfo::set(), llvm::FastISel::CallLoweringInfo::setCallee(), llvm::Function::setCallingConv(), llvm::CallBase::setCallingConv(), llvm::TargetLoweringBase::setCmpLibcallCC(), llvm::TargetLoweringBase::setCondCodeAction(), llvm::AMDGPUPALMetadata::setEntryPoint(), llvm::AMDGPUPALMetadata::setHwStage(), llvm::TargetLoweringBase::setLibcallCallingConv(), llvm::TargetLowering::CallLoweringInfo::setLibCallee(), llvm::AMDGPUPALMetadata::setNumUsedAgprs(), llvm::AMDGPUPALMetadata::setNumUsedSgprs(), llvm::AMDGPUPALMetadata::setNumUsedVgprs(), llvm::AMDGPUPALMetadata::setRsrc1(), llvm::AMDGPUPALMetadata::setRsrc2(), llvm::AMDGPUPALMetadata::setScratchSize(), llvm::AMDGPUPALMetadata::setWave32(), shouldConvertSelectOfConstantsToMath(), shouldDisableArgRegFromCSR(), shouldDisableRetRegFromCSR(), llvm::SelectionDAGBuilder::ShouldEmitAsBranches(), shouldGuaranteeTCO(), llvm::TargetLoweringBase::shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd(), llvm::AArch64TargetLowering::shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd(), llvm::RISCVTargetLowering::shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd(), llvm::X86TargetLowering::shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd(), llvm::SIMachineFunctionInfo::SIMachineFunctionInfo(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::TargetLowering::SimplifyMultipleUseDemandedBits(), llvm::TargetLowering::SimplifySetCC(), simplifySetCCWithCTPOP(), llvm::SwitchCG::sortAndRangeify(), llvm::SPARCCondCodeToString(), splitIntVSETCC(), llvm::RISCVTargetLowering::splitValueIntoRegisterParts(), translateSetCCForBranch(), truncateAVX512SetCCNoBWI(), tryConvertSVEWideCompare(), trySwapVSelectOperands(), tryToFoldExtOfLoad(), tryToWidenSetCCOperands(), upgradeMaskedCompare(), useInversedSetcc(), llvm::VECondCodeToString(), llvm::VECondCodeToVal(), llvm::InstCombinerImpl::visitShl(), llvm::WebAssemblyTargetLowering::WebAssemblyTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().

◆ Cond

Definition at line 75 of file RISCVRedundantCopyElimination.cpp.

Referenced by addConditions(), llvm::addPredicatedMveVpredNOp(), llvm::addPredicatedMveVpredROp(), llvm::R600InstrInfo::analyzeBranch(), llvm::ARCInstrInfo::analyzeBranch(), llvm::BPFInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeBranch(), llvm::LoongArchInstrInfo::analyzeBranch(), llvm::M68kInstrInfo::analyzeBranch(), llvm::MipsInstrInfo::analyzeBranch(), llvm::MSP430InstrInfo::analyzeBranch(), llvm::NVPTXInstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::RISCVInstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::X86InstrInfo::analyzeBranch(), llvm::XCoreInstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranch(), llvm::ARMBaseInstrInfo::analyzeBranch(), llvm::AVRInstrInfo::analyzeBranch(), llvm::CSKYInstrInfo::analyzeBranch(), llvm::SparcInstrInfo::analyzeBranch(), llvm::SPIRVInstrInfo::analyzeBranch(), llvm::VEInstrInfo::analyzeBranch(), llvm::WebAssemblyInstrInfo::analyzeBranch(), llvm::M68kInstrInfo::AnalyzeBranchImpl(), llvm::SIInstrInfo::analyzeBranchImpl(), llvm::X86InstrInfo::analyzeBranchPredicate(), llvm::analyzeICmp(), llvm::AArch64InstrInfo::analyzeLoopForPipelining(), llvm::ARMBaseInstrInfo::analyzeSelect(), llvm::LanaiInstrInfo::analyzeSelect(), llvm::RISCVInstrInfo::analyzeSelect(), llvm::ScalarEvolution::applyLoopGuards(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::CanonicalLoopInfo::assertOK(), buildNonAtomicBinOp(), buildPartialInvariantUnswitchConditionalBranch(), buildPartialUnswitchConditionalBranch(), llvm::calculateUpperBound(), llvm::AArch64InstrInfo::canInsertSelect(), llvm::PPCInstrInfo::canInsertSelect(), llvm::X86InstrInfo::canInsertSelect(), llvm::SIInstrInfo::canInsertSelect(), CanProveNotTakenFirstIteration(), llvm::MachineBasicBlock::canSplitCriticalEdge(), llvm::canSplitLoopBound(), carryFlagToValue(), checkBoolTestAndOrSetCCCombine(), checkDecodedInstruction(), collectUnswitchCandidates(), combineBallotPattern(), combineBrCond(), combineCMov(), combineM68kBrCond(), combineOr(), combineOrOfCZERO(), llvm::VETargetLowering::combineSelect(), combineSelect(), combineSelectAsExtAnd(), combineSelectOfTwoConstants(), combineSubABS(), combineVSelectToBLENDV(), combineVSelectWithAllOnesOrZeros(), commuteSelect(), computeKnownBitsFromCond(), computeKnownFPClass(), computeKnownFPClassFromCond(), computeKnownFPClassFromContext(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), ConditionalExpr::ConditionalExpr(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldTerminator(), ConvertSelectToConcatVector(), llvm::BranchInst::Create(), CreateAssert(), CreateAssertNot(), llvm::IRBuilderBase::CreateAssumption(), createCMovFP(), llvm::IRBuilderBase::CreateCondBr(), llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(), llvm::OpenMPIRBuilder::createLoopSkeleton(), createNodeForSelectViaUMinSeq(), createShuffleMaskFromVSELECT(), llvm::parallel::detail::Latch::dec(), DecodeLDR(), dependsOnLocalPhi(), distributeOpThroughSelect(), eliminateDeadSwitchCases(), llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), EraseTerminatorAndDCECond(), llvm::VPWidenSelectRecipe::execute(), llvm::VPBlendRecipe::execute(), llvm::VPReductionRecipe::execute(), expandAnyIntrinsic(), llvm::TargetLowering::expandIntMINMAX(), llvm::TargetLowering::expandShiftParts(), llvm::TargetLowering::expandShlSat(), findAffectedValues(), findBestNonTrivialUnswitchCandidate(), FindLoopCounter(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::findValuesAffectedByCondition(), FixTail(), llvm::PeelingModuloScheduleExpander::fixupBranches(), llvm::CondOpInit::Fold(), foldADCToCINC(), foldBitCastSelect(), foldBoolSelectToLogic(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnValueKnownInPredecessorImpl(), foldCSELOfCSEL(), llvm::AMDGPUTargetLowering::foldFreeOpFromSelect(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpSelectConstant(), foldMulSelectToNegate(), foldSelectGEP(), foldSelectOfConstantsUsingSra(), foldSelectOfCTTZOrCTLZ(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSelectWithBinaryOp(), foldSelectWithIdentityConstant(), llvm::SelectionDAG::FoldSetCC(), foldSetCCWithFunnelShift(), foldSetCCWithRotate(), foldSetClearBits(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldXorTruncShiftIntoCmp(), generateReproducer(), getBBFallenThrough(), getBitTestCondition(), llvm::CanonicalLoopInfo::getBody(), getBranchCondString(), getCmp(), llvm::CanonicalLoopInfo::getCond(), llvm::SelectionDAG::getCondCode(), getCondCode(), llvm::MachineBasicBlock::getFallThrough(), getFauxShuffleMask(), llvm::InstCombiner::getFreelyInvertedImpl(), getHashValueImpl(), getIntrinsicCmp(), llvm::HexagonInstrInfo::getInvertedPredSense(), llvm::rdf::DataFlowGraph::getNextRelated(), getOnlyLiveSuccessor(), llvm::AMDGPU::getOprIdx(), llvm::HexagonInstrInfo::getPredReg(), getPTest(), llvm::SelectionDAG::getSelect(), llvm::SelectionDAG::getSelectCC(), llvm::SelectionDAG::getSetCC(), getSETCC(), llvm::SelectionDAG::getSetCCVP(), llvm::CanonicalLoopInfo::getTripCount(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::ISD::getUnorderedFlavor(), getValueOnFirstIteration(), getX86XALUOOp(), handleOtherCmpSelSimplifications(), hasOnlySelectUsers(), llvm::hasProcessableCondition(), hostParallelCallback(), llvm::ARCInstrInfo::insertBranch(), llvm::AArch64InstrInfo::insertBranch(), llvm::R600InstrInfo::insertBranch(), llvm::SIInstrInfo::insertBranch(), llvm::ARMBaseInstrInfo::insertBranch(), llvm::AVRInstrInfo::insertBranch(), llvm::BPFInstrInfo::insertBranch(), llvm::CSKYInstrInfo::insertBranch(), llvm::HexagonInstrInfo::insertBranch(), llvm::LoongArchInstrInfo::insertBranch(), llvm::M68kInstrInfo::insertBranch(), llvm::MipsInstrInfo::insertBranch(), llvm::MSP430InstrInfo::insertBranch(), llvm::NVPTXInstrInfo::insertBranch(), llvm::PPCInstrInfo::insertBranch(), llvm::RISCVInstrInfo::insertBranch(), llvm::SparcInstrInfo::insertBranch(), llvm::SystemZInstrInfo::insertBranch(), llvm::VEInstrInfo::insertBranch(), llvm::WebAssemblyInstrInfo::insertBranch(), llvm::X86InstrInfo::insertBranch(), llvm::XCoreInstrInfo::insertBranch(), llvm::SIInstrInfo::insertSelect(), llvm::AArch64InstrInfo::insertSelect(), llvm::PPCInstrInfo::insertSelect(), llvm::X86InstrInfo::insertSelect(), llvm::SIInstrInfo::insertVectorSelect(), llvm::CanonicalLoopInfo::invalidate(), llvm::isAlmostDeadIV(), isAnalyzableBB(), isGuaranteedNotToBeUndefOrPoison(), llvm::isImpliedByDomCondition(), isLoopNeverExecuted(), llvm::ISD::isTrueWhenEqual(), IsVPNOTEquivalent(), llvm::X86TargetLowering::isXAndYEqZeroPreferableToXAndYEqY(), jumpTableHasOtherUses(), llvm::SPIRVLegalizerInfo::legalizeCustom(), llvm::AMDGPULegalizerInfo::legalizeFroundeven(), llvm::AMDGPULegalizerInfo::legalizeUnsignedDIV_REM32Impl(), LLVMSetCondition(), llvm::X86TargetLowering::LowerAsmOutputForConstraint(), llvm::LanaiTargetLowering::LowerBR_CC(), LowerBRCOND(), LowerBUILD_VECTORvXi1(), llvm::AMDGPUTargetLowering::LowerFROUNDEVEN(), llvm::RISCVTargetLowering::LowerOperation(), llvm::LanaiTargetLowering::LowerSELECT_CC(), llvm::LanaiTargetLowering::LowerSETCC(), LowerSETCCCARRY(), llvm::AMDGPUTargetLowering::LowerUDIVREM(), lowerVSELECTtoVectorShuffle(), LowerVSETCC(), LowerVSETCCWithSUBUS(), LowerXALUO(), ConditionalExpr::match(), llvm::PatternMatch::LogicalOp_match< LHS, RHS, Opcode, Commutable >::match(), matchCondition(), matchSelectWithOptionalNotCond(), llvm::CombinerHelper::matchSimplifySelectToMinMax(), llvm::JumpThreadingPass::maybethreadThroughTwoBasicBlocks(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::InsertCFGStrategy::mutate(), narrowVectorSelect(), needsLFTR(), llvm::RISCVInstrInfo::optimizeCondBranch(), parseCC(), parseCond(), parseCondBranch(), parseConstraintCode(), AbstractManglingParser< Derived, Alloc >::parseExpr(), llvm::parseWidenableBranch(), llvm::PeelSingleBlockLoop(), llvm::ARMTargetLowering::PerformCMOVCombine(), PerformCMPZCombine(), PerformCSETCombine(), llvm::AMDGPUTargetLowering::performCtlz_CttzCombine(), llvm::HexagonTargetLowering::PerformDAGCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), PerformHWLoopCombine(), performORCombine(), performOrXorChainCombine(), llvm::AMDGPUTargetLowering::performSelectCombine(), performSETCCCombine(), performSetccMergeZeroCombine(), performSetCCPunpkCombine(), PerformVCMPCombine(), PerformVSELECTCombine(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::HexagonInstrInfo::predOpcodeHasNot(), llvm::InstCombinerImpl::prepareWorklist(), ConditionalExpr::printLeft(), llvm::JumpThreadingPass::processImpliedCondition(), processSwitch(), llvm::JumpThreadingPass::processThreadableEdges(), recordCondition(), removeUndefIntroducingPredecessor(), replaceFoldableUses(), llvm::AArch64InstrInfo::reverseBranchCondition(), llvm::R600InstrInfo::reverseBranchCondition(), llvm::SIInstrInfo::reverseBranchCondition(), llvm::ARCInstrInfo::reverseBranchCondition(), llvm::ARMBaseInstrInfo::reverseBranchCondition(), llvm::AVRInstrInfo::reverseBranchCondition(), llvm::CSKYInstrInfo::reverseBranchCondition(), llvm::HexagonInstrInfo::reverseBranchCondition(), llvm::LoongArchInstrInfo::reverseBranchCondition(), llvm::MipsInstrInfo::reverseBranchCondition(), llvm::MSP430InstrInfo::reverseBranchCondition(), llvm::PPCInstrInfo::reverseBranchCondition(), llvm::RISCVInstrInfo::reverseBranchCondition(), llvm::SparcInstrInfo::reverseBranchCondition(), llvm::SystemZInstrInfo::reverseBranchCondition(), llvm::VEInstrInfo::reverseBranchCondition(), llvm::WebAssemblyInstrInfo::reverseBranchCondition(), llvm::X86InstrInfo::reverseBranchCondition(), llvm::XCoreInstrInfo::reverseBranchCondition(), llvm::RewriteStatepointsForGC::runOnFunction(), shouldConvertSelectOfConstantsToMath(), shouldInsertFreeze(), simplifyCmpSelCase(), simplifyCmpSelFalseCase(), simplifyCmpSelTrueCase(), SimplifyCondBranchToCondBranch(), llvm::X86TargetLowering::SimplifyMultipleUseDemandedBitsForTargetNode(), simplifyOneLoop(), llvm::SelectionDAG::simplifySelect(), llvm::simplifySelectInst(), simplifySelectInst(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySelectWithFCmp(), llvm::TargetLowering::SimplifySetCC(), simplifySetCCWithCTPOP(), simplifyTerminatorLeadingToRet(), simplifyUsingControlFlow(), skipTrivialSelect(), llvm::SplitBlockAndInsertIfElse(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), llvm::MachineBasicBlock::SplitCriticalEdge(), splitEdge(), splitIntVSETCC(), llvm::splitLoopBound(), STATISTIC(), llvm::parallel::detail::Latch::sync(), targetParallelCallback(), threadCmpOverSelect(), transformToIndexedCompare(), tryDemorganOfBooleanCondition(), trySwitchToSelect(), llvm::JumpThreadingPass::tryToUnfoldSelectInCurrBB(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), updateBranches(), llvm::MachineBasicBlock::updateTerminator(), useInversedSetcc(), llvm::HexagonInstrInfo::validateBranchCond(), llvm::GenericCycleInfo< ContextT >::validateTree(), llvm::versionCallSite(), llvm::InstCombinerImpl::visitBranchInst(), llvm::Interpreter::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSub(), llvm::SelectionDAGBuilder::visitSwitchCase(), llvm::Interpreter::visitSwitchInst(), llvm::InstCombinerImpl::visitSwitchInst(), and llvm::wouldInstructionBeTriviallyDead().

◆ false

return false

Definition at line 84 of file RISCVRedundantCopyElimination.cpp.

◆ TBB

Initial value:
{
assert(Cond.size() == 3 && "Unexpected number of operands")
const SmallVectorImpl< MachineOperand > & Cond
assert(TBB !=nullptr &&"Expected branch target basic block")

Definition at line 76 of file RISCVRedundantCopyElimination.cpp.

Referenced by llvm::R600InstrInfo::analyzeBranch(), llvm::ARCInstrInfo::analyzeBranch(), llvm::BPFInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeBranch(), llvm::LoongArchInstrInfo::analyzeBranch(), llvm::M68kInstrInfo::analyzeBranch(), llvm::MipsInstrInfo::analyzeBranch(), llvm::MSP430InstrInfo::analyzeBranch(), llvm::NVPTXInstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::RISCVInstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::X86InstrInfo::analyzeBranch(), llvm::XCoreInstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranch(), llvm::ARMBaseInstrInfo::analyzeBranch(), llvm::AVRInstrInfo::analyzeBranch(), llvm::CSKYInstrInfo::analyzeBranch(), llvm::SparcInstrInfo::analyzeBranch(), llvm::SPIRVInstrInfo::analyzeBranch(), llvm::VEInstrInfo::analyzeBranch(), llvm::WebAssemblyInstrInfo::analyzeBranch(), llvm::M68kInstrInfo::AnalyzeBranchImpl(), llvm::SIInstrInfo::analyzeBranchImpl(), llvm::AArch64InstrInfo::analyzeLoopForPipelining(), llvm::MachineBasicBlock::canSplitCriticalEdge(), llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(), llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), llvm::SelectionDAGBuilder::FindMergedConditions(), FixTail(), getBBFallenThrough(), getBranchHint(), llvm::MachineBasicBlock::getFallThrough(), getFallThroughMBB(), INITIALIZE_PASS(), llvm::ARCInstrInfo::insertBranch(), llvm::AArch64InstrInfo::insertBranch(), llvm::R600InstrInfo::insertBranch(), llvm::SIInstrInfo::insertBranch(), llvm::ARMBaseInstrInfo::insertBranch(), llvm::AVRInstrInfo::insertBranch(), llvm::BPFInstrInfo::insertBranch(), llvm::CSKYInstrInfo::insertBranch(), llvm::HexagonInstrInfo::insertBranch(), llvm::LoongArchInstrInfo::insertBranch(), llvm::M68kInstrInfo::insertBranch(), llvm::MipsInstrInfo::insertBranch(), llvm::MSP430InstrInfo::insertBranch(), llvm::NVPTXInstrInfo::insertBranch(), llvm::PPCInstrInfo::insertBranch(), llvm::RISCVInstrInfo::insertBranch(), llvm::SparcInstrInfo::insertBranch(), llvm::SystemZInstrInfo::insertBranch(), llvm::VEInstrInfo::insertBranch(), llvm::WebAssemblyInstrInfo::insertBranch(), llvm::X86InstrInfo::insertBranch(), llvm::XCoreInstrInfo::insertBranch(), isAnalyzableBB(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::RISCVInstrInfo::optimizeCondBranch(), llvm::PeelSingleBlockLoop(), STATISTIC(), updateBranches(), and llvm::MachineBasicBlock::updateTerminator().