[llvm-dev] Output step count for constant expression

Hiroshi Yamauchi via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 25 08:34:02 PST 2019


You might want to also ask on cfe-dev at lists.llvm.org as it sounds related
to Clang.


On Sat, Nov 23, 2019 at 4:36 AM Nikita via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> I have a function which exceeds default constexpr step limit of clang. I
> would like to optimize that function, but it is very hard to see whether
> or not the changes I've made do in fact reduce number of steps per
> evaluation. I have not found how to see that number for a specific
> expression, and wanted to see if it is possible to add that feature. It
> could be a diagnostic, or just a file output.
>
> I've looked a little at ExprConstant.cpp in AST, but there is a lot
> going on in that file. I've found StepsLeft variable, which tracks how
> many steps has been executed already, but I'm struggling to understand
> where constexpr execution begins and ends, and how to output the
> necessary message. I have literally several hours of experience with the
> code base and cannot wrap my head around it.
>
> If someone could help out with adding that diagnostic, or provide other
> ways to get number of execution steps, that would be great.
>
> Regards,
> Nikita Alekseev
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191125/4bbdacd4/attachment.html>


More information about the llvm-dev mailing list