[llvm] [NewPM][CodeGen] Port MachineLICM to NPM (PR #107376)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 03:15:03 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 a95b212e9957b8f5b7d452b4713a7b6f9ee19e71 641606b2e343d88ce0db911f6489278bd7dbbb22 --extensions h,cpp -- llvm/include/llvm/CodeGen/MachineLICM.h llvm/include/llvm/CodeGen/MachineBasicBlock.h llvm/include/llvm/Passes/CodeGenPassBuilder.h llvm/lib/CodeGen/MachineLICM.cpp llvm/lib/Passes/PassBuilder.cpp llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index c67e9f28da..e9b4c7679f 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -808,9 +808,10 @@ void MachineLICMImpl::ExitScope(MachineBasicBlock *MBB) {
/// Destroy scope for the MBB that corresponds to the given dominator tree node
/// if its a leaf or all of its children are done. Walk up the dominator tree to
/// destroy ancestors which are now done.
-void MachineLICMImpl::ExitScopeIfDone(MachineDomTreeNode *Node,
- DenseMap<MachineDomTreeNode*, unsigned> &OpenChildren,
- const DenseMap<MachineDomTreeNode*, MachineDomTreeNode*> &ParentMap) {
+void MachineLICMImpl::ExitScopeIfDone(
+ MachineDomTreeNode *Node,
+ DenseMap<MachineDomTreeNode *, unsigned> &OpenChildren,
+ const DenseMap<MachineDomTreeNode *, MachineDomTreeNode *> &ParentMap) {
if (OpenChildren[Node])
return;
@@ -1241,9 +1242,8 @@ bool MachineLICMImpl::IsCheapInstruction(MachineInstr &MI) const {
/// Visit BBs from header to current BB, check if hoisting an instruction of the
/// given cost matrix can cause high register pressure.
-bool
-MachineLICMImpl::CanCauseHighRegPressure(const DenseMap<unsigned, int>& Cost,
- bool CheapInstr) {
+bool MachineLICMImpl::CanCauseHighRegPressure(
+ const DenseMap<unsigned, int> &Cost, bool CheapInstr) {
for (const auto &RPIdAndCost : Cost) {
if (RPIdAndCost.second <= 0)
continue;
``````````
</details>
https://github.com/llvm/llvm-project/pull/107376
More information about the llvm-commits
mailing list