diff options
Diffstat (limited to 'llvm')
| -rwxr-xr-x | llvm/utils/update_mca_test_checks.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/utils/update_mca_test_checks.py b/llvm/utils/update_mca_test_checks.py index a83186cd336..54d1cb443c3 100755 --- a/llvm/utils/update_mca_test_checks.py +++ b/llvm/utils/update_mca_test_checks.py @@ -267,10 +267,14 @@ def _align_matching_blocks(all_blocks, farthest_indexes): continue changed = False - while(index < farthest_indexes[block]): - blocks.insert(index, '') - index += 1 - changed = True + # If the block has not already been subject to alignment (i.e. if the + # previous block is not empty) then insert empty blocks until the index + # matches the farthest index identified for that block. + if (index > 0) and blocks[index - 1]: + while(index < farthest_indexes[block]): + blocks.insert(index, '') + index += 1 + changed = True if changed: # Bail out. We'll need to re-do the farthest block analysis now that |

