LLVM API Documentation

Functions
Local.cpp File Reference
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/ProfileInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/DIBuilder.h"
#include "llvm/DebugInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ValueHandle.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for Local.cpp:

Go to the source code of this file.

Functions

static bool areAllUsesEqual (Instruction *I)
static bool CanPropagatePredecessorsForPHIs (BasicBlock *BB, BasicBlock *Succ)
static unsigned enforceKnownAlignment (Value *V, unsigned Align, unsigned PrefAlign, const DataLayout *TD)
static bool LdStHasDebugValue (DIVariable &DIVar, Instruction *I)
 See if there is a dbg.value intrinsic for DIVar before I.

Function Documentation

static bool areAllUsesEqual ( Instruction I) [static]

areAllUsesEqual - Check whether the uses of a value are all the same. This is similar to Instruction::hasOneUse() except this will also return true when there are no uses or multiple uses that all refer to the same value.

Definition at line 357 of file Local.cpp.

References llvm::Value::use_begin(), and llvm::Value::use_end().

Referenced by llvm::RecursivelyDeleteDeadPHINode().

static bool CanPropagatePredecessorsForPHIs ( BasicBlock BB,
BasicBlock Succ 
) [static]
static unsigned enforceKnownAlignment ( Value V,
unsigned  Align,
unsigned  PrefAlign,
const DataLayout TD 
) [static]

enforceKnownAlignment - If the specified pointer points to an object that we control, modify the object's alignment to PrefAlign. This isn't often possible though. If alignment is important, a more reliable approach is to simply align all global variables and allocation instructions to their preferred alignment from the beginning.

Definition at line 763 of file Local.cpp.

References Align(), llvm::DataLayout::exceedsNaturalStackAlignment(), and llvm::Value::stripPointerCasts().

Referenced by llvm::getOrEnforceKnownAlignment().

static bool LdStHasDebugValue ( DIVariable DIVar,
Instruction I 
) [static]

See if there is a dbg.value intrinsic for DIVar before I.

===---------------------------------------------------------------------===// Dbg Intrinsic utilities

Definition at line 836 of file Local.cpp.

References llvm::BasicBlock::getInstList(), llvm::User::getOperand(), and llvm::Instruction::getParent().

Referenced by llvm::ConvertDebugDeclareToDebugValue().