aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-14 17:21:12 +0000
committerDan Gohman <gohman@apple.com>2008-09-14 17:21:12 +0000
commit8dae138d06df9cecbee421ef645d0b74f9ac13d7 (patch)
tree2261c78107eccfa0aaa6762421bc268d6c7bd627 /lib/Analysis/ScalarEvolution.cpp
parente009180f2bbcf5edbe3b583936c37c4b3be2d082 (diff)
Fix WriteAsOperand to not emit a leading space character. Adjust
its callers to emit a space character before calling it when a space is needed. This fixes several spurious whitespace issues in ScalarEvolution's debug dumps. See the test changes for examples. This also fixes odd space-after-tab indentation in the output for switch statements, and changes calls from being printed like this: call void @foo( i32 %x ) to this: call void @foo(i32 %x) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 786212ed87..db9792e3b3 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -891,7 +891,7 @@ SCEVHandle ScalarEvolution::getAddExpr(std::vector<SCEVHandle> &Ops) {
// If we found some loop invariants, fold them into the recurrence.
if (!LIOps.empty()) {
- // NLI + LI + { Start,+,Step} --> NLI + { LI+Start,+,Step }
+ // NLI + LI + {Start,+,Step} --> NLI + {LI+Start,+,Step}
LIOps.push_back(AddRec->getStart());
std::vector<SCEVHandle> AddRecOps(AddRec->op_begin(), AddRec->op_end());
@@ -1039,7 +1039,7 @@ SCEVHandle ScalarEvolution::getMulExpr(std::vector<SCEVHandle> &Ops) {
// If we found some loop invariants, fold them into the recurrence.
if (!LIOps.empty()) {
- // NLI * LI * { Start,+,Step} --> NLI * { LI*Start,+,LI*Step }
+ // NLI * LI * {Start,+,Step} --> NLI * {LI*Start,+,LI*Step}
std::vector<SCEVHandle> NewOps;
NewOps.reserve(AddRec->getNumOperands());
if (LIOps.size() == 1) {
@@ -1155,7 +1155,7 @@ SCEVHandle ScalarEvolution::getAddRecExpr(std::vector<SCEVHandle> &Operands,
if (Operands.back()->isZero()) {
Operands.pop_back();
- return getAddRecExpr(Operands, L); // { X,+,0 } --> X
+ return getAddRecExpr(Operands, L); // {X,+,0} --> X
}
// Canonicalize nested AddRecs in by nesting them in order of loop depth.
@@ -3044,7 +3044,7 @@ void ScalarEvolution::print(std::ostream &OS, const Module* ) const {
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
if (I->getType()->isInteger()) {
OS << *I;
- OS << " --> ";
+ OS << " --> ";
SCEVHandle SV = getSCEV(&*I);
SV->print(OS);
OS << "\t\t";