Tim Armstrong has posted comments on this change.

Change subject: Strip global constructors and destructors from codegen module
......................................................................


Patch Set 3:

Yeah I don't think there's any point where the destructors could be 
automatically removed. We do dead code elimination on the module, but any 
functions global ctors/dtors lists were treated as a live entry point as far as 
I could tell, since you could run them explicitly with 
runStaticConstructorsDestructors(). 

Removing them lets it eliminate all of the code associated with them.

It's possible the boost exceptions don't work properly without being 
initialised by the constructors/destructors, but there were other problems with 
that too. There is also an ios_base::Init() constructor that does lazy 
initialisation of the I/O streams stuff. Not running that could be problematic 
if I/O streams weren't used anywhere else in the process and were used 
uninitialized by codegen'd code, but that hasn't (and shouldn't be) a problem 
in practice.

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

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

Reply via email to