summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IVUsers.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-09 02:29:41 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-09 02:29:41 +0000
commitd48cdbf0c3ee31bcac2d8304da2ee5dc16c35056 (patch)
treedcf560bf8299807196709ba4ce63e3e7d1477f01 /llvm/lib/Analysis/IVUsers.cpp
parentd9bd4ae77be31aa707e91209a610a7e119362dc0 (diff)
downloadbcm5719-llvm-d48cdbf0c3ee31bcac2d8304da2ee5dc16c35056.tar.gz
bcm5719-llvm-d48cdbf0c3ee31bcac2d8304da2ee5dc16c35056.zip
Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. llvm-svn: 198836
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
-rw-r--r--llvm/lib/Analysis/IVUsers.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp
index 9a8ff2235cd..f56196f7ff5 100644
--- a/llvm/lib/Analysis/IVUsers.cpp
+++ b/llvm/lib/Analysis/IVUsers.cpp
@@ -24,7 +24,6 @@
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
-#include "llvm/IR/Writer.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
@@ -248,7 +247,7 @@ bool IVUsers::runOnLoop(Loop *l, LPPassManager &LPM) {
void IVUsers::print(raw_ostream &OS, const Module *M) const {
OS << "IV Users for loop ";
- WriteAsOperand(OS, L->getHeader(), false);
+ L->getHeader()->printAsOperand(OS, false);
if (SE->hasLoopInvariantBackedgeTakenCount(L)) {
OS << " with backedge-taken count "
<< *SE->getBackedgeTakenCount(L);
@@ -258,13 +257,13 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
for (ilist<IVStrideUse>::const_iterator UI = IVUses.begin(),
E = IVUses.end(); UI != E; ++UI) {
OS << " ";
- WriteAsOperand(OS, UI->getOperandValToReplace(), false);
+ UI->getOperandValToReplace()->printAsOperand(OS, false);
OS << " = " << *getReplacementExpr(*UI);
for (PostIncLoopSet::const_iterator
I = UI->PostIncLoops.begin(),
E = UI->PostIncLoops.end(); I != E; ++I) {
OS << " (post-inc with loop ";
- WriteAsOperand(OS, (*I)->getHeader(), false);
+ (*I)->getHeader()->printAsOperand(OS, false);
OS << ")";
}
OS << " in ";
OpenPOWER on IntegriCloud