mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Rename a lot of things to change FastDLE to RedundantLoadElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e2a1624da3
commit
a7f98e2919
@ -61,7 +61,7 @@ namespace {
|
||||
(void) llvm::createDeadStoreEliminationPass();
|
||||
(void) llvm::createDeadTypeEliminationPass();
|
||||
(void) llvm::createEdgeProfilerPass();
|
||||
(void) llvm::createFastDeadLoadEliminationPass();
|
||||
(void) llvm::createRedundantLoadEliminationPass();
|
||||
(void) llvm::createFastDeadStoreEliminationPass();
|
||||
(void) llvm::createFunctionInliningPass();
|
||||
(void) llvm::createFunctionProfilerPass();
|
||||
|
@ -332,10 +332,10 @@ FunctionPass *createFastDeadStoreEliminationPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// FastDeadLoadElimination - This pass deletes loads that are dominated by
|
||||
// RedundantLoadElimination - This pass deletes loads that are dominated by
|
||||
// must-aliased loads and are not stored to between the loads.
|
||||
//
|
||||
FunctionPass *createFastDeadLoadEliminationPass();
|
||||
FunctionPass *createRedundantLoadEliminationPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
|
@ -15,7 +15,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "fdle"
|
||||
#define DEBUG_TYPE "rle"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Instructions.h"
|
||||
@ -30,9 +30,9 @@ using namespace llvm;
|
||||
STATISTIC(NumFastLoads, "Number of loads deleted");
|
||||
|
||||
namespace {
|
||||
struct VISIBILITY_HIDDEN FDLE : public FunctionPass {
|
||||
struct VISIBILITY_HIDDEN RLE : public FunctionPass {
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
FDLE() : FunctionPass((intptr_t)&ID) {}
|
||||
RLE() : FunctionPass((intptr_t)&ID) {}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
bool Changed = false;
|
||||
@ -51,13 +51,13 @@ namespace {
|
||||
AU.addPreserved<MemoryDependenceAnalysis>();
|
||||
}
|
||||
};
|
||||
char FDLE::ID = 0;
|
||||
RegisterPass<FDLE> X("fdle", "Fast Dead Load Elimination");
|
||||
char RLE::ID = 0;
|
||||
RegisterPass<RLE> X("rle", "Redundant Load Elimination");
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createFastDeadLoadEliminationPass() { return new FDLE(); }
|
||||
FunctionPass *llvm::createRedundantLoadEliminationPass() { return new RLE(); }
|
||||
|
||||
bool FDLE::runOnBasicBlock(BasicBlock &BB) {
|
||||
bool RLE::runOnBasicBlock(BasicBlock &BB) {
|
||||
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
|
||||
|
||||
// Record the last-seen load from this pointer
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -fdle | llvm-dis | not grep DEAD
|
||||
; RUN: llvm-as < %s | opt -rle | llvm-dis | not grep DEAD
|
||||
|
||||
define void @test(i32* %Q, i32* %P) {
|
||||
%A = load i32* %Q
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -fdle | llvm-dis | grep NOTDEAD
|
||||
; RUN: llvm-as < %s | opt -rle | llvm-dis | grep NOTDEAD
|
||||
|
||||
define void @test(i32* %Q, i32* %P) {
|
||||
%A = load i32* %Q
|
Loading…
x
Reference in New Issue
Block a user