summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IntervalPartition.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-07-24 23:16:33 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-07-24 23:16:33 +0000
commit48666a694c7ba4f230a4c2ad8ca3be3084c32f47 (patch)
treef4c61f820cced8f90ba29ebe2c403782d9a85df8 /llvm/lib/Analysis/IntervalPartition.cpp
parent1d70d75f468c2df944dffe48aa4efe22716156f9 (diff)
downloadbcm5719-llvm-48666a694c7ba4f230a4c2ad8ca3be3084c32f47.tar.gz
bcm5719-llvm-48666a694c7ba4f230a4c2ad8ca3be3084c32f47.zip
[Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 308936
Diffstat (limited to 'llvm/lib/Analysis/IntervalPartition.cpp')
-rw-r--r--llvm/lib/Analysis/IntervalPartition.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/IntervalPartition.cpp b/llvm/lib/Analysis/IntervalPartition.cpp
index a4e56e0694b..c777d91b67c 100644
--- a/llvm/lib/Analysis/IntervalPartition.cpp
+++ b/llvm/lib/Analysis/IntervalPartition.cpp
@@ -12,10 +12,17 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/Analysis/IntervalPartition.h"
+#include "llvm/Analysis/Interval.h"
#include "llvm/Analysis/IntervalIterator.h"
+#include "llvm/Pass.h"
+#include <cassert>
+#include <utility>
+
using namespace llvm;
char IntervalPartition::ID = 0;
+
INITIALIZE_PASS(IntervalPartition, "intervals",
"Interval Partition Construction", true, true)
@@ -40,7 +47,6 @@ void IntervalPartition::print(raw_ostream &O, const Module*) const {
// addIntervalToPartition - Add an interval to the internal list of intervals,
// and then add mappings from all of the basic blocks in the interval to the
// interval itself (in the IntervalMap).
-//
void IntervalPartition::addIntervalToPartition(Interval *I) {
Intervals.push_back(I);
@@ -54,7 +60,6 @@ void IntervalPartition::addIntervalToPartition(Interval *I) {
// the interval data structures. After interval generation is complete,
// run through all of the intervals and propagate successor info as
// predecessor info.
-//
void IntervalPartition::updatePredecessors(Interval *Int) {
BasicBlock *Header = Int->getHeaderNode();
for (BasicBlock *Successor : Int->Successors)
@@ -63,7 +68,6 @@ void IntervalPartition::updatePredecessors(Interval *Int) {
// IntervalPartition ctor - Build the first level interval partition for the
// specified function...
-//
bool IntervalPartition::runOnFunction(Function &F) {
// Pass false to intervals_begin because we take ownership of it's memory
function_interval_iterator I = intervals_begin(&F, false);
@@ -84,11 +88,9 @@ bool IntervalPartition::runOnFunction(Function &F) {
return false;
}
-
// IntervalPartition ctor - Build a reduced interval partition from an
// existing interval graph. This takes an additional boolean parameter to
// distinguish it from a copy constructor. Always pass in false for now.
-//
IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
: FunctionPass(ID) {
assert(IP.getRootInterval() && "Cannot operate on empty IntervalPartitions!");
@@ -110,4 +112,3 @@ IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
for (unsigned i = 0, e = Intervals.size(); i != e; ++i)
updatePredecessors(Intervals[i]);
}
-
OpenPOWER on IntegriCloud