|
LLVM
3.7.0
|
#include "InstCombineInternal.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/Analysis/InstructionSimplify.h"Go to the source code of this file.
Classes | |
| struct | llvm::DenseMapInfo< LoweredPHIRecord > |
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
Macros | |
| #define | DEBUG_TYPE "instcombine" |
Functions | |
| static bool | isSafeAndProfitableToSinkLoad (LoadInst *L) |
| Return true if we know that it is safe to sink the load out of the block that defines it. More... | |
| static bool | DeadPHICycle (PHINode *PN, SmallPtrSetImpl< PHINode * > &PotentiallyDeadPHIs) |
| Return true if this PHI node is only used by a PHI node cycle that is dead. More... | |
| static bool | PHIsEqualValue (PHINode *PN, Value *NonPhiInVal, SmallPtrSetImpl< PHINode * > &ValueEqualPHIs) |
| Return true if this phi node is always equal to NonPhiInVal. More... | |
| #define DEBUG_TYPE "instcombine" |
Definition at line 20 of file InstCombinePHI.cpp.
|
static |
Return true if this PHI node is only used by a PHI node cycle that is dead.
Definition at line 505 of file InstCombinePHI.cpp.
References llvm::Value::hasOneUse(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallPtrSetImplBase::size(), llvm::Value::use_empty(), and llvm::Instruction::user_back().
Referenced by llvm::InstCombiner::visitPHINode().
Return true if we know that it is safe to sink the load out of the block that defines it.
This means that it must be obvious the value of the load is not changed from the point of the load to the end of the block it is in.
Finally, it is safe, but not profitable, to sink a load targeting a non-address-taken alloca. Doing so will cause us to not promote the alloca to a register.
Definition at line 247 of file InstCombinePHI.cpp.
References llvm::BasicBlock::end(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::GetElementPtrInst::hasAllConstantIndices(), SI, and llvm::Value::users().
|
static |
Return true if this phi node is always equal to NonPhiInVal.
This happens with mutually cyclic phi nodes like: z = some value; x = phi (y, z); y = phi (x, z)
Definition at line 527 of file InstCombinePHI.cpp.
References llvm::PHINode::incoming_values(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::SmallPtrSetImplBase::size().
Referenced by llvm::InstCombiner::visitPHINode().
1.8.6