diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-08-19 11:33:22 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-08-23 09:04:38 +0000 |
commit | 34c82d54b70409202b36c8ec51442fa56014ba8a (patch) | |
tree | 47f278cb94f32c46634f5843431057e9195da8fc /src/qml/jit/qv4isel_masm_p.h | |
parent | fd57e1449dc974417f3409a4da7338d7e8a6e7c8 (diff) |
V4: Replace a QSet with a QVector in calculateOptionalJumps
Instead of storing a bunch of statement IDs in a QSet, the parent basic
block of the terminator statement (specifically: the jump) is used as
an index into a bit vector. If the bit is set, this indicates that the
jump can be omitted.
This reduces the number of allocations from 1 hash node per optional
jump, to 1 per function. The allocation will also be smaller then a
hash node.
Change-Id: Ia34468534b96dd9cefa837523bf89ad233de92e8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jit/qv4isel_masm_p.h')
-rw-r--r-- | src/qml/jit/qv4isel_masm_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h index 5bca879a77..0e909820e7 100644 --- a/src/qml/jit/qv4isel_masm_p.h +++ b/src/qml/jit/qv4isel_masm_p.h @@ -54,6 +54,7 @@ #include "private/qv4jsir_p.h" #include "private/qv4isel_p.h" #include "private/qv4isel_util_p.h" +#include "private/qv4util_p.h" #include "private/qv4value_p.h" #include "private/qv4lookup_p.h" @@ -272,7 +273,7 @@ private: } IR::BasicBlock *_block; - QSet<IR::Jump *> _removableJumps; + BitVector _removableJumps; Assembler* _as; QScopedPointer<CompilationUnit> compilationUnit; |