Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3115: Hoist some variables out of loops in 
cross-compiled code.
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/2661/4/be/src/exec/partitioned-aggregation-node-ir.cc
File be/src/exec/partitioned-aggregation-node-ir.cc:

Line 27: __restrict__
> if __restrict__ isn't helping the compiler do the reduction of multiplicati
It helps it hoist out the load for batch->num_rows_ and 
batch->num_tuples_per_row_ amongst other things.

We build with -fno-strict-aliasing in gcc but not clang. The LLVM type-based 
aliasing model is to get the frontend to insert the necessary information about 
what loads/stores can/can't alias. If there's no information it's conservative. 
With the cross-compiled code we mix in IRbuilder code with clang-generated 
code. The IRbuilder code has no TBAA info for any pointer operations it does so 
it has to conservatively assume any pointers from the IRBuilder code can alias 
any other pointers.


-- 
To view, visit http://gerrit.cloudera.org:8080/2661
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7152b1fb094b3c3574d203e3774f4297f2225dc
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Michael Ho <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to