mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Remove all contents of the cfg namespace to the global namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2369 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
876509614b
commit
8fc2f2072d
@ -21,8 +21,6 @@
|
|||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
namespace cfg {
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// DominatorBase - Base class that other, more interesting dominator analyses
|
// DominatorBase - Base class that other, more interesting dominator analyses
|
||||||
@ -301,6 +299,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End namespace cfg
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
class Value;
|
class Value;
|
||||||
class PHINode;
|
class PHINode;
|
||||||
class Instruction;
|
class Instruction;
|
||||||
namespace cfg { class LoopInfo; class Loop; }
|
class LoopInfo; class Loop;
|
||||||
|
|
||||||
class InductionVariable {
|
class InductionVariable {
|
||||||
public:
|
public:
|
||||||
@ -40,11 +40,11 @@ public:
|
|||||||
// Create an induction variable for the specified value. If it is a PHI, and
|
// Create an induction variable for the specified value. If it is a PHI, and
|
||||||
// if it's recognizable, classify it and fill in instance variables.
|
// if it's recognizable, classify it and fill in instance variables.
|
||||||
//
|
//
|
||||||
InductionVariable(PHINode *PN, cfg::LoopInfo *LoopInfo = 0);
|
InductionVariable(PHINode *PN, LoopInfo *LoopInfo = 0);
|
||||||
|
|
||||||
// Classify Induction
|
// Classify Induction
|
||||||
static enum iType Classify(const Value *Start, const Value *Step,
|
static enum iType Classify(const Value *Start, const Value *Step,
|
||||||
const cfg::Loop *L = 0);
|
const Loop *L = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//===- llvm/Analysis/Interval.h - Interval Class Declaration -----*- C++ -*--=//
|
//===- llvm/Analysis/Interval.h - Interval Class Declaration -----*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// This file contains the declaration of the cfg::Interval class, which
|
// This file contains the declaration of the Interval class, which
|
||||||
// represents a set of CFG nodes and is a portion of an interval partition.
|
// represents a set of CFG nodes and is a portion of an interval partition.
|
||||||
//
|
//
|
||||||
// Intervals have some interesting and useful properties, including the
|
// Intervals have some interesting and useful properties, including the
|
||||||
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
class BasicBlock;
|
class BasicBlock;
|
||||||
|
|
||||||
namespace cfg {
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// Interval Class - An Interval is a set of nodes defined such that every node
|
// Interval Class - An Interval is a set of nodes defined such that every node
|
||||||
@ -89,27 +87,24 @@ public:
|
|||||||
bool isLoop() const;
|
bool isLoop() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End namespace cfg
|
|
||||||
|
|
||||||
// succ_begin/succ_end - define methods so that Intervals may be used
|
// succ_begin/succ_end - define methods so that Intervals may be used
|
||||||
// just like BasicBlocks can with the succ_* functions, and *::succ_iterator.
|
// just like BasicBlocks can with the succ_* functions, and *::succ_iterator.
|
||||||
//
|
//
|
||||||
inline cfg::Interval::succ_iterator succ_begin(cfg::Interval *I) {
|
inline Interval::succ_iterator succ_begin(Interval *I) {
|
||||||
return I->Successors.begin();
|
return I->Successors.begin();
|
||||||
}
|
}
|
||||||
inline cfg::Interval::succ_iterator succ_end(cfg::Interval *I) {
|
inline Interval::succ_iterator succ_end(Interval *I) {
|
||||||
return I->Successors.end();
|
return I->Successors.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
// pred_begin/pred_end - define methods so that Intervals may be used
|
// pred_begin/pred_end - define methods so that Intervals may be used
|
||||||
// just like BasicBlocks can with the pred_* functions, and *::pred_iterator.
|
// just like BasicBlocks can with the pred_* functions, and *::pred_iterator.
|
||||||
//
|
//
|
||||||
inline cfg::Interval::pred_iterator pred_begin(cfg::Interval *I) {
|
inline Interval::pred_iterator pred_begin(Interval *I) {
|
||||||
return I->Predecessors.begin();
|
return I->Predecessors.begin();
|
||||||
}
|
}
|
||||||
inline cfg::Interval::pred_iterator pred_end(cfg::Interval *I) {
|
inline Interval::pred_iterator pred_end(Interval *I) {
|
||||||
return I->Predecessors.end();
|
return I->Predecessors.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace cfg {
|
|
||||||
|
|
||||||
// getNodeHeader - Given a source graph node and the source graph, return the
|
// getNodeHeader - Given a source graph node and the source graph, return the
|
||||||
// BasicBlock that is the header node. This is the opposite of
|
// BasicBlock that is the header node. This is the opposite of
|
||||||
// getSourceGraphNode.
|
// getSourceGraphNode.
|
||||||
@ -248,6 +246,4 @@ inline interval_part_interval_iterator intervals_end(IntervalPartition &IP) {
|
|||||||
return interval_part_interval_iterator();
|
return interval_part_interval_iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End namespace cfg
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//===- IntervalPartition.h - Interval partition Calculation ------*- C++ -*--=//
|
//===- IntervalPartition.h - Interval partition Calculation ------*- C++ -*--=//
|
||||||
//
|
//
|
||||||
// This file contains the declaration of the cfg::IntervalPartition class, which
|
// This file contains the declaration of the IntervalPartition class, which
|
||||||
// calculates and represents the interval partition of a function, or a
|
// calculates and represents the interval partition of a function, or a
|
||||||
// preexisting interval partition.
|
// preexisting interval partition.
|
||||||
//
|
//
|
||||||
@ -19,8 +19,6 @@
|
|||||||
#include "llvm/Analysis/Interval.h"
|
#include "llvm/Analysis/Interval.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
|
|
||||||
namespace cfg {
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// IntervalPartition - This class builds and holds an "interval partition" for
|
// IntervalPartition - This class builds and holds an "interval partition" for
|
||||||
@ -93,6 +91,4 @@ private:
|
|||||||
void updatePredecessors(Interval *Int);
|
void updatePredecessors(Interval *Int);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End namespace cfg
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
namespace cfg {
|
|
||||||
class DominatorSet;
|
class DominatorSet;
|
||||||
class LoopInfo;
|
class LoopInfo;
|
||||||
|
|
||||||
@ -67,7 +66,7 @@ class LoopInfo : public FunctionPass {
|
|||||||
std::map<BasicBlock*, Loop*> BBMap;
|
std::map<BasicBlock*, Loop*> BBMap;
|
||||||
std::vector<Loop*> TopLevelLoops;
|
std::vector<Loop*> TopLevelLoops;
|
||||||
public:
|
public:
|
||||||
static AnalysisID ID; // cfg::LoopInfo Analysis ID
|
static AnalysisID ID; // LoopInfo Analysis ID
|
||||||
|
|
||||||
// LoopInfo ctor - Calculate the natural loop information for a CFG
|
// LoopInfo ctor - Calculate the natural loop information for a CFG
|
||||||
LoopInfo(AnalysisID id) { assert(id == ID); }
|
LoopInfo(AnalysisID id) { assert(id == ID); }
|
||||||
@ -117,6 +116,4 @@ private:
|
|||||||
Loop *ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS);
|
Loop *ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End namespace cfg
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
|
||||||
namespace cfg {
|
|
||||||
|
|
||||||
// This library provides support for printing out Intervals.
|
// This library provides support for printing out Intervals.
|
||||||
class Interval;
|
class Interval;
|
||||||
class IntervalPartition;
|
class IntervalPartition;
|
||||||
@ -69,8 +67,6 @@ namespace cfg {
|
|||||||
WriteToOutput(L, o); return o;
|
WriteToOutput(L, o); return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End namespace CFG
|
|
||||||
|
|
||||||
class InductionVariable;
|
class InductionVariable;
|
||||||
void WriteToOutput(const InductionVariable &, std::ostream &o);
|
void WriteToOutput(const InductionVariable &, std::ostream &o);
|
||||||
inline std::ostream &operator <<(std::ostream &o, const InductionVariable &IV) {
|
inline std::ostream &operator <<(std::ostream &o, const InductionVariable &IV) {
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
#define LLVM_OPT_INDUCTION_VARS_H
|
#define LLVM_OPT_INDUCTION_VARS_H
|
||||||
|
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
namespace cfg { class IntervalPartition; }
|
class IntervalPartition;
|
||||||
|
|
||||||
struct InductionVariableCannonicalize : public FunctionPass {
|
struct InductionVariableCannonicalize : public FunctionPass {
|
||||||
// doInductionVariableCannonicalize - Simplify induction variables in loops
|
// doInductionVariableCannonicalize - Simplify induction variables in loops
|
||||||
//
|
//
|
||||||
static bool doIt(Function *F, cfg::IntervalPartition &IP);
|
static bool doIt(Function *F, IntervalPartition &IP);
|
||||||
|
|
||||||
virtual bool runOnFunction(Function *F);
|
virtual bool runOnFunction(Function *F);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class MachineCodeForMethod;
|
|||||||
class MachineRegInfo;
|
class MachineRegInfo;
|
||||||
class FunctionLiveVarInfo;
|
class FunctionLiveVarInfo;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
namespace cfg { class LoopInfo; }
|
class LoopInfo;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Class AddedInstrns:
|
// Class AddedInstrns:
|
||||||
@ -79,13 +79,13 @@ class PhyRegAlloc: public NonCopyable {
|
|||||||
|
|
||||||
AddedInstrMapType AddedInstrMap; // to store instrns added in this phase
|
AddedInstrMapType AddedInstrMap; // to store instrns added in this phase
|
||||||
AddedInstrns AddedInstrAtEntry; // to store instrns added at entry
|
AddedInstrns AddedInstrAtEntry; // to store instrns added at entry
|
||||||
cfg::LoopInfo *LoopDepthCalc; // to calculate loop depths
|
LoopInfo *LoopDepthCalc; // to calculate loop depths
|
||||||
ReservedColorListType ResColList; // A set of reserved regs if desired.
|
ReservedColorListType ResColList; // A set of reserved regs if desired.
|
||||||
// currently not used
|
// currently not used
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PhyRegAlloc(Function *F, const TargetMachine& TM, FunctionLiveVarInfo *Lvi,
|
PhyRegAlloc(Function *F, const TargetMachine& TM, FunctionLiveVarInfo *Lvi,
|
||||||
cfg::LoopInfo *LoopDepthCalc);
|
LoopInfo *LoopDepthCalc);
|
||||||
~PhyRegAlloc();
|
~PhyRegAlloc();
|
||||||
|
|
||||||
// main method called for allocating registers
|
// main method called for allocating registers
|
||||||
|
@ -37,7 +37,7 @@ class MachineCodeForMethod;
|
|||||||
class MachineRegInfo;
|
class MachineRegInfo;
|
||||||
class FunctionLiveVarInfo;
|
class FunctionLiveVarInfo;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
namespace cfg { class LoopInfo; }
|
class LoopInfo;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Class AddedInstrns:
|
// Class AddedInstrns:
|
||||||
@ -79,13 +79,13 @@ class PhyRegAlloc: public NonCopyable {
|
|||||||
|
|
||||||
AddedInstrMapType AddedInstrMap; // to store instrns added in this phase
|
AddedInstrMapType AddedInstrMap; // to store instrns added in this phase
|
||||||
AddedInstrns AddedInstrAtEntry; // to store instrns added at entry
|
AddedInstrns AddedInstrAtEntry; // to store instrns added at entry
|
||||||
cfg::LoopInfo *LoopDepthCalc; // to calculate loop depths
|
LoopInfo *LoopDepthCalc; // to calculate loop depths
|
||||||
ReservedColorListType ResColList; // A set of reserved regs if desired.
|
ReservedColorListType ResColList; // A set of reserved regs if desired.
|
||||||
// currently not used
|
// currently not used
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PhyRegAlloc(Function *F, const TargetMachine& TM, FunctionLiveVarInfo *Lvi,
|
PhyRegAlloc(Function *F, const TargetMachine& TM, FunctionLiveVarInfo *Lvi,
|
||||||
cfg::LoopInfo *LoopDepthCalc);
|
LoopInfo *LoopDepthCalc);
|
||||||
~PhyRegAlloc();
|
~PhyRegAlloc();
|
||||||
|
|
||||||
// main method called for allocating registers
|
// main method called for allocating registers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user