[llvm] [NFC][MachineLoopInfo] Consider loads in `isLoopInvariant`. (PR #95632)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 22:29:35 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff adc4e45f2ecce13cf4ed9b4ab119492342b86faf c1bbc627d1f7f4fecf83365bf3a14548caca12cf -- llvm/lib/CodeGen/MachineLICM.cpp llvm/lib/CodeGen/MachineLoopInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp
index f2844caad8..5649bb9a77 100644
--- a/llvm/lib/CodeGen/MachineLoopInfo.cpp
+++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp
@@ -223,8 +223,9 @@ bool MachineLoop::isLoopInvariant(MachineInstr &I,
const TargetRegisterInfo *TRI = ST.getRegisterInfo();
const TargetInstrInfo *TII = ST.getInstrInfo();
- // TODO: If the address of a load is loop-invariant and doesn't alias any store in
- // the loop then it is loop-invariant. For now only handle constant loads.
+ // TODO: If the address of a load is loop-invariant and doesn't alias any
+ // store in the loop then it is loop-invariant. For now only handle constant
+ // loads.
if (I.mayLoad() && !mayLoadFromGOTOrConstantPool(I))
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/95632
More information about the llvm-commits
mailing list