LLVM API Documentation
#include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/AssumptionTracker.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLibraryInfo.h"
#include <map>
#include <stack>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
List of target independent CodeGen pass IDs. | |
Defines | |
#define | DEBUG_TYPE "lazy-value-info" |
Functions | |
INITIALIZE_PASS_BEGIN (LazyValueInfo,"lazy-value-info","Lazy Value Information Analysis", false, true) INITIALIZE_PASS_END(LazyValueInfo | |
FunctionPass * | llvm::createLazyValueInfoPass () |
raw_ostream & | llvm::operator<< (raw_ostream &OS, const LVILatticeVal &Val) LLVM_ATTRIBUTE_USED |
static bool | InstructionDereferencesPointer (Instruction *I, Value *Ptr) |
static bool | getValueFromFromCondition (Value *Val, ICmpInst *ICI, LVILatticeVal &Result, bool isTrueDest=true) |
static bool | getEdgeValueLocal (Value *Val, BasicBlock *BBFrom, BasicBlock *BBTo, LVILatticeVal &Result) |
Compute the value of Val on the edge BBFrom -> BBTo. Returns false if Val is not constrained on the edge. | |
static LazyValueInfoCache & | getCache (void *&PImpl, AssumptionTracker *AT, const DataLayout *DL=nullptr, DominatorTree *DT=nullptr) |
getCache - This lazily constructs the LazyValueInfoCache. | |
static LazyValueInfo::Tristate | getPredicateResult (unsigned Pred, Constant *C, LVILatticeVal &Result, const DataLayout *DL, TargetLibraryInfo *TLI) |
Variables | |
lazy value | info |
lazy value Lazy Value Information | Analysis |
lazy value Lazy Value Information | false |
#define DEBUG_TYPE "lazy-value-info" |
Definition at line 38 of file LazyValueInfo.cpp.
static LazyValueInfoCache& getCache | ( | void *& | PImpl, |
AssumptionTracker * | AT, | ||
const DataLayout * | DL = nullptr , |
||
DominatorTree * | DT = nullptr |
||
) | [static] |
getCache - This lazily constructs the LazyValueInfoCache.
Definition at line 1102 of file LazyValueInfo.cpp.
Referenced by llvm::LazyValueInfo::eraseBlock(), llvm::LazyValueInfo::getConstant(), llvm::LazyValueInfo::getConstantOnEdge(), llvm::LazyValueInfo::getPredicateAt(), llvm::LazyValueInfo::getPredicateOnEdge(), llvm::LazyValueInfo::releaseMemory(), llvm::LazyValueInfo::runOnFunction(), and llvm::LazyValueInfo::threadEdge().
static bool getEdgeValueLocal | ( | Value * | Val, |
BasicBlock * | BBFrom, | ||
BasicBlock * | BBTo, | ||
LVILatticeVal & | Result | ||
) | [static] |
Compute the value of Val on the edge BBFrom -> BBTo. Returns false if Val is not constrained on the edge.
Definition at line 891 of file LazyValueInfo.cpp.
References llvm::ConstantRange::difference(), llvm::dyn_cast(), llvm::ConstantInt::get(), llvm::Value::getContext(), llvm::Type::getInt1Ty(), llvm::Type::getIntegerBitWidth(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), getValueFromFromCondition(), and llvm::ConstantRange::unionWith().
static LazyValueInfo::Tristate getPredicateResult | ( | unsigned | Pred, |
Constant * | C, | ||
LVILatticeVal & | Result, | ||
const DataLayout * | DL, | ||
TargetLibraryInfo * | TLI | ||
) | [static] |
Definition at line 1177 of file LazyValueInfo.cpp.
References llvm::CallingConv::C, llvm::ConstantFoldCompareInstOperands(), llvm::ConstantRange::contains(), llvm::dyn_cast(), llvm::LazyValueInfo::False, llvm::ConstantInt::getValue(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::ConstantRange::inverse(), llvm::Constant::isNullValue(), llvm::ConstantRange::isSingleElement(), llvm::ICmpInst::makeConstantRange(), llvm::LazyValueInfo::True, and llvm::Unknown.
Referenced by llvm::LazyValueInfo::getPredicateAt(), and llvm::LazyValueInfo::getPredicateOnEdge().
bool getValueFromFromCondition | ( | Value * | Val, |
ICmpInst * | ICI, | ||
LVILatticeVal & | Result, | ||
bool | isTrueDest = true |
||
) | [static] |
Definition at line 848 of file LazyValueInfo.cpp.
References llvm::dyn_cast(), llvm::User::getOperand(), llvm::CmpInst::getPredicate(), llvm::ConstantInt::getValue(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_ULT, llvm::ConstantRange::inverse(), llvm::ICmpInst::isEquality(), llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Specific(), llvm::ConstantRange::makeICmpRegion(), llvm::PatternMatch::match(), and llvm::ConstantRange::subtract().
Referenced by getEdgeValueLocal().
INITIALIZE_PASS_BEGIN | ( | LazyValueInfo | , |
"lazy-value-info" | , | ||
"Lazy Value Information Analysis" | , | ||
false | , | ||
true | |||
) |
static bool InstructionDereferencesPointer | ( | Instruction * | I, |
Value * | Ptr | ||
) | [static] |
Definition at line 597 of file LazyValueInfo.cpp.
References llvm::dyn_cast(), llvm::GetUnderlyingObject(), llvm::ConstantInt::isZero(), and llvm::AArch64CC::MI.
Definition at line 45 of file LazyValueInfo.cpp.
Definition at line 45 of file LazyValueInfo.cpp.
lazy value info |
Definition at line 45 of file LazyValueInfo.cpp.
Referenced by llvm::CCState::getInRegsParamInfo().