diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-11-14 06:51:49 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-11-14 06:51:49 +0000 |
commit | 883f2fab47ca2f7f6efebb10a5e859f5804bed07 (patch) | |
tree | 2e14cf3096adaa7b6fec4fd596a93a7433be31b5 /include | |
parent | 3426a3efef546a20adf9e2064f589417ab89442b (diff) | |
download | external_llvm-883f2fab47ca2f7f6efebb10a5e859f5804bed07.zip external_llvm-883f2fab47ca2f7f6efebb10a5e859f5804bed07.tar.gz external_llvm-883f2fab47ca2f7f6efebb10a5e859f5804bed07.tar.bz2 |
Add a cautionary note to this API. It was not at all obvious to me how
expensive the most useful interface to this analysis is.
Fun story -- it's also not correct. That's getting fixed in another
patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineBranchProbabilityInfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBranchProbabilityInfo.h b/include/llvm/CodeGen/MachineBranchProbabilityInfo.h index d9673e2..39d2f32 100644 --- a/include/llvm/CodeGen/MachineBranchProbabilityInfo.h +++ b/include/llvm/CodeGen/MachineBranchProbabilityInfo.h @@ -62,6 +62,9 @@ public: // Return a probability as a fraction between 0 (0% probability) and // 1 (100% probability), however the value is never equal to 0, and can be 1 // only iff SRC block has only one successor. + // NB: This routine's complexity is linear on the number of successors of + // Src. Querying sequentially for each successor's probability is a quadratic + // query pattern. BranchProbability getEdgeProbability(MachineBasicBlock *Src, MachineBasicBlock *Dst) const; |