V4 SSA: remove unused code.
authorErik Verbruggen <erik.verbruggen@digia.com>
Fri, 7 Mar 2014 13:08:40 +0000 (14:08 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 8 Mar 2014 10:44:03 +0000 (11:44 +0100)
Change-Id: I56b3e5400e7b9880b9534117ac17a80436ff1733
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qv4ssa.cpp

index 847df6e..85f1677 100644 (file)
 #include <cassert>
 #include <algorithm>
 
-#ifdef CONST
-#undef CONST
-#endif
-
-#define QV4_NO_LIVENESS
 #undef SHOW_SSA
 #undef DEBUG_MOVEMAPPING
 
@@ -145,9 +140,6 @@ void showMeTheCode(IR::Function *function)
                 qout << endl;
             }
             Stmt *n = (i + 1) < code.size() ? code.at(i + 1) : 0;
-//            if (n && s->asJump() && s->asJump()->target == leader.value(n)) {
-//                continue;
-//            }
 
             QByteArray str;
             QBuffer buf(&str);
@@ -165,50 +157,10 @@ void showMeTheCode(IR::Function *function)
 
             out.flush();
 
-#ifndef QV4_NO_LIVENESS
-            for (int i = 60 - str.size(); i >= 0; --i)
-                str.append(' ');
-
             qout << "    " << str;
-
-            //        if (! s->uses.isEmpty()) {
-            //            qout << " // uses:";
-            //            foreach (unsigned use, s->uses) {
-            //                qout << " %" << use;
-            //            }
-            //        }
-
-            //        if (! s->defs.isEmpty()) {
-            //            qout << " // defs:";
-            //            foreach (unsigned def, s->defs) {
-            //                qout << " %" << def;
-            //            }
-            //        }
-
-#  if 0
-            if (! s->d->liveIn.isEmpty()) {
-                qout << " // lives in:";
-                for (int i = 0; i < s->d->liveIn.size(); ++i) {
-                    if (s->d->liveIn.testBit(i))
-                        qout << " %" << i;
-                }
-            }
-#  else
-            if (! s->d->liveOut.isEmpty()) {
-                qout << " // lives out:";
-                for (int i = 0; i < s->d->liveOut.size(); ++i) {
-                    if (s->d->liveOut.testBit(i))
-                        qout << " %" << i;
-                }
-            }
-#  endif
-#else
-            qout << "    " << str;
-#endif
-
             qout << endl;
 
-            if (n && s->asCJump() /*&& s->asCJump()->iffalse != leader.value(n)*/) {
+            if (n && s->asCJump()) {
                 qout << "    else goto L" << s->asCJump()->iffalse->index << ";" << endl;
             }
         }