LLVM API Documentation

PredicateSimplifier.cpp File Reference

#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>

Include dependency graph for PredicateSimplifier.cpp:

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
FunctionPassllvm::createPredicateSimplifierPass ()

Variables

static RegisterPass
< PredicateSimplifier > 
X ("predsimplify","Predicate Simplifier")


Define Documentation

#define DEBUG_TYPE   "predsimplify"

Definition at line 82 of file PredicateSimplifier.cpp.


Enumeration Type Documentation

Enumerator:
EQ_BIT 
UGT_BIT 
ULT_BIT 
SGT_BIT 
SLT_BIT 

Definition at line 321 of file PredicateSimplifier.cpp.

enum LatticeVal

Enumerator:
GT 
GE 
LT 
LE 
NE 
SGTULT 
SGEULE 
SLTUGT 
SLEUGE 
ULT 
UGT 
SLT 
SGT 
SLE 
SGE 
ULE 
UGE 

Definition at line 324 of file PredicateSimplifier.cpp.


Function Documentation

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().


Variable Documentation

Definition at line 156 of file PredicateSimplifier.cpp.

std::vector<Node *> Children

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.

char ID [static]

Definition at line 2317 of file PredicateSimplifier.cpp.

InequalityGraph& IG

Definition at line 1386 of file PredicateSimplifier.cpp.

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.

std::vector<Node> Nodes

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 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.

Value* V

Definition at line 384 of file PredicateSimplifier.cpp.

std::vector<Value *> Values

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.