[llvm] r345499 - [llvm-mca][UpdateTestChecks] Don't try to align blocks that have already been subject to alignment in update_mca_test_checks.py
Greg Bedwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 29 06:24:21 PDT 2018
Author: gbedwell
Date: Mon Oct 29 06:24:20 2018
New Revision: 345499
URL: http://llvm.org/viewvc/llvm-project?rev=345499&view=rev
Log:
[llvm-mca][UpdateTestChecks] Don't try to align blocks that have already been subject to alignment in update_mca_test_checks.py
This fixes PR39466.
Modified:
llvm/trunk/utils/update_mca_test_checks.py
Modified: llvm/trunk/utils/update_mca_test_checks.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/update_mca_test_checks.py?rev=345499&r1=345498&r2=345499&view=diff
==============================================================================
--- llvm/trunk/utils/update_mca_test_checks.py (original)
+++ llvm/trunk/utils/update_mca_test_checks.py Mon Oct 29 06:24:20 2018
@@ -267,10 +267,14 @@ def _align_matching_blocks(all_blocks, f
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
More information about the llvm-commits
mailing list