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/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 RegisterPass < PredicateSimplifier > | X ("predsimplify","Predicate Simplifier") |
| #define DEBUG_TYPE "predsimplify" |
Definition at line 82 of file PredicateSimplifier.cpp.
| enum LatticeBits |
Definition at line 321 of file PredicateSimplifier.cpp.
| enum LatticeVal |
Definition at line 324 of file PredicateSimplifier.cpp.
| static LatticeVal @816::reversePredicate | ( | LatticeVal | LV | ) | [static] |
reversePredicate - reverse the direction of the inequality
Definition at line 362 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 @816::validPredicate | ( | LatticeVal | LV | ) | [static] |
validPredicate - determines whether a given value is actually a lattice value. Only used in assertions or debugging.
Definition at line 347 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 156 of file PredicateSimplifier.cpp.
Definition at line 158 of file PredicateSimplifier.cpp.
Referenced by llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::addChild(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::begin(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::clearAllChildren(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::end(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::getChildren(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::getNumChildren(), llvm::MergeBlockIntoPredecessor(), and llvm::SplitBlock().
Definition at line 1380 of file PredicateSimplifier.cpp.
Definition at line 1381 of file PredicateSimplifier.cpp.
| std::vector<BasicBlock *> DeadBlocks |
Definition at line 1320 of file PredicateSimplifier.cpp.
Definition at line 155 of file PredicateSimplifier.cpp.
Definition at line 155 of file PredicateSimplifier.cpp.
| DomTreeDFS* DTDFS |
Definition at line 419 of file PredicateSimplifier.cpp.
Definition at line 2339 of file PredicateSimplifier.cpp.
Definition at line 299 of file PredicateSimplifier.cpp.
Referenced by AddFunctionToSymbolTable(), llvm::AsmPrinter::EmitConstantPool(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::findNearestCommonDominator(), llvm::SubtargetFeatures::getInfo(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::DIFactory::GetOrCreateArray(), llvm::DIFactory::GetOrCreateSubrange(), llvm::PredIteratorCache::GetPreds(), llvm::InsertProfilingInitCall(), isOnlyUsedInEntryBlock(), IsValueFullyAvailableInBlock(), LinkTypes(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::TypeMap< ValType, TypeClass >::RefineAbstractType(), RemoveVRSaveCode(), llvm::LiveVariables::runOnMachineFunction(), and WriteModuleInfo().
char ID [static] |
Definition at line 2317 of file PredicateSimplifier.cpp.
| InequalityGraph& IG |
Definition at line 1386 of file PredicateSimplifier.cpp.
Definition at line 385 of file PredicateSimplifier.cpp.
Referenced by llvm::CloneLoop(), llvm::LiveIntervals::computeNumbering(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::AsmPrinter::EmitConstantPool(), llvm::BasicInlinerImpl::inlineFunctions(), llvm::TargetRegisterInfo::isSubRegister(), and llvm::Archive::parseMemberHeader().
Definition at line 1377 of file PredicateSimplifier.cpp.
Definition at line 613 of file PredicateSimplifier.cpp.
| bool modified |
Definition at line 1393 of file PredicateSimplifier.cpp.
| std::map<BasicBlock *, Node *> NodeMap |
Definition at line 300 of file PredicateSimplifier.cpp.
Definition at line 744 of file PredicateSimplifier.cpp.
Definition at line 1378 of file PredicateSimplifier.cpp.
Referenced by llvm::SDNode::use_iterator::atEnd(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::atEnd(), llvm::CloneLoop(), llvm::CloneTrace(), llvm::ConstantFoldCall(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldInstruction(), llvm::MachineOperand::CreateCPI(), llvm::MachineOperand::CreateES(), llvm::MachineOperand::CreateFI(), llvm::MachineOperand::CreateFPImm(), llvm::MachineOperand::CreateGA(), llvm::MachineOperand::CreateImm(), llvm::MachineOperand::CreateJTI(), llvm::MachineOperand::CreateMBB(), llvm::MachineOperand::CreateReg(), llvm::AsmPrinter::EmitConstantValueOnly(), findFlagUse(), getConstantEvolvingPHI(), llvm::DOTGraphTraits< SelectionDAG * >::getEdgeAttributes(), getNextStopPoint(), llvm::SCEVSignExtendExpr::getOperand(), llvm::SCEVZeroExtendExpr::getOperand(), llvm::SCEVTruncateExpr::getOperand(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::getOperand(), llvm::SDNode::use_iterator::getOperandNo(), llvm::MachineRegisterInfo::defusechain_iterator< ReturnUses, ReturnDefs >::getOperandNo(), llvm::ISD::getSetCCOrOperation(), llvm::SDNode::use_iterator::getUse(), llvm::HandleSDNode::getValue(), llvm::SelectionDAGLowering::getValue(), llvm::HandleSDNode::HandleSDNode(), llvm::SCEVSignExtendExpr::hasComputableLoopEvolution(), llvm::SCEVZeroExtendExpr::hasComputableLoopEvolution(), llvm::SCEVTruncateExpr::hasComputableLoopEvolution(), llvm::AtomicSDNode::isCompareAndSwap(), llvm::SCEVSignExtendExpr::isLoopInvariant(), llvm::SCEVZeroExtendExpr::isLoopInvariant(), llvm::SCEVTruncateExpr::isLoopInvariant(), 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::SCEVSignExtendExpr::print(), llvm::SCEVZeroExtendExpr::print(), llvm::SCEVTruncateExpr::print(), RemapInstruction(), llvm::SDNode::removeUser(), llvm::SCEVSignExtendExpr::replaceSymbolicValuesWithConcrete(), llvm::SCEVZeroExtendExpr::replaceSymbolicValuesWithConcrete(), llvm::SCEVTruncateExpr::replaceSymbolicValuesWithConcrete(), llvm::UnarySDNode::UnarySDNode(), and llvm::X86InstrInfo::unfoldMemoryOperand().
| PredicateSimplifier* PS |
Definition at line 2338 of file PredicateSimplifier.cpp.
| RangeListType RangeList |
Definition at line 910 of file PredicateSimplifier.cpp.
| std::vector<ScopedRange> Ranges |
Definition at line 980 of file PredicateSimplifier.cpp.
| RelationsType Relations |
Definition at line 642 of file PredicateSimplifier.cpp.
Definition at line 1377 of file PredicateSimplifier.cpp.
Definition at line 386 of file PredicateSimplifier.cpp.
Definition at line 905 of file PredicateSimplifier.cpp.
Definition at line 612 of file PredicateSimplifier.cpp.
Referenced by BuildSubAggregate(), llvm::cast_convert_val< To, From, SimpleFrom >::doit(), and llvm::ConstantExpr::replaceUsesOfWithOnConstant().
Definition at line 1390 of file PredicateSimplifier.cpp.
Referenced by llvm::df_iterator< llvm::Inverse< T >, SetTy, External >::operator++(), llvm::PMStack::pop(), and llvm::PMStack::push().
Definition at line 1391 of file PredicateSimplifier.cpp.
Definition at line 1392 of file PredicateSimplifier.cpp.
Definition at line 593 of file PredicateSimplifier.cpp.
| UnreachableBlocks& UB |
Definition at line 1387 of file PredicateSimplifier.cpp.
Definition at line 384 of file PredicateSimplifier.cpp.
The canonical choice for value number at index.
Definition at line 417 of file PredicateSimplifier.cpp.
Referenced by llvm::InvokeInst::Create(), EvaluateFunction(), llvm::RegsForValue::getCopyFromRegs(), llvm::MapValue(), llvm::ConstantVector::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::SimplifyCFG(), and llvm::ValueEnumerator::ValueEnumerator().
| ValueNumbering& VN |
Definition at line 592 of file PredicateSimplifier.cpp.
| VNMapType VNMap |
Definition at line 414 of file PredicateSimplifier.cpp.
| ValueRanges& VR |
Definition at line 1388 of file PredicateSimplifier.cpp.
| std::vector<DomTreeDFS::Node *> WorkList |
Definition at line 1383 of file PredicateSimplifier.cpp.
RegisterPass<PredicateSimplifier> X("predsimplify","Predicate Simplifier") [static] |
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.