aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ProgramTest.cpp
diff options
context:
space:
mode:
authorBrendon Cahoon <brendon.cahoon@amd.com>2022-10-09 17:34:57 -0500
committerBrendon Cahoon <brendon.cahoon@amd.com>2022-10-31 08:58:54 -0500
commitf59205aef957da9017285d4c0bb6f9c6f244621f (patch)
tree22f3cfeb43e20311b5386979eb3bcdf0c7448276 /llvm/unittests/Support/ProgramTest.cpp
parent64959325eb470489ca5757b9bd6eef97b402a0da (diff)
downloadllvm-f59205aef957da9017285d4c0bb6f9c6f244621f.zip
llvm-f59205aef957da9017285d4c0bb6f9c6f244621f.tar.gz
llvm-f59205aef957da9017285d4c0bb6f9c6f244621f.tar.bz2
[BasicBlockUtils] Add a new way for CreateControlFlowHub()
The existing way of creating the predicate in the guard blocks uses a boolean value per outgoing block. This increases the number of live booleans as the number of outgoing blocks increases. The new way added in this change is to store one integer to represent the outgoing block we want to branch to, then at each guard block, an integer equality check is performed to decide which a specific outgoing block is taken. Using an integer reduces the number of live values and decreases register pressure especially in cases where there are a large number of outgoing blocks. The integer based approach is used when the number of outgoing blocks crosses a threshold, which is currently set to 32. Patch by Ruiling Song. Differential review: https://reviews.llvm.org/D127831
Diffstat (limited to 'llvm/unittests/Support/ProgramTest.cpp')
0 files changed, 0 insertions, 0 deletions