diff options
author | AdityaK <hiraditya@msn.com> | 2024-07-09 21:26:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 21:26:32 -0700 |
commit | 3e4adef9467734a3ced62a651ae7f35f5bf45901 (patch) | |
tree | d0a6e0751d284a545aa84b57e374948c10c09c72 /llvm/lib/CodeGen | |
parent | ac299ed2c752928d34b5db339a926286115f0718 (diff) | |
download | llvm-3e4adef9467734a3ced62a651ae7f35f5bf45901.zip llvm-3e4adef9467734a3ced62a651ae7f35f5bf45901.tar.gz llvm-3e4adef9467734a3ced62a651ae7f35f5bf45901.tar.bz2 |
[NFC] Add reference to the clustering algortihm for switch statements (#98239)
Menezes, Evandro, Sebastian Pop, and Aditya Kumar. "Clustering case
statements for indirect branch predictors." arXiv preprint
arXiv:1910.02351 (2019).
https://arxiv.org/pdf/1910.02351v2
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SwitchLoweringUtils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SwitchLoweringUtils.cpp b/llvm/lib/CodeGen/SwitchLoweringUtils.cpp index 8922fa5..e741a0f 100644 --- a/llvm/lib/CodeGen/SwitchLoweringUtils.cpp +++ b/llvm/lib/CodeGen/SwitchLoweringUtils.cpp @@ -104,7 +104,8 @@ void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, // for the Case Statement'" (1994), but builds the MinPartitions array in // reverse order to make it easier to reconstruct the partitions in ascending // order. In the choice between two optimal partitionings, it picks the one - // which yields more jump tables. + // which yields more jump tables. The algorithm is described in + // https://arxiv.org/pdf/1910.02351v2 // MinPartitions[i] is the minimum nbr of partitions of Clusters[i..N-1]. SmallVector<unsigned, 8> MinPartitions(N); @@ -574,4 +575,4 @@ SwitchCG::SwitchLowering::computeSplitWorkItemInfo( assert(FirstRight <= W.LastCluster); return SplitWorkItemInfo{LastLeft, FirstRight, LeftProb, RightProb}; -}
\ No newline at end of file +} |