Michael Ho has uploaded a new patch set (#2). Change subject: IMPALA-3115: Hoist some variables out of loops in cross-compiled code. ......................................................................
IMPALA-3115: Hoist some variables out of loops in cross-compiled code. This change adds the compiler hint __restrict__ to indicate that input arguments of some cross-compiled functions have no aliases. This allows the compiler to hoist some variables such as loop bounds (e.g out_batch->num_rows()) out of the loop. In addition, this change introduces an iterator interface for RowBatch to avoid the multiplication inside loops when RowBatch::GetRow() is called. Apparently, specifying the no alias hint isn't sufficient for clang to hoist the multiplication out of the loop. The hoisting was confirmed to occur via manual inspection of the generated IR. With this change, some queries in targeted perf such as PERF_AGG-Q4 has more than 10% improvement on avearge. TARGETED_PERF(15) and TPCH_NESTED(300) shows about 1% improvement. Change-Id: Ic7152b1fb094b3c3574d203e3774f4297f2225dc --- M be/src/exec/hash-table.cc M be/src/exec/hash-table.h M be/src/exec/hash-table.inline.h M be/src/exec/partitioned-aggregation-node-ir.cc M be/src/exec/partitioned-aggregation-node.cc M be/src/exec/partitioned-aggregation-node.h M be/src/exec/partitioned-hash-join-node-ir.cc M be/src/exec/partitioned-hash-join-node.cc M be/src/exec/partitioned-hash-join-node.h M be/src/runtime/row-batch.h M be/src/runtime/tuple-row.h 11 files changed, 129 insertions(+), 81 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/61/2661/2 -- To view, visit http://gerrit.cloudera.org:8080/2661 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic7152b1fb094b3c3574d203e3774f4297f2225dc Gerrit-PatchSet: 2 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Michael Ho <k...@cloudera.com>