llvm/llvm/lib/Transforms/Utils/SSAUpdater.cpp

//===- SSAUpdater.cpp - Unstructured SSA Update Tool ----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements the SSAUpdater class.
//
//===----------------------------------------------------------------------===//

#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> {};

} // end namespace llvm

/// Check to see if AvailableVals has an entry for the specified BB and if so,
/// return it.  If not, construct SSA form by first calculating the required
/// placement of PHIs and then inserting new PHIs where needed.
Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) {}

//===----------------------------------------------------------------------===//
// LoadAndStorePromoter Implementation
//===----------------------------------------------------------------------===//

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 {}