summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-06-21 23:36:12 +0000
committerXinliang David Li <davidxl@google.com>2016-06-21 23:36:12 +0000
commitbc1570848fd279aff53d37c2da0ade99079526b0 (patch)
tree8ddceef606000bdd4b0d4d0d0c71bde3cbcef2b0 /llvm/lib/CodeGen
parent092386771dbebffbf1d2752cdaee4be577239e9b (diff)
downloadbcm5719-llvm-bc1570848fd279aff53d37c2da0ade99079526b0.tar.gz
bcm5719-llvm-bc1570848fd279aff53d37c2da0ade99079526b0.zip
Clang format change /NFC
llvm-svn: 273335
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp62
1 files changed, 27 insertions, 35 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
index 9119e31bdb3..d0c6261a478 100644
--- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
@@ -27,36 +27,30 @@ using namespace llvm;
#define DEBUG_TYPE "block-freq"
#ifndef NDEBUG
-enum GVDAGType {
- GVDT_None,
- GVDT_Fraction,
- GVDT_Integer
-};
-
-static cl::opt<GVDAGType>
-ViewMachineBlockFreqPropagationDAG("view-machine-block-freq-propagation-dags",
- cl::Hidden,
- cl::desc("Pop up a window to show a dag displaying how machine block "
- "frequencies propagate through the CFG."),
- cl::values(
- clEnumValN(GVDT_None, "none",
- "do not display graphs."),
- clEnumValN(GVDT_Fraction, "fraction", "display a graph using the "
- "fractional block frequency representation."),
- clEnumValN(GVDT_Integer, "integer", "display a graph using the raw "
- "integer fractional block frequency representation."),
- clEnumValEnd));
+enum GVDAGType { GVDT_None, GVDT_Fraction, GVDT_Integer };
+
+static cl::opt<GVDAGType> ViewMachineBlockFreqPropagationDAG(
+ "view-machine-block-freq-propagation-dags", cl::Hidden,
+ cl::desc("Pop up a window to show a dag displaying how machine block "
+ "frequencies propagate through the CFG."),
+ cl::values(clEnumValN(GVDT_None, "none", "do not display graphs."),
+ clEnumValN(GVDT_Fraction, "fraction",
+ "display a graph using the "
+ "fractional block frequency representation."),
+ clEnumValN(GVDT_Integer, "integer",
+ "display a graph using the raw "
+ "integer fractional block frequency representation."),
+ clEnumValEnd));
namespace llvm {
-template <>
-struct GraphTraits<MachineBlockFrequencyInfo *> {
+template <> struct GraphTraits<MachineBlockFrequencyInfo *> {
typedef const MachineBasicBlock NodeType;
typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
typedef MachineFunction::const_iterator nodes_iterator;
- static inline
- const NodeType *getEntryNode(const MachineBlockFrequencyInfo *G) {
+ static inline const NodeType *
+ getEntryNode(const MachineBlockFrequencyInfo *G) {
return &G->getFunction()->front();
}
@@ -77,11 +71,11 @@ struct GraphTraits<MachineBlockFrequencyInfo *> {
}
};
-template<>
-struct DOTGraphTraits<MachineBlockFrequencyInfo*> :
- public DefaultDOTGraphTraits {
- explicit DOTGraphTraits(bool isSimple=false) :
- DefaultDOTGraphTraits(isSimple) {}
+template <>
+struct DOTGraphTraits<MachineBlockFrequencyInfo *>
+ : public DefaultDOTGraphTraits {
+ explicit DOTGraphTraits(bool isSimple = false)
+ : DefaultDOTGraphTraits(isSimple) {}
static std::string getGraphName(const MachineBlockFrequencyInfo *G) {
return G->getFunction()->getName();
@@ -109,7 +103,6 @@ struct DOTGraphTraits<MachineBlockFrequencyInfo*> :
}
};
-
} // end namespace llvm
#endif
@@ -122,9 +115,8 @@ INITIALIZE_PASS_END(MachineBlockFrequencyInfo, "machine-block-freq",
char MachineBlockFrequencyInfo::ID = 0;
-
-MachineBlockFrequencyInfo::
-MachineBlockFrequencyInfo() :MachineFunctionPass(ID) {
+MachineBlockFrequencyInfo::MachineBlockFrequencyInfo()
+ : MachineFunctionPass(ID) {
initializeMachineBlockFrequencyInfoPass(*PassRegistry::getPassRegistry());
}
@@ -163,12 +155,12 @@ void MachineBlockFrequencyInfo::view() const {
"MachineBlockFrequencyDAGs");
#else
errs() << "MachineBlockFrequencyInfo::view is only available in debug builds "
- "on systems with Graphviz or gv!\n";
+ "on systems with Graphviz or gv!\n";
#endif // NDEBUG
}
-BlockFrequency MachineBlockFrequencyInfo::
-getBlockFreq(const MachineBasicBlock *MBB) const {
+BlockFrequency
+MachineBlockFrequencyInfo::getBlockFreq(const MachineBasicBlock *MBB) const {
return MBFI ? MBFI->getBlockFreq(MBB) : 0;
}
OpenPOWER on IntegriCloud