diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-08-05 14:11:16 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-08-13 12:53:19 +0200 |
commit | 2fea3d1899eb8cc81920b631ea73a1f130674950 (patch) | |
tree | 5e115b5fa3597b96b21176578aa1f741c76163f2 /src/qml/jit | |
parent | d6a79aa6b06726d19d231d1da3ecb5b6509f0f1a (diff) |
V4 IR: change IR printing to be more readable.
New structure:
- "comments" now start with a semi-colon, and have a list of key: values.
; predecessors: L17 L26 L36, loop_header: yes
; line: 30, column: 3
- when a temporary has a known type, it is written in front of the
teporary when it is being assigned, and not repeated.
var %109 = this
double %42 = 42
- an expression starts with the operation, followed by the operands that
are separated by commas. The type of the operands is the type
mentioned when they are assigned.
int32 %115 = sub %184, %185
if gt %27, 0 goto L40 else goto L41
- conversions do mention the operand type in order to make them easier
to read.
double %178 = convert var to double %60
- phi node operands are prefixed by the from-label to make it easy to
match those operands with the from-block.
double %62 = phi L35: %58, L34: %61
- all names except for "this" and built-ins are prefixed by a dot in
order to make it clear that a lookup will occur, just like member
accesses.
$6 = call .int2char($0)
%7 = this
%8 = %7.toString()
Change-Id: I9f626a91f97ca7c3f27e01a5539f3c4fc10a46b4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jit')
-rw-r--r-- | src/qml/jit/qv4regalloc.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index 588b6d9707..0639c5361f 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -85,15 +85,7 @@ public: protected: void addStmtNr(Stmt *s) { - QString posStr; - int pos = intervals->positionForStatement(s); - if (pos != Stmt::InvalidId) - posStr = QString::number(pos); - *out << posStr.rightJustified(positionSize); - if (pos == Stmt::InvalidId) - *out << " "; - else - *out << ": "; + addJustifiedNr(intervals->positionForStatement(s)); } }; @@ -126,9 +118,7 @@ protected: const RegisterInfo *ri = e->type == DoubleType ? _infoForFPRegister.value(e->index, 0) : _infoForRegularRegister.value(e->index, 0); if (ri) { - *out << dumpStart(e); *out << ri->prettyName(); - *out << dumpEnd(e); break; } } |