aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-07-17 14:04:59 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-07-17 14:04:59 +0000
commitd95761d9d08340b641225b2cf6d397a06db29137 (patch)
tree1a0594e08c559e24a03d4fccd91aff8d3ee0b7ff /clang/unittests/Tooling/CompilationDatabaseTest.cpp
parentf41dd122d67ee45007e8f26142ad34fec622d748 (diff)
downloadllvm-d95761d9d08340b641225b2cf6d397a06db29137.zip
llvm-d95761d9d08340b641225b2cf6d397a06db29137.tar.gz
llvm-d95761d9d08340b641225b2cf6d397a06db29137.tar.bz2
[IPSCCP] Run Solve each time we resolved an undef in a function.
Once we resolved an undef in a function we can run Solve, which could lead to finding a constant return value for the function, which in turn could turn undefs into constants in other functions that call it, before resolving undefs there. Computationally the amount of work we are doing stays the same, just the order we process things is slightly different and potentially there are a few less undefs to resolve. We are still relying on the order of functions in the IR, which means depending on the order, we are able to resolve the optimal undef first or not. For example, if @test1 comes before @testf, we find the constant return value of @testf too late and we cannot use it while solving @test1. This on its own does not lead to more constants removed in the test-suite, probably because currently we have to be very lucky to visit applicable functions in the right order. Maybe we manage to come up with a better way of resolving undefs in more 'profitable' functions first. Reviewers: efriedma, mssimpso, davide Reviewed By: efriedma, davide Differential Revision: https://reviews.llvm.org/D49385 llvm-svn: 337283
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
0 files changed, 0 insertions, 0 deletions