mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1192283096
commit
1e2385b941
@ -52,8 +52,7 @@
|
||||
#include "Support/hash_map"
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Global constants used in marking Cilk functions and function calls.
|
||||
@ -538,4 +537,3 @@ bool Parallelize::run(Module& M)
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "Support/Statistic.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumMerged("constmerge", "Number of global constants merged");
|
||||
@ -37,7 +36,7 @@ namespace {
|
||||
RegisterOpt<ConstantMerge> X("constmerge","Merge Duplicate Global Constants");
|
||||
}
|
||||
|
||||
Pass *createConstantMergePass() { return new ConstantMerge(); }
|
||||
Pass *llvm::createConstantMergePass() { return new ConstantMerge(); }
|
||||
|
||||
bool ConstantMerge::run(Module &M) {
|
||||
std::map<Constant*, GlobalVariable*> CMap;
|
||||
@ -80,4 +79,3 @@ bool ConstantMerge::run(Module &M) {
|
||||
return MadeChanges;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -29,8 +29,7 @@
|
||||
#include "Support/Statistic.h"
|
||||
#include "Support/iterator"
|
||||
#include <set>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumArgumentsEliminated("deadargelim",
|
||||
@ -108,8 +107,8 @@ namespace {
|
||||
/// createDeadArgEliminationPass - This pass removes arguments from functions
|
||||
/// which are not used by the body of the function.
|
||||
///
|
||||
Pass *createDeadArgEliminationPass() { return new DAE(); }
|
||||
Pass *createDeadArgHackingPass() { return new DAH(); }
|
||||
Pass *llvm::createDeadArgEliminationPass() { return new DAE(); }
|
||||
Pass *llvm::createDeadArgHackingPass() { return new DAH(); }
|
||||
|
||||
static inline bool CallPassesValueThoughVararg(Instruction *Call,
|
||||
const Value *Arg) {
|
||||
@ -578,6 +577,3 @@ bool DAE::run(Module &M) {
|
||||
RemoveDeadArgumentsFromFunction(*DeadRetVal.begin());
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
|
@ -18,8 +18,7 @@
|
||||
#include "llvm/SymbolTable.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "Support/Statistic.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
struct DTE : public Pass {
|
||||
@ -42,7 +41,7 @@ namespace {
|
||||
NumKilled("deadtypeelim", "Number of unused typenames removed from symtab");
|
||||
}
|
||||
|
||||
Pass *createDeadTypeEliminationPass() {
|
||||
Pass *llvm::createDeadTypeEliminationPass() {
|
||||
return new DTE();
|
||||
}
|
||||
|
||||
@ -96,5 +95,3 @@ bool DTE::run(Module &M) {
|
||||
|
||||
return Changed;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -6,11 +6,11 @@
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Module.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
class FunctionExtractorPass : public Pass {
|
||||
@ -89,8 +89,6 @@ namespace {
|
||||
RegisterPass<FunctionExtractorPass> X("extract", "Function Extractor");
|
||||
}
|
||||
|
||||
Pass *createFunctionExtractionPass(Function *F) {
|
||||
Pass *llvm::createFunctionExtractionPass(Function *F) {
|
||||
return new FunctionExtractorPass(F);
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include "llvm/Pass.h"
|
||||
#include "Support/Statistic.h"
|
||||
#include <set>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumFunctions("globaldce","Number of functions removed");
|
||||
@ -49,7 +48,7 @@ namespace {
|
||||
RegisterOpt<GlobalDCE> X("globaldce", "Dead Global Elimination");
|
||||
}
|
||||
|
||||
Pass *createGlobalDCEPass() { return new GlobalDCE(); }
|
||||
Pass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
|
||||
|
||||
bool GlobalDCE::run(Module &M) {
|
||||
bool Changed = false;
|
||||
@ -198,4 +197,3 @@ bool GlobalDCE::SafeToDestroyConstant(Constant *C) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/Support/CallSite.h"
|
||||
#include "Support/Statistic.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumArgumentsProped("ipconstprop",
|
||||
@ -38,7 +37,7 @@ namespace {
|
||||
RegisterOpt<IPCP> X("ipconstprop", "Interprocedural constant propagation");
|
||||
}
|
||||
|
||||
Pass *createIPConstantPropagationPass() { return new IPCP(); }
|
||||
Pass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
|
||||
|
||||
bool IPCP::run(Module &M) {
|
||||
bool Changed = false;
|
||||
@ -117,6 +116,7 @@ bool IPCP::processFunction(Function &F) {
|
||||
Value *V = ArgumentConstants[i].first;
|
||||
if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V))
|
||||
V = CPR->getValue();
|
||||
|
||||
AI->replaceAllUsesWith(V);
|
||||
++NumArgumentsProped;
|
||||
MadeChange = true;
|
||||
@ -124,4 +124,3 @@ bool IPCP::processFunction(Function &F) {
|
||||
return MadeChange;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include "Support/Statistic.h"
|
||||
#include <fstream>
|
||||
#include <set>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumFunctions("internalize", "Number of functions internalized");
|
||||
@ -118,8 +117,6 @@ namespace {
|
||||
RegisterOpt<InternalizePass> X("internalize", "Internalize Global Symbols");
|
||||
} // end anonymous namespace
|
||||
|
||||
Pass *createInternalizePass() {
|
||||
Pass *llvm::createInternalizePass() {
|
||||
return new InternalizePass();
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -33,6 +33,7 @@
|
||||
// pass invokable via the "opt" command at will.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Instructions.h"
|
||||
@ -46,8 +47,7 @@
|
||||
#include "Support/Statistic.h"
|
||||
#include "Support/StringExtras.h"
|
||||
#include "Support/VectorExtras.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> LongJmpsTransformed("lowersetjmp",
|
||||
@ -533,9 +533,8 @@ void LowerSetJmp::visitUnwindInst(UnwindInst& UI)
|
||||
"", &UI);
|
||||
}
|
||||
|
||||
Pass* createLowerSetJmpPass()
|
||||
Pass* llvm::createLowerSetJmpPass()
|
||||
{
|
||||
return new LowerSetJmp();
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -52,8 +52,7 @@
|
||||
#include "Support/hash_map"
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Global constants used in marking Cilk functions and function calls.
|
||||
@ -538,4 +537,3 @@ bool Parallelize::run(Module& M)
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -14,6 +14,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/CallGraphSCCPass.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Intrinsics.h"
|
||||
@ -22,8 +23,7 @@
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include "Support/Statistic.h"
|
||||
#include <set>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumRemoved("prune-eh", "Number of invokes removed");
|
||||
@ -39,7 +39,7 @@ namespace {
|
||||
RegisterOpt<PruneEH> X("prune-eh", "Remove unused exception handling info");
|
||||
}
|
||||
|
||||
Pass *createPruneEHPass() { return new PruneEH(); }
|
||||
Pass *llvm::createPruneEHPass() { return new PruneEH(); }
|
||||
|
||||
|
||||
bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
||||
@ -107,4 +107,3 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
||||
return MadeChange;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/CallSite.h"
|
||||
#include "Support/Statistic.h"
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
Statistic<> NumRaised("raiseallocs", "Number of allocations raised");
|
||||
@ -52,7 +51,7 @@ namespace {
|
||||
|
||||
|
||||
// createRaiseAllocationsPass - The interface to this file...
|
||||
Pass *createRaiseAllocationsPass() {
|
||||
Pass *llvm::createRaiseAllocationsPass() {
|
||||
return new RaiseAllocations();
|
||||
}
|
||||
|
||||
@ -197,4 +196,3 @@ bool RaiseAllocations::run(Module &M) {
|
||||
return Changed;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
Loading…
Reference in New Issue
Block a user