This is an archive of the discontinued LLVM Phabricator instance.

[dllimport] Don't use RAV to check inlinability
Needs ReviewPublic

Authored by rnk on Jan 25 2019, 4:37 PM.

Details

Reviewers
hans
Summary

I don't like this change, because I had to copy a fair amount of logic
from RAV into the dllimport visitor. However, the build time and size
results were still impressive, so I wanted to upload this and get a
second opinion. Here's the data:

metricbeforeafterdiff
time (s)38.725.3-13.4
obj (kb)120129428-2584
exe (kb)8600085924-76

Do you think I should land this as is? I'm considering factoring some of
this stuff up into a "RecursiveStmtVisitor" that tries to visit "code
that executes in a particular function scope". It could be used for
availability diagnostics that search for use of particular local
variables, etc. That seems to be the main use case we have for RAVs:
given a predicate, find all referenced decls, and check some predicate.

Event Timeline

rnk created this revision.Jan 25 2019, 4:37 PM
hans added a comment.Jan 25 2019, 4:54 PM

Yes, it's a little bit unfortunate that the code needs to get more complicated due to this. The RecursiveStmtVisitor idea that you mention sounds like it might be a good idea (but if it turns out not to be, I'm not entirely opposed to this patch either).