From 09ff1126dab045d68be7d9e8ae7ad0601002a718 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 24 Jul 2002 21:21:32 +0000 Subject: [PATCH 1/1] *** empty log message *** git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3056 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineCodeForMethod.h | 2 +- include/llvm/CodeGen/MachineFunction.h | 2 +- include/llvm/CodeGen/MachineInstr.h | 3 +-- include/llvm/Target/TargetRegInfo.h | 2 +- include/llvm/Target/TargetSchedInfo.h | 2 +- lib/CodeGen/InstrSched/InstrScheduling.cpp | 10 +++++----- lib/CodeGen/InstrSched/SchedGraph.cpp | 1 - lib/CodeGen/InstrSched/SchedGraph.h | 4 ++-- lib/CodeGen/InstrSched/SchedPriorities.cpp | 2 +- lib/CodeGen/InstrSched/SchedPriorities.h | 2 +- lib/CodeGen/MachineFunction.cpp | 2 +- lib/Target/SparcV9/InstrSched/InstrScheduling.cpp | 10 +++++----- lib/Target/SparcV9/InstrSched/SchedGraph.cpp | 1 - lib/Target/SparcV9/InstrSched/SchedGraph.h | 4 ++-- lib/Target/SparcV9/InstrSched/SchedPriorities.cpp | 2 +- lib/Target/SparcV9/InstrSched/SchedPriorities.h | 2 +- lib/Target/SparcV9/SparcV9AsmPrinter.cpp | 12 ++++++------ lib/Target/SparcV9/SparcV9InstrSelection.cpp | 2 +- lib/Target/SparcV9/SparcV9RegInfo.cpp | 2 +- 19 files changed, 32 insertions(+), 35 deletions(-) diff --git a/include/llvm/CodeGen/MachineCodeForMethod.h b/include/llvm/CodeGen/MachineCodeForMethod.h index fb9eaf8fe92..e1b8e4f1f59 100644 --- a/include/llvm/CodeGen/MachineCodeForMethod.h +++ b/include/llvm/CodeGen/MachineCodeForMethod.h @@ -12,7 +12,7 @@ #include "llvm/Annotation.h" #include "Support/NonCopyable.h" #include "Support/HashExtras.h" -#include +#include class Value; class Function; class Constant; diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index fb9eaf8fe92..e1b8e4f1f59 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -12,7 +12,7 @@ #include "llvm/Annotation.h" #include "Support/NonCopyable.h" #include "Support/HashExtras.h" -#include +#include class Value; class Function; class Constant; diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 2c183e1da93..c81eb87e73d 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -12,10 +12,9 @@ #include "llvm/Target/MachineInstrInfo.h" #include "llvm/Annotation.h" #include -#include +#include class Instruction; using std::vector; -using std::hash_set; //--------------------------------------------------------------------------- // class MachineOperand diff --git a/include/llvm/Target/TargetRegInfo.h b/include/llvm/Target/TargetRegInfo.h index 7ec5ee26b0c..4f809bfb158 100644 --- a/include/llvm/Target/TargetRegInfo.h +++ b/include/llvm/Target/TargetRegInfo.h @@ -9,7 +9,7 @@ #define LLVM_TARGET_MACHINEREGINFO_H #include "Support/NonCopyable.h" -#include +#include #include class TargetMachine; diff --git a/include/llvm/Target/TargetSchedInfo.h b/include/llvm/Target/TargetSchedInfo.h index 12539b686f2..ba065cba094 100644 --- a/include/llvm/Target/TargetSchedInfo.h +++ b/include/llvm/Target/TargetSchedInfo.h @@ -7,8 +7,8 @@ #ifndef LLVM_TARGET_MACHINESCHEDINFO_H #define LLVM_TARGET_MACHINESCHEDINFO_H -#include #include "llvm/Target/MachineInstrInfo.h" +#include typedef long long cycles_t; static const cycles_t HUGE_LATENCY = ~((long long) 1 << (sizeof(cycles_t)-2)); diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp index 1d4c18058f3..2271c780a3c 100644 --- a/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -352,18 +352,18 @@ private: unsigned int totalInstrCount; cycles_t curTime; cycles_t nextEarliestIssueTime; // next cycle we can issue - vector > choicesForSlot; // indexed by slot# + vector > choicesForSlot; // indexed by slot# vector choiceVec; // indexed by node ptr vector numInClass; // indexed by sched class vector nextEarliestStartTime; // indexed by opCode - std::hash_map delaySlotInfoForBranches; + hash_map delaySlotInfoForBranches; // indexed by branch node ptr public: SchedulingManager(const TargetMachine& _target, const SchedGraph* graph, SchedPriorities& schedPrio); ~SchedulingManager() { - for (std::hash_map::iterator I = delaySlotInfoForBranches.begin(), E = delaySlotInfoForBranches.end(); I != E; ++I) delete I->second; @@ -422,7 +422,7 @@ public: return choiceVec[i]; } - inline std::hash_set& getChoicesForSlot(unsigned slotNum) { + inline hash_set& getChoicesForSlot(unsigned slotNum) { assert(slotNum < nslots); return choicesForSlot[slotNum]; } @@ -497,7 +497,7 @@ public: inline DelaySlotInfo* getDelaySlotInfoForInstr(const SchedGraphNode* bn, bool createIfMissing=false) { - std::hash_map::const_iterator + hash_map::const_iterator I = delaySlotInfoForBranches.find(bn); if (I != delaySlotInfoForBranches.end()) return I->second; diff --git a/lib/CodeGen/InstrSched/SchedGraph.cpp b/lib/CodeGen/InstrSched/SchedGraph.cpp index 96962ced14f..8a9c8e573b3 100644 --- a/lib/CodeGen/InstrSched/SchedGraph.cpp +++ b/lib/CodeGen/InstrSched/SchedGraph.cpp @@ -27,7 +27,6 @@ using std::vector; using std::pair; -using std::hash_map; using std::cerr; //*********************** Internal Data Structures *************************/ diff --git a/lib/CodeGen/InstrSched/SchedGraph.h b/lib/CodeGen/InstrSched/SchedGraph.h index aa258813c37..7db22d67346 100644 --- a/lib/CodeGen/InstrSched/SchedGraph.h +++ b/lib/CodeGen/InstrSched/SchedGraph.h @@ -211,14 +211,14 @@ private: class SchedGraph : public NonCopyable, - private std::hash_map + private hash_map { private: std::vector bbVec; // basic blocks included in the graph SchedGraphNode* graphRoot; // the root and leaf are not inserted SchedGraphNode* graphLeaf; // in the hash_map (see getNumNodes()) - typedef std::hash_map map_base; + typedef hash_map map_base; public: using map_base::iterator; using map_base::const_iterator; diff --git a/lib/CodeGen/InstrSched/SchedPriorities.cpp b/lib/CodeGen/InstrSched/SchedPriorities.cpp index 8a1c9a53484..6277576c23b 100644 --- a/lib/CodeGen/InstrSched/SchedPriorities.cpp +++ b/lib/CodeGen/InstrSched/SchedPriorities.cpp @@ -270,7 +270,7 @@ SchedPriorities::instructionHasLastUse(FunctionLiveVarInfo &LVI, const SchedGraphNode* graphNode) { const MachineInstr *MI = graphNode->getMachineInstr(); - std::hash_map::const_iterator + hash_map::const_iterator ui = lastUseMap.find(MI); if (ui != lastUseMap.end()) return ui->second; diff --git a/lib/CodeGen/InstrSched/SchedPriorities.h b/lib/CodeGen/InstrSched/SchedPriorities.h index f5c29b27e32..b01c1a43d68 100644 --- a/lib/CodeGen/InstrSched/SchedPriorities.h +++ b/lib/CodeGen/InstrSched/SchedPriorities.h @@ -25,7 +25,7 @@ #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/Target/MachineSchedInfo.h" #include -#include +#include #include class Function; class MachineInstr; diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index a435be646b8..ce39b45f12c 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -266,7 +266,7 @@ MachineCodeForMethod::popAllTempValues(const TargetMachine& target) int MachineCodeForMethod::getOffset(const Value* val) const { - std::hash_map::const_iterator pair = offsets.find(val); + hash_map::const_iterator pair = offsets.find(val); return (pair == offsets.end())? INVALID_FRAME_OFFSET : pair->second; } diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp index 1d4c18058f3..2271c780a3c 100644 --- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp +++ b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp @@ -352,18 +352,18 @@ private: unsigned int totalInstrCount; cycles_t curTime; cycles_t nextEarliestIssueTime; // next cycle we can issue - vector > choicesForSlot; // indexed by slot# + vector > choicesForSlot; // indexed by slot# vector choiceVec; // indexed by node ptr vector numInClass; // indexed by sched class vector nextEarliestStartTime; // indexed by opCode - std::hash_map delaySlotInfoForBranches; + hash_map delaySlotInfoForBranches; // indexed by branch node ptr public: SchedulingManager(const TargetMachine& _target, const SchedGraph* graph, SchedPriorities& schedPrio); ~SchedulingManager() { - for (std::hash_map::iterator I = delaySlotInfoForBranches.begin(), E = delaySlotInfoForBranches.end(); I != E; ++I) delete I->second; @@ -422,7 +422,7 @@ public: return choiceVec[i]; } - inline std::hash_set& getChoicesForSlot(unsigned slotNum) { + inline hash_set& getChoicesForSlot(unsigned slotNum) { assert(slotNum < nslots); return choicesForSlot[slotNum]; } @@ -497,7 +497,7 @@ public: inline DelaySlotInfo* getDelaySlotInfoForInstr(const SchedGraphNode* bn, bool createIfMissing=false) { - std::hash_map::const_iterator + hash_map::const_iterator I = delaySlotInfoForBranches.find(bn); if (I != delaySlotInfoForBranches.end()) return I->second; diff --git a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp index 96962ced14f..8a9c8e573b3 100644 --- a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp +++ b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp @@ -27,7 +27,6 @@ using std::vector; using std::pair; -using std::hash_map; using std::cerr; //*********************** Internal Data Structures *************************/ diff --git a/lib/Target/SparcV9/InstrSched/SchedGraph.h b/lib/Target/SparcV9/InstrSched/SchedGraph.h index aa258813c37..7db22d67346 100644 --- a/lib/Target/SparcV9/InstrSched/SchedGraph.h +++ b/lib/Target/SparcV9/InstrSched/SchedGraph.h @@ -211,14 +211,14 @@ private: class SchedGraph : public NonCopyable, - private std::hash_map + private hash_map { private: std::vector bbVec; // basic blocks included in the graph SchedGraphNode* graphRoot; // the root and leaf are not inserted SchedGraphNode* graphLeaf; // in the hash_map (see getNumNodes()) - typedef std::hash_map map_base; + typedef hash_map map_base; public: using map_base::iterator; using map_base::const_iterator; diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp index 8a1c9a53484..6277576c23b 100644 --- a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp +++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp @@ -270,7 +270,7 @@ SchedPriorities::instructionHasLastUse(FunctionLiveVarInfo &LVI, const SchedGraphNode* graphNode) { const MachineInstr *MI = graphNode->getMachineInstr(); - std::hash_map::const_iterator + hash_map::const_iterator ui = lastUseMap.find(MI); if (ui != lastUseMap.end()) return ui->second; diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.h b/lib/Target/SparcV9/InstrSched/SchedPriorities.h index f5c29b27e32..b01c1a43d68 100644 --- a/lib/Target/SparcV9/InstrSched/SchedPriorities.h +++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.h @@ -25,7 +25,7 @@ #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/Target/MachineSchedInfo.h" #include -#include +#include #include class Function; class MachineInstr; diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 34d80b1e865..e58a0c2324f 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -34,7 +34,7 @@ class GlobalIdTable: public Annotation { static AnnotationID AnnotId; friend class AsmPrinter; // give access to AnnotId - typedef std::hash_map ValIdMap; + typedef hash_map ValIdMap; typedef ValIdMap::const_iterator ValIdMapConstIterator; typedef ValIdMap:: iterator ValIdMapIterator; public: @@ -474,7 +474,7 @@ private: void printConstant( const Constant* CV, std::string valID = ""); static void FoldConstants(const Module &M, - std::hash_set &moduleConstants); + hash_set &moduleConstants); }; @@ -741,10 +741,10 @@ SparcModuleAsmPrinter::printConstant(const Constant* CV, string valID) void SparcModuleAsmPrinter::FoldConstants(const Module &M, - std::hash_set &MC) { + hash_set &MC) { for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isExternal()) { - const std::hash_set &pool = + const hash_set &pool = MachineCodeForMethod::get(I).getConstantPoolValues(); MC.insert(pool.begin(), pool.end()); } @@ -774,7 +774,7 @@ void SparcModuleAsmPrinter::emitGlobalsAndConstants(const Module &M) { // lets force these constants into the slot table so that we can get // unique names for unnamed constants also. // - std::hash_set moduleConstants; + hash_set moduleConstants; FoldConstants(M, moduleConstants); // Now, emit the three data sections separately; the cost of I/O should @@ -786,7 +786,7 @@ void SparcModuleAsmPrinter::emitGlobalsAndConstants(const Module &M) { if (GI->hasInitializer() && GI->isConstant()) printGlobalVariable(GI); - for (std::hash_set::const_iterator + for (hash_set::const_iterator I = moduleConstants.begin(), E = moduleConstants.end(); I != E; ++I) printConstant(*I); diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp index ea1ddea881f..8783a1e86e5 100644 --- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp +++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp @@ -148,7 +148,7 @@ ChooseBFpccInstruction(const InstructionNode* instrNode, static TmpInstruction* GetTmpForCC(Value* boolVal, const Function *F, const Type* ccType) { - typedef std::hash_map BoolTmpCache; + typedef hash_map BoolTmpCache; static BoolTmpCache boolToTmpCache; // Map boolVal -> TmpInstruction* static const Function *lastFunction = 0;// Use to flush cache between funcs diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index 11b65f8cab0..c321adc25fb 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp @@ -1317,7 +1317,7 @@ UltraSparcRegInfo::insertCallerSavingCode(vector& instrnsBefore, // has set to record which registers were saved/restored // - std::hash_set PushedRegSet; + hash_set PushedRegSet; CallArgsDescriptor* argDesc = CallArgsDescriptor::get(CallMI); -- 2.34.1