[cfe-commits] r143922 - in /cfe/trunk: include/clang/AST/APValue.h lib/AST/APValue.cpp lib/AST/ExprConstant.cpp lib/CodeGen/CGExprConstant.cpp test/SemaCXX/constant-expression-cxx11.cpp

Richard Smith richard at metafoo.co.uk
Wed Nov 9 20:31:02 PST 2011


On Thu, November 10, 2011 04:04, Eli Friedman wrote:
> On Wed, Nov 9, 2011 at 7:34 PM, Richard Smith <richard at metafoo.co.uk> wrote:
>> On Thu, November 10, 2011 01:11, Eli Friedman wrote:
>>> On Mon, Nov 7, 2011 at 1:22 AM, Richard Smith
>>> <richard-llvm at metafoo.co.uk> wrote:
>>>> Author: rsmith
>>>> Date: Mon Nov  7 03:22:26 2011
>>>> New Revision: 143922
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=143922&view=rev
>>>> Log:
>>>> Constant expression evaluation: support for arrays.
>>>>
>>>> Modified:
>>>>    cfe/trunk/include/clang/AST/APValue.h
>>>>    cfe/trunk/lib/AST/APValue.cpp
>>>>    cfe/trunk/lib/AST/ExprConstant.cpp
>>>>    cfe/trunk/lib/CodeGen/CGExprConstant.cpp
>>>>    cfe/trunk/test/SemaCXX/constant-expression-cxx11.cpp
>>>
>>> This commit appears to have caused a large compile-time regression on
>>> MultiSource/Benchmarks/Trimaran/netbench-crc.  Please investigate.
>>>
>>
>> Hi Eli,
>>
>> r144260 should remove the issue in the short term. This test contains two
>> large arrays whose initializers we can now evaluate, and the in-memory
>> representation of such arrays is currently quite wasteful in cases like
>> this. My current plan is to get all the functionality in place before
>> reworking the representation, though I do have a concrete plan for that
>> rework, and could bring that forward if there is a pressing need.
>
> Okay; can you just leave r144260 in until you're finished with that
> new representation? :)

Absolutely :) There are still potential manifestations of this problem
possible, but I believe they can only be triggered in code which contains the
'constexpr' specifier.

>> How large a regression are you
>> seeing? The performance difference was quite modest on the machines we
>> tested with here.
>
> We measured a difference on the order of 10%.  Not huge, but
> definitely large enough to be worth worrying about.

OK, I was a little worried there might be some pathological machine-specific
difference, but that's at least in the same ballpark as what we were seeing.

Thanks for bringing this to my attention!
Richard




More information about the cfe-commits mailing list