Tim Armstrong has posted comments on this change. Change subject: IMPALA-3906: Materialize implicitly referenced IR functions ......................................................................
Patch Set 1: (8 comments) http://gerrit.cloudera.org:8080/#/c/3740/1/be/src/codegen/llvm-codegen.cc File be/src/codegen/llvm-codegen.cc: Line 106: bool LlvmCodeGen::IsDefinedInImpalad(const Function* fn) { Maybe the argument should just be the function name? Line 109: Status status = LibCache::instance()->GetSoFunctionPtr("", fn_name, &fn_ptr, NULL, true); Long line. PS1, Line 122: dyn_cast I think you want cast<> instead of dyn_cast<> here and below since you don't want a NULL back if the types dont' match. Line 138: } else if (isa<ConstantVector>(val) || isa<ConstantDataVector>(val)) { Maybe DCHECK that this is true? I think we want to know if another type of GlobalValue crops up in our cross-compiled IR. Line 147: Function* fn = fn_list[i]; I don't think we need the index, so we can simplify to: for (Function* fn: fn_list) { } Line 328: for (int i = 0; i < fn_names.size(); ++i) { for (const string& fn_name: fn_names) { Line 372: codegen->MaterializeFunction(&fn); Do you have an idea of how many additional functions we're materialising? Is there a noticeable overhead? http://gerrit.cloudera.org:8080/#/c/3740/1/be/src/codegen/llvm-codegen.h File be/src/codegen/llvm-codegen.h: PS1, Line 550: set unordered_set? I believe std::set is a balanced binary tree that isn't very efficient for this purpose. -- To view, visit http://gerrit.cloudera.org:8080/3740 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3653f55a1aa063b21cb3a5040f502b4c0ecf82e8 Gerrit-PatchSet: 1 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Michael Ho <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
