LLVM API Documentation
#include "llvm/Transforms/Scalar.h"#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/Instructions.h"#include "llvm/Pass.h"#include "llvm/ADT/DepthFirstIterator.h"#include "llvm/ADT/SetOperations.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Analysis/Dominators.h"#include "llvm/Assembly/Writer.h"#include "llvm/Support/CFG.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/ConstantRange.h"#include "llvm/Support/Debug.h"#include "llvm/Support/InstVisitor.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Target/TargetData.h"#include "llvm/Transforms/Utils/Local.h"#include <algorithm>#include <deque>#include <stack>
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "predsimplify" |
Enumerations | |
| enum | LatticeBits { EQ_BIT = 1, UGT_BIT = 2, ULT_BIT = 4, SGT_BIT = 8, SLT_BIT = 16 } |
| enum | LatticeVal { GT = SGT_BIT | UGT_BIT, GE = GT | EQ_BIT, LT = SLT_BIT | ULT_BIT, LE = LT | EQ_BIT, NE = SLT_BIT | SGT_BIT | ULT_BIT | UGT_BIT, SGTULT = SGT_BIT | ULT_BIT, SGEULE = SGTULT | EQ_BIT, SLTUGT = SLT_BIT | UGT_BIT, SLEUGE = SLTUGT | EQ_BIT, ULT = SLT_BIT | SGT_BIT | ULT_BIT, UGT = SLT_BIT | SGT_BIT | UGT_BIT, SLT = SLT_BIT | ULT_BIT | UGT_BIT, SGT = SGT_BIT | ULT_BIT | UGT_BIT, SLE = SLT | EQ_BIT, SGE = SGT | EQ_BIT, ULE = ULT | EQ_BIT, UGE = UGT | EQ_BIT } |
Functions | |
| STATISTIC (NumVarsReplaced,"Number of argument substitutions") | |
| STATISTIC (NumInstruction,"Number of instructions removed") | |
| STATISTIC (NumSimple,"Number of simple replacements") | |
| STATISTIC (NumBlocks,"Number of blocks marked unreachable") | |
| STATISTIC (NumSnuggle,"Number of comparisons snuggled") | |
| static bool | validPredicate (LatticeVal LV) |
| static LatticeVal | reversePredicate (LatticeVal LV) |
| reversePredicate - reverse the direction of the inequality | |
| FunctionPass * | llvm::createPredicateSimplifierPass () |
Variables | |
| static const ConstantRange | empty (1, false) |
| static RegisterPass < PredicateSimplifier > | X ("predsimplify","Predicate Simplifier") |
| #define DEBUG_TYPE "predsimplify" |
Definition at line 82 of file PredicateSimplifier.cpp.
| enum LatticeBits |
Definition at line 324 of file PredicateSimplifier.cpp.
| enum LatticeVal |
Definition at line 327 of file PredicateSimplifier.cpp.
| static LatticeVal @1362::reversePredicate | ( | LatticeVal | LV | ) | [static] |
reversePredicate - reverse the direction of the inequality
Definition at line 365 of file PredicateSimplifier.cpp.
References SGT_BIT, SLT_BIT, UGT_BIT, ULT_BIT, and validPredicate().
| STATISTIC | ( | NumSnuggle | , | |
| "Number of comparisons snuggled" | ||||
| ) |
| STATISTIC | ( | NumBlocks | , | |
| "Number of blocks marked unreachable" | ||||
| ) |
| STATISTIC | ( | NumSimple | , | |
| "Number of simple replacements" | ||||
| ) |
| STATISTIC | ( | NumInstruction | , | |
| "Number of instructions removed" | ||||
| ) |
| STATISTIC | ( | NumVarsReplaced | , | |
| "Number of argument substitutions" | ||||
| ) |
| static bool @1362::validPredicate | ( | LatticeVal | LV | ) | [static] |
validPredicate - determines whether a given value is actually a lattice value. Only used in assertions or debugging.
Definition at line 350 of file PredicateSimplifier.cpp.
References GE, GT, LE, LT, NE, SGE, SGEULE, SGT, SGTULT, SLE, SLEUGE, SLT, SLTUGT, UGE, UGT, ULE, and ULT.
Referenced by reversePredicate().
Definition at line 159 of file PredicateSimplifier.cpp.
Definition at line 161 of file PredicateSimplifier.cpp.
Referenced by llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::addChild(), llvm::DIE::AddChild(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::begin(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::clearAllChildren(), llvm::DIE::Detach(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::end(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::getChildren(), llvm::DIE::getChildren(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::getNumChildren(), llvm::MergeBlockIntoPredecessor(), and llvm::SplitBlock().
Definition at line 910 of file PredicateSimplifier.cpp.
Definition at line 1335 of file PredicateSimplifier.cpp.
Definition at line 1336 of file PredicateSimplifier.cpp.
| std::vector<BasicBlock *> DeadBlocks |
Definition at line 1275 of file PredicateSimplifier.cpp.
Definition at line 158 of file PredicateSimplifier.cpp.
Definition at line 158 of file PredicateSimplifier.cpp.
| DomTreeDFS* DTDFS |
Definition at line 422 of file PredicateSimplifier.cpp.
Definition at line 2299 of file PredicateSimplifier.cpp.
const ConstantRange empty(1, false) [static] |
Definition at line 302 of file PredicateSimplifier.cpp.
Referenced by llvm::MCContext::CreateSymbol(), llvm::MCContext::CreateTemporarySymbol(), ExpandLibCall(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::findNearestCommonDominator(), llvm::MDString::get(), llvm::TargetLoweringObjectFileCOFF::getCOFFSection(), llvm::TargetLoweringObjectFileELF::getELFSection(), llvm::DIEEntry::getEntry(), llvm::SubtargetFeatures::getInfo(), llvm::TargetLoweringObjectFileMachO::getMachOSection(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::DIFactory::GetOrCreateArray(), llvm::DIFactory::GetOrCreateSubrange(), llvm::MCContext::GetOrCreateSymbol(), llvm::PredIteratorCache::GetPreds(), llvm::InsertProfilingInitCall(), isOnlyUsedInEntryBlock(), IsValueFullyAvailableInBlock(), LinkTypes(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::LiveIntervals::processImplicitDefs(), llvm::TypeMap< llvm::ArrayValType, llvm::ArrayType >::RefineAbstractType(), RemoveVRSaveCode(), llvm::LiveVariables::runOnMachineFunction(), llvm::DIEEntry::setEntry(), and WriteModuleInfo().
char ID [static] |
Definition at line 2279 of file PredicateSimplifier.cpp.
| InequalityGraph& IG |
Definition at line 1341 of file PredicateSimplifier.cpp.
Definition at line 388 of file PredicateSimplifier.cpp.
Referenced by llvm::CloneLoop(), llvm::LiveIntervals::computeNumbering(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::ExactHazardRecognizer::EmitInstruction(), llvm::ExactHazardRecognizer::getHazardType(), llvm::BasicInlinerImpl::inlineFunctions(), llvm::TargetRegisterInfo::isSubRegister(), llvm::TargetRegisterInfo::isSuperRegister(), llvm::Archive::parseMemberHeader(), llvm::TargetRegisterInfo::regsOverlap(), and llvm::LiveInterval::InstrSlots::scale().
Definition at line 1332 of file PredicateSimplifier.cpp.
Definition at line 617 of file PredicateSimplifier.cpp.
Definition at line 1348 of file PredicateSimplifier.cpp.
| std::map<BasicBlock *, Node *> NodeMap |
Definition at line 303 of file PredicateSimplifier.cpp.
Definition at line 1333 of file PredicateSimplifier.cpp.
Referenced by llvm::MachineInstr::addOperand(), llvm::SDNode::use_iterator::atEnd(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::atEnd(), llvm::CloneLoop(), llvm::CloneTrace(), ComputeReloadLoc(), llvm::ConstantFoldCall(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldInstruction(), llvm::MachineOperand::CreateCPI(), llvm::MachineOperand::CreateES(), llvm::MachineOperand::CreateFI(), llvm::MachineOperand::CreateFPImm(), llvm::MachineOperand::CreateGA(), llvm::MCOperand::CreateImm(), llvm::MachineOperand::CreateImm(), llvm::MachineOperand::CreateJTI(), llvm::MachineOperand::CreateMBB(), llvm::MCOperand::CreateMBBLabel(), llvm::MCOperand::CreateMCValue(), llvm::MachineOperand::CreateMDNode(), llvm::MCOperand::CreateReg(), llvm::MachineOperand::CreateReg(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::BranchInst::getCondition(), getConstantEvolvingPHI(), llvm::DOTGraphTraits< SelectionDAG * >::getEdgeAttributes(), getNextStopPoint(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::getOperand(), llvm::SDNode::use_iterator::getOperandNo(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::getOperandNo(), llvm::ScalarEvolution::getSCEVAtScope(), llvm::ISD::getSetCCOrOperation(), llvm::BranchInst::getSuccessor(), llvm::ScalarEvolution::getUDivExpr(), llvm::SDNode::use_iterator::getUse(), llvm::HandleSDNode::getValue(), llvm::SelectionDAGLowering::getValue(), llvm::HandleSDNode::HandleSDNode(), llvm::AtomicSDNode::isCompareAndSwap(), llvm::SDNode::use_iterator::operator*(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::operator*(), llvm::SDNode::use_iterator::operator++(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::operator++(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::operator->(), llvm::SDNode::use_iterator::operator==(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::operator==(), llvm::X86ATTAsmPrinter::print_pcrel_imm(), llvm::X86ATTAsmPrinter::printOperand(), RemapInstruction(), removeOperands(), llvm::BranchInst::setCondition(), llvm::BranchInst::setSuccessor(), llvm::BranchInst::setUnconditionalDest(), llvm::UnarySDNode::UnarySDNode(), and llvm::X86InstrInfo::unfoldMemoryOperand().
| PredicateSimplifier* PS |
Definition at line 2298 of file PredicateSimplifier.cpp.
| RangeListType RangeList |
Definition at line 915 of file PredicateSimplifier.cpp.
| std::vector<ScopedRange> Ranges |
Definition at line 982 of file PredicateSimplifier.cpp.
| RelationsType Relations |
Definition at line 646 of file PredicateSimplifier.cpp.
Definition at line 1332 of file PredicateSimplifier.cpp.
Definition at line 389 of file PredicateSimplifier.cpp.
Definition at line 909 of file PredicateSimplifier.cpp.
Definition at line 616 of file PredicateSimplifier.cpp.
Referenced by BuildSubAggregate(), llvm::cast_convert_val< To, From, SimpleFrom >::doit(), and llvm::ConstantExpr::replaceUsesOfWithOnConstant().
Definition at line 1345 of file PredicateSimplifier.cpp.
Referenced by llvm::FindFunctionBackedges(), and llvm::PMStack::pop().
Definition at line 1346 of file PredicateSimplifier.cpp.
Definition at line 1347 of file PredicateSimplifier.cpp.
Definition at line 597 of file PredicateSimplifier.cpp.
| UnreachableBlocks& UB |
Definition at line 1342 of file PredicateSimplifier.cpp.
Definition at line 387 of file PredicateSimplifier.cpp.
The canonical choice for value number at index.
Definition at line 420 of file PredicateSimplifier.cpp.
Referenced by llvm::DIE::AddValue(), llvm::InvokeInst::Create(), EvaluateFunction(), llvm::RegsForValue::getCopyFromRegs(), llvm::ScalarEvolution::getSCEVAtScope(), llvm::DIE::getValues(), llvm::MapValue(), llvm::ConstantVector::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::SimplifyCFG(), and llvm::ValueEnumerator::ValueEnumerator().
| ValueNumbering& VN |
Definition at line 596 of file PredicateSimplifier.cpp.
| VNMapType VNMap |
Definition at line 417 of file PredicateSimplifier.cpp.
| ValueRanges& VR |
Definition at line 1343 of file PredicateSimplifier.cpp.
Referenced by llvm::MachineRegisterInfo::createVirtualRegister(), and llvm::MachineRegisterInfo::setRegClass().
| std::vector<DomTreeDFS::Node *> WorkList |
Definition at line 1338 of file PredicateSimplifier.cpp.
RegisterPass<PredicateSimplifier> X("predsimplify","Predicate Simplifier") [static] |