OSDN Git Service

Subzero: Improve non-MINIMAL string performance.
authorJim Stichnoth <stichnot@chromium.org>
Tue, 5 Apr 2016 22:31:43 +0000 (15:31 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Tue, 5 Apr 2016 22:31:43 +0000 (15:31 -0700)
commita91c34118294efbf08ebd11eed96fce83bf35f3c
tree5acb8f15f42f9eaacdb8e5fcfa66df036fc51ef0
parent030772114216c1a57c749050bb58d07de8ceaa7c
Subzero: Improve non-MINIMAL string performance.

In a DUMP-enabled build, such as the standard Release+Asserts build, translator performance has regressed as a result of 467ffe51bebcb3ae3e3ce745c38fc20e8837c31c (https://codereview.chromium.org/1838753002).

This is because Variable and CfgNode names are being instantiated unconditionally, rather than on-demand.

This CL restores most of that performance by going back to being on-demand.  Note that it should have no effect on MINIMAL build performance.

Also, it turns out that Variable::getName() does not really need the Cfg* parameter, so that is removed (and all its callers are fixed transitively).

In addition, Variable and CfgNode are made more uniform with respect to each other in terms of inline definitions of the ctor, getName(), and setName().

BUG= none
R=jpp@chromium.org, kschimpf@google.com

Review URL: https://codereview.chromium.org/1866463002 .
src/IceCfg.cpp
src/IceCfgNode.cpp
src/IceCfgNode.h
src/IceInst.cpp
src/IceOperand.cpp
src/IceOperand.h
src/IceRegAlloc.cpp
src/IceTargetLoweringARM32.cpp
src/IceTargetLoweringMIPS32.cpp
src/IceTargetLoweringX86BaseImpl.h