impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Reduce LLVM module's preparation time by lazily creating the IRFunction::Type to LLVM::Function* mappings.
Date Wed, 12 Oct 2016 04:22:19 GMT
Tim Armstrong has posted comments on this change.

Change subject: Reduce LLVM module's preparation time by lazily creating the IRFunction::Type
to LLVM::Function* mappings.
......................................................................


Patch Set 1:

(5 comments)

I didn't realise that we spent so much time doing this. Change looks good, just could be cleaned
up.

http://gerrit.cloudera.org:8080/#/c/4691/1/be/src/codegen/gen_ir_descriptions.py
File be/src/codegen/gen_ir_descriptions.py:

Line 104:   ["HASH_CRC", "IrCrcHash"],
It's weird (but harmless, I guess) that we don't use C++ mangling for these.


http://gerrit.cloudera.org:8080/#/c/4691/1/be/src/codegen/llvm-codegen.cc
File be/src/codegen/llvm-codegen.cc:

Line 206:   for (int i = IRFunction::FN_START; i < IRFunction::FN_END; ++i) {
Maybe should be a new function like ValidateFunctionMappings()?


Line 209:     if (init_codegen->module_->getFunction(fn_name) == NULL) {
We shouldn't hit this unless we messed up the build or the function names right? Could just
be a DCHECK.


PS1, Line 407: StringRef
Should be able to construct the StringRef from the std::string directly without c_str(). It
should be automatically converted I think if you just have getFunction(fn_name). We do this
in LinkModule() - it works because of http://en.cppreference.com/w/cpp/language/converting_constructor


Line 668:     StringRef fn_name(FN_MAPPINGS[ir_type].fn_name.c_str());
This conversion shouldn't be necessary either.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I61ab9fa8cca5a0909bb716c3c62819da3e3b3041
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <kwho@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message