impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4929: Safe concurrent access to IR function call graph
Date Thu, 09 Mar 2017 20:24:53 GMT
Michael Ho has posted comments on this change.

Change subject: IMPALA-4929: Safe concurrent access to IR function call graph

Patch Set 1:

File be/src/codegen/

Line 27: using namespace strings;
> You can use common/names.h instead of the string and unordered_* usings.

Line 35:   Status status =
> Can combine this with the below line.
Too long after converting to nullptr.

PS1, Line 71: boost::
> I believe this creates two unordered_sets (the Lvalue and Rvalue), then cop

Line 87:         call_graph_[key].insert(fn_name);
> I think we can use find(key)->insert here, since we don't really want the b
The entry may not exist already. Note the entry creation above is for 'fn_name'. Auto-creating
entries here is fine as we are constructing the map. We just don't want this to happen after
File be/src/codegen/codegen-callgraph.h:

Line 21: #include <boost/unordered_map.hpp>
> Use std::unordered_set and _map when possible
Good point but it appears that two closely related files and are
already using boost::unordered_* so I'd avoid mixing both to avoid confusion or to further
extend the scope of this change. We should clean up all these places in one shot instead.

Line 29: class CodegenCallGraph {
> One line class comment?

PS1, Line 39: inline
> I believe "inline" is implied for all methods defined in the class body: 

Line 43:     if (LIKELY(iter != call_graph_.end())) {
> Consider using  ? : to make this a one-liner

PS1, Line 46: NULL
> nullptr?

PS1, Line 51: inline
> unnecessary inline

Line 71:   /// and return them in 'users'.
> "append them to 'users'", to make it clear that it doesn't clear existing c
File be/src/codegen/

PS1, Line 290: NULL
> nit: we've mostly standardised on nullptr

PS1, Line 594: (*callees)
> nit: unnecessary parens

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I1acd6bad80341121c8189d817e0fe62f2862f28a
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message