|
LLVM 22.0.0git
|
#include "llvm/Transforms/Utils/SSAUpdaterBulk.h"#include "llvm/Analysis/InstructionSimplify.h"#include "llvm/Analysis/IteratedDominanceFrontier.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/Dominators.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Use.h"#include "llvm/IR/Value.h"Go to the source code of this file.
Classes | |
| struct | BBValueInfo |
Macros | |
| #define | DEBUG_TYPE "ssaupdaterbulk" |
Functions | |
| static BasicBlock * | getUserBB (Use *U) |
| Helper function for finding a block which should have a value for the given user. | |
| static void | ComputeLiveInBlocks (const SmallPtrSetImpl< BasicBlock * > &UsingBlocks, const SmallPtrSetImpl< BasicBlock * > &DefBlocks, SmallPtrSetImpl< BasicBlock * > &LiveInBlocks, PredIteratorCache &PredCache) |
| Given sets of UsingBlocks and DefBlocks, compute the set of LiveInBlocks. | |
| static void | simplifyPass (MutableArrayRef< PHINode * > Worklist, const DataLayout &DL) |
| static bool | PHIAreRefEachOther (const iterator_range< BasicBlock::phi_iterator > NewPHIs) |
| static bool | replaceIfIdentical (PHINode &PHI, PHINode &ReplPHI) |
| bool | EliminateNewDuplicatePHINodes (BasicBlock *BB, BasicBlock::phi_iterator FirstExistingPN) |
| static void | deduplicatePass (ArrayRef< PHINode * > Worklist) |
| #define DEBUG_TYPE "ssaupdaterbulk" |
Definition at line 24 of file SSAUpdaterBulk.cpp.
|
static |
Given sets of UsingBlocks and DefBlocks, compute the set of LiveInBlocks.
This is basically a subgraph limited by DefBlocks and UsingBlocks.
Definition at line 71 of file SSAUpdaterBulk.cpp.
References llvm::SmallPtrSetImpl< PtrType >::begin(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallPtrSetImpl< PtrType >::end(), llvm::PredIteratorCache::get(), llvm::SmallPtrSetImpl< PtrType >::insert(), P, llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::SSAUpdaterBulk::RewriteAllUses().
Definition at line 296 of file SSAUpdaterBulk.cpp.
References EliminateNewDuplicatePHINodes(), and PHI.
Referenced by llvm::SSAUpdaterBulk::RewriteAndOptimizeAllUses().
| bool EliminateNewDuplicatePHINodes | ( | BasicBlock * | BB, |
| BasicBlock::phi_iterator | FirstExistingPN ) |
Definition at line 270 of file SSAUpdaterBulk.cpp.
References assert(), Changed, I, llvm::make_range(), PHIAreRefEachOther(), llvm::BasicBlock::phis(), and replaceIfIdentical().
Referenced by deduplicatePass().
|
static |
Helper function for finding a block which should have a value for the given user.
For PHI-nodes this block is the corresponding predecessor, for other instructions it's their parent block.
Definition at line 29 of file SSAUpdaterBulk.cpp.
References llvm::cast(), and llvm::dyn_cast().
Referenced by llvm::SSAUpdaterBulk::AddUse(), and llvm::SSAUpdaterBulk::RewriteAllUses().
|
static |
Definition at line 247 of file SSAUpdaterBulk.cpp.
References llvm::SmallPtrSetImpl< PtrType >::contains(), llvm::dyn_cast(), llvm::SmallPtrSetImpl< PtrType >::insert(), and PHI.
Referenced by EliminateNewDuplicatePHINodes().
Definition at line 262 of file SSAUpdaterBulk.cpp.
References PHI.
Referenced by EliminateNewDuplicatePHINodes().
|
static |
Definition at line 231 of file SSAUpdaterBulk.cpp.
References DL, PHI, and llvm::simplifyInstruction().
Referenced by llvm::SSAUpdaterBulk::RewriteAndOptimizeAllUses().