#include "llvm/Transforms/Utils/SSAUpdater.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/SSAUpdaterImpl.h"
#include <cassert>
#include <utility>
usingnamespacellvm;
#define DEBUG_TYPE …
AvailableValsTy;
static AvailableValsTy &getAvailableVals(void *AV) { … }
SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode *> *NewPHI)
: … { … }
SSAUpdater::~SSAUpdater() { … }
void SSAUpdater::Initialize(Type *Ty, StringRef Name) { … }
bool SSAUpdater::HasValueForBlock(BasicBlock *BB) const { … }
Value *SSAUpdater::FindValueForBlock(BasicBlock *BB) const { … }
void SSAUpdater::AddAvailableValue(BasicBlock *BB, Value *V) { … }
static bool IsEquivalentPHI(PHINode *PHI,
SmallDenseMap<BasicBlock *, Value *, 8> &ValueMapping) { … }
Value *SSAUpdater::GetValueAtEndOfBlock(BasicBlock *BB) { … }
Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) { … }
void SSAUpdater::RewriteUse(Use &U) { … }
void SSAUpdater::UpdateDebugValues(Instruction *I) { … }
void SSAUpdater::UpdateDebugValues(Instruction *I,
SmallVectorImpl<DbgValueInst *> &DbgValues) { … }
void SSAUpdater::UpdateDebugValues(
Instruction *I, SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords) { … }
void SSAUpdater::UpdateDebugValue(Instruction *I, DbgValueInst *DbgValue) { … }
void SSAUpdater::UpdateDebugValue(Instruction *I, DbgVariableRecord *DVR) { … }
void SSAUpdater::RewriteUseAfterInsertions(Use &U) { … }
namespace llvm {
template<>
class SSAUpdaterTraits<SSAUpdater> { … };
}
Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) { … }
LoadAndStorePromoter::
LoadAndStorePromoter(ArrayRef<const Instruction *> Insts,
SSAUpdater &S, StringRef BaseName) : … { … }
void LoadAndStorePromoter::run(const SmallVectorImpl<Instruction *> &Insts) { … }
bool
LoadAndStorePromoter::isInstInList(Instruction *I,
const SmallVectorImpl<Instruction *> &Insts)
const { … }