[llvm-branch-commits] Add IR and codegen support for deactivation symbols. (PR #133536)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 28 15:37:46 PDT 2025
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 f3d7a774bcdeca91da9cbc5e656df5ab478ca3aa 14dae4d9b8dc759c924cefb252ffc877e33a7ac3 --extensions h,cpp -- llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h llvm/include/llvm/CodeGen/ISDOpcodes.h llvm/include/llvm/CodeGen/MachineInstr.h llvm/include/llvm/CodeGen/MachineInstrBuilder.h llvm/include/llvm/CodeGen/SelectionDAG.h llvm/include/llvm/CodeGen/SelectionDAGISel.h llvm/include/llvm/CodeGen/SelectionDAGNodes.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/include/llvm/IR/LLVMContext.h llvm/lib/CodeGen/GlobalISel/CallLowering.cpp llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp llvm/lib/CodeGen/MachineInstr.cpp llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/lib/IR/LLVMContext.cpp llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h
index 2a8f6eaa6e..aea7465417 100644
--- a/llvm/include/llvm/CodeGen/MachineInstr.h
+++ b/llvm/include/llvm/CodeGen/MachineInstr.h
@@ -880,9 +880,7 @@ public:
// FIXME: Move to Info.
Value *DeactivationSymbol = nullptr;
- Value *getDeactivationSymbol() const {
- return DeactivationSymbol;
- }
+ Value *getDeactivationSymbol() const { return DeactivationSymbol; }
void setDeactivationSymbol(MachineFunction &MF, Value *DeactivationSymbol) {
this->DeactivationSymbol = DeactivationSymbol;
}
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 94a4262e9b..702684f2c5 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1934,8 +1934,7 @@ class DeactivationSymbolSDNode : public SDNode {
const GlobalValue *TheGlobal;
DeactivationSymbolSDNode(const GlobalValue *GV, SDVTList VTs)
- : SDNode(ISD::DEACTIVATION_SYMBOL, 0, DebugLoc(), VTs),
- TheGlobal(GV) {}
+ : SDNode(ISD::DEACTIVATION_SYMBOL, 0, DebugLoc(), VTs), TheGlobal(GV) {}
public:
const GlobalValue *getGlobal() const { return TheGlobal; }
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 45d9863835..f693d3301a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -3494,7 +3494,7 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
if (N->getNumOperands() != 0 &&
N->getOperand(N->getNumOperands() - 1).getOpcode() ==
ISD::DEACTIVATION_SYMBOL)
- DeactivationSymbol = N->getOperand(N->getNumOperands()-1);
+ DeactivationSymbol = N->getOperand(N->getNumOperands() - 1);
continue;
case OPC_MoveChild: {
``````````
</details>
https://github.com/llvm/llvm-project/pull/133536
More information about the llvm-branch-commits
mailing list