mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Rename FastDSE to just DSE.
llvm-svn: 40668
This commit is contained in:
parent
45499c55e5
commit
58e64df595
@ -62,7 +62,6 @@ namespace {
|
||||
(void) llvm::createDeadTypeEliminationPass();
|
||||
(void) llvm::createEdgeProfilerPass();
|
||||
(void) llvm::createRedundantLoadEliminationPass();
|
||||
(void) llvm::createFastDeadStoreEliminationPass();
|
||||
(void) llvm::createFunctionInliningPass();
|
||||
(void) llvm::createFunctionProfilerPass();
|
||||
(void) llvm::createGCSEPass();
|
||||
|
@ -323,13 +323,6 @@ FunctionPass *createPredicateSimplifierPass();
|
||||
//
|
||||
FunctionPass *createGVNPREPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// FastDeadStoreElimination - This pass deletes stores that are post-dominated by
|
||||
// must-aliased stores and are not loaded used between the stores.
|
||||
//
|
||||
FunctionPass *createFastDeadStoreEliminationPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// RedundantLoadElimination - This pass deletes loads that are dominated by
|
||||
|
@ -1,4 +1,4 @@
|
||||
//===- FastDSE.cpp - Fast Dead Store Elimination --------------------------===//
|
||||
//===- DeadStoreElimination.cpp - Fast Dead Store Elimination --------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -15,7 +15,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "fdse"
|
||||
#define DEBUG_TYPE "dse"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/Function.h"
|
||||
@ -35,9 +35,9 @@ STATISTIC(NumFastStores, "Number of stores deleted");
|
||||
STATISTIC(NumFastOther , "Number of other instrs removed");
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN FDSE : public FunctionPass {
|
||||
struct VISIBILITY_HIDDEN DSE : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
FDSE() : FunctionPass((intptr_t)&ID) {}
|
||||
DSE() : FunctionPass((intptr_t)&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
bool Changed = false;
|
||||
@ -78,13 +78,13 @@ namespace {
|
||||
AU.addPreserved<MemoryDependenceAnalysis>();
|
||||
}
|
||||
};
|
||||
char FDSE::ID = 0;
|
||||
RegisterPass<FDSE> X("fdse", "Fast Dead Store Elimination");
|
||||
char DSE::ID = 0;
|
||||
RegisterPass<DSE> X("dse", "Dead Store Elimination");
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createFastDeadStoreEliminationPass() { return new FDSE(); }
|
||||
FunctionPass *llvm::createDeadStoreEliminationPass() { return new DSE(); }
|
||||
|
||||
bool FDSE::runOnBasicBlock(BasicBlock &BB) {
|
||||
bool DSE::runOnBasicBlock(BasicBlock &BB) {
|
||||
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
||||
|
||||
// Record the last-seen store to this pointer
|
||||
@ -172,7 +172,7 @@ bool FDSE::runOnBasicBlock(BasicBlock &BB) {
|
||||
|
||||
/// handleFreeWithNonTrivialDependency - Handle frees of entire structures whose
|
||||
/// dependency is a store to a field of that structure
|
||||
bool FDSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep,
|
||||
bool DSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep,
|
||||
SetVector<Instruction*>& possiblyDead) {
|
||||
TargetData &TD = getAnalysis<TargetData>();
|
||||
AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
|
||||
@ -213,7 +213,7 @@ bool FDSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep,
|
||||
|
||||
/// handleEndBlock - Remove dead stores to stack-allocated locations in the function
|
||||
/// end block
|
||||
bool FDSE::handleEndBlock(BasicBlock& BB, SetVector<Instruction*>& possiblyDead) {
|
||||
bool DSE::handleEndBlock(BasicBlock& BB, SetVector<Instruction*>& possiblyDead) {
|
||||
TargetData &TD = getAnalysis<TargetData>();
|
||||
AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
|
||||
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
||||
@ -309,7 +309,7 @@ bool FDSE::handleEndBlock(BasicBlock& BB, SetVector<Instruction*>& possiblyDead)
|
||||
return MadeChange;
|
||||
}
|
||||
|
||||
bool FDSE::RemoveUndeadPointers(Value* killPointer, unsigned killPointerSize,
|
||||
bool DSE::RemoveUndeadPointers(Value* killPointer, unsigned killPointerSize,
|
||||
BasicBlock::iterator& BBI,
|
||||
SmallPtrSet<AllocaInst*, 4>& deadPointers,
|
||||
SetVector<Instruction*>& possiblyDead) {
|
||||
@ -363,7 +363,7 @@ bool FDSE::RemoveUndeadPointers(Value* killPointer, unsigned killPointerSize,
|
||||
return MadeChange;
|
||||
}
|
||||
|
||||
void FDSE::DeleteDeadInstructionChains(Instruction *I,
|
||||
void DSE::DeleteDeadInstructionChains(Instruction *I,
|
||||
SetVector<Instruction*> &DeadInsts) {
|
||||
// Instruction must be dead.
|
||||
if (!I->use_empty() || !isInstructionTriviallyDead(I)) return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -fdse -scalarrepl -instcombine | \
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -dse -scalarrepl -instcombine | \
|
||||
; RUN: llvm-dis | not grep {ret int undef}
|
||||
|
||||
int %test(double %__x) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | \
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | \
|
||||
; RUN: grep {store i32 1234567}
|
||||
|
||||
; Do not delete stores that are only partially killed.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | grep store
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep store
|
||||
|
||||
double %foo(sbyte* %X) {
|
||||
%X_addr = alloca sbyte*
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -fdse -disable-output
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -dse -disable-output
|
||||
target endian = big
|
||||
target pointersize = 32
|
||||
target triple = "powerpc-apple-darwin8"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | \
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | \
|
||||
; RUN: not grep {store sbyte}
|
||||
; Ensure that the dead store is deleted in this case. It is wholely
|
||||
; overwritten by the second store.
|
||||
|
@ -168,7 +168,7 @@ void Optimize(Module* M) {
|
||||
addPass(Passes, createLICMPass()); // Hoist loop invariants
|
||||
addPass(Passes, createLoadValueNumberingPass()); // GVN for load instrs
|
||||
addPass(Passes, createGCSEPass()); // Remove common subexprs
|
||||
addPass(Passes, createFastDeadStoreEliminationPass()); // Nuke dead stores
|
||||
addPass(Passes, createDeadStoreEliminationPass()); // Nuke dead stores
|
||||
|
||||
// Cleanup and simplify the code after the scalar optimizations.
|
||||
addPass(Passes, createInstructionCombiningPass());
|
||||
|
@ -290,7 +290,7 @@ void AddStandardCompilePasses(PassManager &PM) {
|
||||
addPass(PM, createInstructionCombiningPass());
|
||||
addPass(PM, createCondPropagationPass()); // Propagate conditionals
|
||||
|
||||
addPass(PM, createFastDeadStoreEliminationPass()); // Delete dead stores
|
||||
addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
|
||||
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
|
||||
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
||||
addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations
|
||||
|
Loading…
Reference in New Issue
Block a user