diff options
author | Fangrui Song <maskray@google.com> | 2018-09-09 17:20:03 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-09-09 17:20:03 +0000 |
commit | aadc93c8876bd732eddb48292bce8f9bb7e6b9b8 (patch) | |
tree | f7ccaaba74bd518ecc338f4b9b3807cbded3c734 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 6ebf218e4c6e168f7e34101018121a67c2625123 (diff) | |
download | llvm-aadc93c8876bd732eddb48292bce8f9bb7e6b9b8.zip llvm-aadc93c8876bd732eddb48292bce8f9bb7e6b9b8.tar.gz llvm-aadc93c8876bd732eddb48292bce8f9bb7e6b9b8.tar.bz2 |
[Sema] Make typo correction slightly more efficient
edit_distance returns UpperBound+1 if the distance will exceed UpperBound. We can subtract 1 from UpperBound and change >= to > in the if condition. The threshold does not change but edit_distance will have more opportunity to bail out earlier.
llvm-svn: 341763
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions