#include "llvm/Annotation.h"
#include "Support/NonCopyable.h"
#include "Support/HashExtras.h"
-#include <ext/hash_set>
+#include <Support/hash_set>
class Value;
class Function;
class Constant;
#include "llvm/Annotation.h"
#include "Support/NonCopyable.h"
#include "Support/HashExtras.h"
-#include <ext/hash_set>
+#include <Support/hash_set>
class Value;
class Function;
class Constant;
#include "llvm/Target/MachineInstrInfo.h"
#include "llvm/Annotation.h"
#include <iterator>
-#include <ext/hash_set>
+#include <Support/hash_set>
class Instruction;
using std::vector;
-using std::hash_set;
//---------------------------------------------------------------------------
// class MachineOperand
#define LLVM_TARGET_MACHINEREGINFO_H
#include "Support/NonCopyable.h"
-#include <ext/hash_map>
+#include <Support/hash_map>
#include <string>
class TargetMachine;
#ifndef LLVM_TARGET_MACHINESCHEDINFO_H
#define LLVM_TARGET_MACHINESCHEDINFO_H
-#include <ext/hash_map>
#include "llvm/Target/MachineInstrInfo.h"
+#include <Support/hash_map>
typedef long long cycles_t;
static const cycles_t HUGE_LATENCY = ~((long long) 1 << (sizeof(cycles_t)-2));
unsigned int totalInstrCount;
cycles_t curTime;
cycles_t nextEarliestIssueTime; // next cycle we can issue
- vector<std::hash_set<const SchedGraphNode*> > choicesForSlot; // indexed by slot#
+ vector<hash_set<const SchedGraphNode*> > choicesForSlot; // indexed by slot#
vector<const SchedGraphNode*> choiceVec; // indexed by node ptr
vector<int> numInClass; // indexed by sched class
vector<cycles_t> nextEarliestStartTime; // indexed by opCode
- std::hash_map<const SchedGraphNode*, DelaySlotInfo*> delaySlotInfoForBranches;
+ hash_map<const SchedGraphNode*, DelaySlotInfo*> delaySlotInfoForBranches;
// indexed by branch node ptr
public:
SchedulingManager(const TargetMachine& _target, const SchedGraph* graph,
SchedPriorities& schedPrio);
~SchedulingManager() {
- for (std::hash_map<const SchedGraphNode*,
+ for (hash_map<const SchedGraphNode*,
DelaySlotInfo*>::iterator I = delaySlotInfoForBranches.begin(),
E = delaySlotInfoForBranches.end(); I != E; ++I)
delete I->second;
return choiceVec[i];
}
- inline std::hash_set<const SchedGraphNode*>& getChoicesForSlot(unsigned slotNum) {
+ inline hash_set<const SchedGraphNode*>& getChoicesForSlot(unsigned slotNum) {
assert(slotNum < nslots);
return choicesForSlot[slotNum];
}
inline DelaySlotInfo* getDelaySlotInfoForInstr(const SchedGraphNode* bn,
bool createIfMissing=false)
{
- std::hash_map<const SchedGraphNode*, DelaySlotInfo*>::const_iterator
+ hash_map<const SchedGraphNode*, DelaySlotInfo*>::const_iterator
I = delaySlotInfoForBranches.find(bn);
if (I != delaySlotInfoForBranches.end())
return I->second;
using std::vector;
using std::pair;
-using std::hash_map;
using std::cerr;
//*********************** Internal Data Structures *************************/
class SchedGraph :
public NonCopyable,
- private std::hash_map<const MachineInstr*, SchedGraphNode*>
+ private hash_map<const MachineInstr*, SchedGraphNode*>
{
private:
std::vector<const BasicBlock*> 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<const MachineInstr*, SchedGraphNode*> map_base;
+ typedef hash_map<const MachineInstr*, SchedGraphNode*> map_base;
public:
using map_base::iterator;
using map_base::const_iterator;
const SchedGraphNode* graphNode) {
const MachineInstr *MI = graphNode->getMachineInstr();
- std::hash_map<const MachineInstr*, bool>::const_iterator
+ hash_map<const MachineInstr*, bool>::const_iterator
ui = lastUseMap.find(MI);
if (ui != lastUseMap.end())
return ui->second;
#include "llvm/CodeGen/InstrScheduling.h"
#include "llvm/Target/MachineSchedInfo.h"
#include <list>
-#include <ext/hash_set>
+#include <Support/hash_set>
#include <iostream>
class Function;
class MachineInstr;
int
MachineCodeForMethod::getOffset(const Value* val) const
{
- std::hash_map<const Value*, int>::const_iterator pair = offsets.find(val);
+ hash_map<const Value*, int>::const_iterator pair = offsets.find(val);
return (pair == offsets.end())? INVALID_FRAME_OFFSET : pair->second;
}
unsigned int totalInstrCount;
cycles_t curTime;
cycles_t nextEarliestIssueTime; // next cycle we can issue
- vector<std::hash_set<const SchedGraphNode*> > choicesForSlot; // indexed by slot#
+ vector<hash_set<const SchedGraphNode*> > choicesForSlot; // indexed by slot#
vector<const SchedGraphNode*> choiceVec; // indexed by node ptr
vector<int> numInClass; // indexed by sched class
vector<cycles_t> nextEarliestStartTime; // indexed by opCode
- std::hash_map<const SchedGraphNode*, DelaySlotInfo*> delaySlotInfoForBranches;
+ hash_map<const SchedGraphNode*, DelaySlotInfo*> delaySlotInfoForBranches;
// indexed by branch node ptr
public:
SchedulingManager(const TargetMachine& _target, const SchedGraph* graph,
SchedPriorities& schedPrio);
~SchedulingManager() {
- for (std::hash_map<const SchedGraphNode*,
+ for (hash_map<const SchedGraphNode*,
DelaySlotInfo*>::iterator I = delaySlotInfoForBranches.begin(),
E = delaySlotInfoForBranches.end(); I != E; ++I)
delete I->second;
return choiceVec[i];
}
- inline std::hash_set<const SchedGraphNode*>& getChoicesForSlot(unsigned slotNum) {
+ inline hash_set<const SchedGraphNode*>& getChoicesForSlot(unsigned slotNum) {
assert(slotNum < nslots);
return choicesForSlot[slotNum];
}
inline DelaySlotInfo* getDelaySlotInfoForInstr(const SchedGraphNode* bn,
bool createIfMissing=false)
{
- std::hash_map<const SchedGraphNode*, DelaySlotInfo*>::const_iterator
+ hash_map<const SchedGraphNode*, DelaySlotInfo*>::const_iterator
I = delaySlotInfoForBranches.find(bn);
if (I != delaySlotInfoForBranches.end())
return I->second;
using std::vector;
using std::pair;
-using std::hash_map;
using std::cerr;
//*********************** Internal Data Structures *************************/
class SchedGraph :
public NonCopyable,
- private std::hash_map<const MachineInstr*, SchedGraphNode*>
+ private hash_map<const MachineInstr*, SchedGraphNode*>
{
private:
std::vector<const BasicBlock*> 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<const MachineInstr*, SchedGraphNode*> map_base;
+ typedef hash_map<const MachineInstr*, SchedGraphNode*> map_base;
public:
using map_base::iterator;
using map_base::const_iterator;
const SchedGraphNode* graphNode) {
const MachineInstr *MI = graphNode->getMachineInstr();
- std::hash_map<const MachineInstr*, bool>::const_iterator
+ hash_map<const MachineInstr*, bool>::const_iterator
ui = lastUseMap.find(MI);
if (ui != lastUseMap.end())
return ui->second;
#include "llvm/CodeGen/InstrScheduling.h"
#include "llvm/Target/MachineSchedInfo.h"
#include <list>
-#include <ext/hash_set>
+#include <Support/hash_set>
#include <iostream>
class Function;
class MachineInstr;
static AnnotationID AnnotId;
friend class AsmPrinter; // give access to AnnotId
- typedef std::hash_map<const Value*, int> ValIdMap;
+ typedef hash_map<const Value*, int> ValIdMap;
typedef ValIdMap::const_iterator ValIdMapConstIterator;
typedef ValIdMap:: iterator ValIdMapIterator;
public:
void printConstant( const Constant* CV, std::string valID = "");
static void FoldConstants(const Module &M,
- std::hash_set<const Constant*> &moduleConstants);
+ hash_set<const Constant*> &moduleConstants);
};
void SparcModuleAsmPrinter::FoldConstants(const Module &M,
- std::hash_set<const Constant*> &MC) {
+ hash_set<const Constant*> &MC) {
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isExternal()) {
- const std::hash_set<const Constant*> &pool =
+ const hash_set<const Constant*> &pool =
MachineCodeForMethod::get(I).getConstantPoolValues();
MC.insert(pool.begin(), pool.end());
}
// lets force these constants into the slot table so that we can get
// unique names for unnamed constants also.
//
- std::hash_set<const Constant*> moduleConstants;
+ hash_set<const Constant*> moduleConstants;
FoldConstants(M, moduleConstants);
// Now, emit the three data sections separately; the cost of I/O should
if (GI->hasInitializer() && GI->isConstant())
printGlobalVariable(GI);
- for (std::hash_set<const Constant*>::const_iterator
+ for (hash_set<const Constant*>::const_iterator
I = moduleConstants.begin(),
E = moduleConstants.end(); I != E; ++I)
printConstant(*I);
static TmpInstruction*
GetTmpForCC(Value* boolVal, const Function *F, const Type* ccType)
{
- typedef std::hash_map<const Value*, TmpInstruction*> BoolTmpCache;
+ typedef hash_map<const Value*, TmpInstruction*> BoolTmpCache;
static BoolTmpCache boolToTmpCache; // Map boolVal -> TmpInstruction*
static const Function *lastFunction = 0;// Use to flush cache between funcs
// has set to record which registers were saved/restored
//
- std::hash_set<unsigned> PushedRegSet;
+ hash_set<unsigned> PushedRegSet;
CallArgsDescriptor* argDesc = CallArgsDescriptor::get(CallMI);