[llvm] r270980 - [hexagon] Move BlockRanges and RDF stuff into the llvm namespace.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 03:06:41 PDT 2016
Author: d0k
Date: Fri May 27 05:06:40 2016
New Revision: 270980
URL: http://llvm.org/viewvc/llvm-project?rev=270980&view=rev
Log:
[hexagon] Move BlockRanges and RDF stuff into the llvm namespace.
No functional change intended.
Modified:
llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp
llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.h
llvm/trunk/lib/Target/Hexagon/HexagonRDF.h
llvm/trunk/lib/Target/Hexagon/RDFCopy.cpp
llvm/trunk/lib/Target/Hexagon/RDFCopy.h
llvm/trunk/lib/Target/Hexagon/RDFDeadCode.h
llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
llvm/trunk/lib/Target/Hexagon/RDFGraph.h
llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp
llvm/trunk/lib/Target/Hexagon/RDFLiveness.h
Modified: llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.cpp Fri May 27 05:06:40 2016
@@ -437,8 +437,8 @@ HexagonBlockRanges::RegToRangeMap Hexago
return DeadMap;
}
-
-raw_ostream &operator<< (raw_ostream &OS, HexagonBlockRanges::IndexType Idx) {
+raw_ostream &llvm::operator<<(raw_ostream &OS,
+ HexagonBlockRanges::IndexType Idx) {
if (Idx == HexagonBlockRanges::IndexType::None)
return OS << '-';
if (Idx == HexagonBlockRanges::IndexType::Entry)
@@ -449,23 +449,23 @@ raw_ostream &operator<< (raw_ostream &OS
}
// A mapping to translate between instructions and their indices.
-raw_ostream &operator<< (raw_ostream &OS,
- const HexagonBlockRanges::IndexRange &IR) {
+raw_ostream &llvm::operator<<(raw_ostream &OS,
+ const HexagonBlockRanges::IndexRange &IR) {
OS << '[' << IR.start() << ':' << IR.end() << (IR.TiedEnd ? '}' : ']');
if (IR.Fixed)
OS << '!';
return OS;
}
-raw_ostream &operator<< (raw_ostream &OS,
- const HexagonBlockRanges::RangeList &RL) {
+raw_ostream &llvm::operator<<(raw_ostream &OS,
+ const HexagonBlockRanges::RangeList &RL) {
for (auto &R : RL)
OS << R << " ";
return OS;
}
-raw_ostream &operator<< (raw_ostream &OS,
- const HexagonBlockRanges::InstrIndexMap &M) {
+raw_ostream &llvm::operator<<(raw_ostream &OS,
+ const HexagonBlockRanges::InstrIndexMap &M) {
for (auto &In : M.Block) {
HexagonBlockRanges::IndexType Idx = M.getIndex(&In);
OS << Idx << (Idx == M.Last ? ". " : " ") << In;
@@ -473,8 +473,8 @@ raw_ostream &operator<< (raw_ostream &OS
return OS;
}
-raw_ostream &operator<< (raw_ostream &OS,
- const HexagonBlockRanges::PrintRangeMap &P) {
+raw_ostream &llvm::operator<<(raw_ostream &OS,
+ const HexagonBlockRanges::PrintRangeMap &P) {
for (auto &I : P.Map) {
const HexagonBlockRanges::RangeList &RL = I.second;
OS << PrintReg(I.first.Reg, &P.TRI, I.first.Sub) << " -> " << RL << "\n";
Modified: llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.h?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.h (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonBlockRanges.h Fri May 27 05:06:40 2016
@@ -28,9 +28,6 @@ namespace llvm {
class TargetRegisterClass;
class TargetRegisterInfo;
class Type;
-}
-
-using namespace llvm;
struct HexagonBlockRanges {
HexagonBlockRanges(MachineFunction &MF);
@@ -237,4 +234,6 @@ raw_ostream &operator<< (raw_ostream &OS
raw_ostream &operator<< (raw_ostream &OS,
const HexagonBlockRanges::PrintRangeMap &P);
+} // namespace llvm
+
#endif
Modified: llvm/trunk/lib/Target/Hexagon/HexagonRDF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonRDF.h?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonRDF.h (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonRDF.h Fri May 27 05:06:40 2016
@@ -13,7 +13,6 @@
namespace llvm {
class TargetRegisterInfo;
-}
namespace rdf {
struct HexagonRegisterAliasInfo : public RegisterAliasInfo {
@@ -22,7 +21,8 @@ namespace rdf {
bool covers(RegisterRef RA, RegisterRef RR) const override;
bool covers(const RegisterSet &RRs, RegisterRef RR) const override;
};
-}
+} // namespace rdf
+} // namespace llvm
#endif
Modified: llvm/trunk/lib/Target/Hexagon/RDFCopy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFCopy.cpp?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFCopy.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFCopy.cpp Fri May 27 05:06:40 2016
@@ -18,15 +18,14 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetRegisterInfo.h"
+using namespace llvm;
+using namespace rdf;
#ifndef NDEBUG
static cl::opt<unsigned> CpLimit("rdf-cp-limit", cl::init(0), cl::Hidden);
static unsigned CpCount = 0;
#endif
-using namespace llvm;
-using namespace rdf;
-
bool CopyPropagation::interpretAsCopy(const MachineInstr *MI, EqualityMap &EM) {
unsigned Opc = MI->getOpcode();
switch (Opc) {
Modified: llvm/trunk/lib/Target/Hexagon/RDFCopy.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFCopy.h?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFCopy.h (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFCopy.h Fri May 27 05:06:40 2016
@@ -18,7 +18,6 @@ namespace llvm {
class MachineBasicBlock;
class MachineDominatorTree;
class MachineInstr;
-}
namespace rdf {
struct CopyPropagation {
@@ -49,6 +48,7 @@ namespace rdf {
void updateMap(NodeAddr<InstrNode*> IA);
bool scanBlock(MachineBasicBlock *B);
};
-}
+} // namespace rdf
+} // namespace llvm
#endif
Modified: llvm/trunk/lib/Target/Hexagon/RDFDeadCode.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFDeadCode.h?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFDeadCode.h (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFDeadCode.h Fri May 27 05:06:40 2016
@@ -30,7 +30,6 @@
namespace llvm {
class MachineRegisterInfo;
-}
namespace rdf {
struct DeadCodeElimination {
@@ -62,6 +61,7 @@ namespace rdf {
void processDef(NodeAddr<DefNode*> DA, SetQueue<NodeId> &WorkQ);
void processUse(NodeAddr<UseNode*> UA, SetQueue<NodeId> &WorkQ);
};
-}
+} // namespace rdf
+} // namespace llvm
#endif
Modified: llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFGraph.cpp Fri May 27 05:06:40 2016
@@ -25,6 +25,7 @@ using namespace rdf;
// Printing functions. Have them here first, so that the rest of the code
// can use them.
+namespace llvm {
namespace rdf {
template<>
@@ -298,6 +299,7 @@ raw_ostream &operator<< (raw_ostream &OS
}
} // namespace rdf
+} // namespace llvm
// Node allocation functions.
//
Modified: llvm/trunk/lib/Target/Hexagon/RDFGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFGraph.h?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFGraph.h (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFGraph.h Fri May 27 05:06:40 2016
@@ -212,8 +212,6 @@
#include <set>
#include <vector>
-using namespace llvm;
-
namespace llvm {
class MachineBasicBlock;
class MachineFunction;
@@ -223,7 +221,6 @@ namespace llvm {
class MachineDominatorTree;
class TargetInstrInfo;
class TargetRegisterInfo;
-}
namespace rdf {
typedef uint32_t NodeId;
@@ -858,5 +855,6 @@ namespace rdf {
: Print<NodeAddr<T>>(x, g) {}
};
} // namespace rdf
+} // namespace llvm
#endif // RDF_GRAPH_H
Modified: llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp Fri May 27 05:06:40 2016
@@ -36,6 +36,7 @@
using namespace llvm;
using namespace rdf;
+namespace llvm {
namespace rdf {
template<>
raw_ostream &operator<< (raw_ostream &OS, const Print<Liveness::RefMap> &P) {
@@ -52,7 +53,8 @@ namespace rdf {
OS << " }";
return OS;
}
-}
+} // namespace rdf
+} // namespace llvm
// The order in the returned sequence is the order of reaching defs in the
// upward traversal: the first def is the closest to the given reference RefA,
Modified: llvm/trunk/lib/Target/Hexagon/RDFLiveness.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/RDFLiveness.h?rev=270980&r1=270979&r2=270980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/RDFLiveness.h (original)
+++ llvm/trunk/lib/Target/Hexagon/RDFLiveness.h Fri May 27 05:06:40 2016
@@ -26,7 +26,6 @@ namespace llvm {
class TargetRegisterInfo;
class MachineDominatorTree;
class MachineDominanceFrontier;
-}
namespace rdf {
struct Liveness {
@@ -105,6 +104,7 @@ namespace rdf {
void traverse(MachineBasicBlock *B, RefMap &LiveIn);
void emptify(RefMap &M);
};
-}
+} // namespace rdf
+} // namespace llvm
#endif // RDF_LIVENESS_H
More information about the llvm-commits
mailing list