Page MenuHomePhabricator

CodeGen: Reduce LValue and CallArgList memory footprint before recommitting r326946

Authored by yaxunl on Mar 13 2018, 12:54 PM.



Recent change r326946 ( causes regression in Eigen due to increased
memory footprint of CallArg.

This patch reduces LValue size from 112 to 96 bytes and reduces inline argument count of CallArgList
from 16 to 8.

It has been verified that this will let the added deep AST tree test pass with r326946.

In the long run, CallArg or LValue memory footprint should be further optimized.

Diff Detail

rC Clang

Event Timeline

yaxunl created this revision.Mar 13 2018, 12:54 PM
rjmccall added inline comments.Mar 13 2018, 12:58 PM

Please saturate Alignment here instead of allowing it to be truncated: that is, if the passed-in alignment is greater than (1U << 31), please store (1U << 31).

yaxunl updated this revision to Diff 138252.Mar 13 2018, 1:12 PM
yaxunl marked an inline comment as done.

Saturate alignment when it is too large.

rjmccall accepted this revision.Mar 13 2018, 1:38 PM

Thank you. LGTM.

This revision is now accepted and ready to land.Mar 13 2018, 1:38 PM
This revision was automatically updated to reflect the committed changes.

I have to remove the lit test since it causes failure on atom

It seems when the lit test is running on atom, it is compiled with default CPU for x86_64, therefor atom is not defined and there is no way to detect the test is running on atom system.

Yeah, I think the test is probably a bit abusive to run unconditionally for all hosts. We can just know that we improved things, and if we regress, it will break them again.