[flang-commits] [flang] [flang] Added LoopInvariantCodeMotion pass for [HL]FIR. (PR #173438)

via flang-commits flang-commits at lists.llvm.org
Tue Dec 23 17:10:57 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD flang/test/Analysis/AliasAnalysis/gen_mod_ref_test.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- gen_mod_ref_test.py	2025-12-24 01:06:20.000000 +0000
+++ gen_mod_ref_test.py	2025-12-24 01:10:28.949106 +0000
@@ -11,11 +11,11 @@
 """
 
 import sys
 import re
 
-box_addr_counter=0
+box_addr_counter = 0
 
 for line in sys.stdin:
     line = re.sub(
         r"(fir.call @_\w*P)(test_effect_\w*)(\(.*) : ",
         r'\1\2\3 {test.ptr ="\2"} : ',
@@ -25,11 +25,11 @@
         r'(hlfir.declare .*uniq_name =.*E)(test_var_\w*)"',
         r'\1\2", test.ptr ="\2"',
         line,
     )
     line, count = re.subn(
-        r'(fir.box_addr.*) :',
+        r"(fir.box_addr.*) :",
         rf'\1 {{test.ptr ="box_addr_{box_addr_counter}"}} :',
         line,
     )
     if count > 0:
         box_addr_counter += 1

``````````

</details>


https://github.com/llvm/llvm-project/pull/173438


More information about the flang-commits mailing list