diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2022-10-13 14:42:15 -0700 |
---|---|---|
committer | Matt Arsenault <arsenm2@gmail.com> | 2022-10-23 15:39:39 -0700 |
commit | 08d1c43c7023a2e955c43fbf4c3f1635f91521e0 (patch) | |
tree | d57ee0e54f786921796262f743c1cda2d0b365d3 /llvm/tools/llvm-reduce/DeltaManager.cpp | |
parent | 3e6f7ab867ac8c36f0c8a91e7fa1608742702681 (diff) | |
download | llvm-08d1c43c7023a2e955c43fbf4c3f1635f91521e0.zip llvm-08d1c43c7023a2e955c43fbf4c3f1635f91521e0.tar.gz llvm-08d1c43c7023a2e955c43fbf4c3f1635f91521e0.tar.bz2 |
llvm-reduce: Add conditional reduction passes
Copy this technique from bugpoint. Before trying to blindly
delete blocks, try to fold branch conditions. This intuitively
makes more sense for a faster reduction, since you can find
dead paths in the function to prune out before trying to bisect
blocks in source order.
Seems to provide some speedup on my multi-hour reduction samples.
This does have the potential to produce testcases with unreachable
blocks. This is already a problem with the existing block
reduction pass. I'm struggling dealing with invalid reductions
in these cases, so in the future this should probably start
deleting those. However, I do sometimes try to reduce failures
in code that becomes unreachable, so I'm not totally sure
what to do here.
Diffstat (limited to 'llvm/tools/llvm-reduce/DeltaManager.cpp')
-rw-r--r-- | llvm/tools/llvm-reduce/DeltaManager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/tools/llvm-reduce/DeltaManager.cpp b/llvm/tools/llvm-reduce/DeltaManager.cpp index 048a83c..ee29b44 100644 --- a/llvm/tools/llvm-reduce/DeltaManager.cpp +++ b/llvm/tools/llvm-reduce/DeltaManager.cpp @@ -74,6 +74,8 @@ static cl::list<std::string> DELTA_PASS("function-bodies", reduceFunctionBodiesDeltaPass) \ DELTA_PASS("special-globals", reduceSpecialGlobalsDeltaPass) \ DELTA_PASS("aliases", reduceAliasesDeltaPass) \ + DELTA_PASS("simplify-conditionals-true", reduceConditionalsTrueDeltaPass) \ + DELTA_PASS("simplify-conditionals-false", reduceConditionalsFalseDeltaPass)\ DELTA_PASS("basic-blocks", reduceBasicBlocksDeltaPass) \ DELTA_PASS("global-values", reduceGlobalValuesDeltaPass) \ DELTA_PASS("global-objects", reduceGlobalObjectsDeltaPass) \ |