[llvm] [CodeGen][WinEH] Update saved esp for inlined inallocas (PR #116585)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 17 23:53:11 PST 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 b4c0ef18226b7d1f82d71fc0171b99caec0d8d12 e33204e1a99c1d7003fc961a72444cb4eece60ba --extensions cpp -- llvm/lib/Target/X86/X86WinEHState.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/X86/X86WinEHState.cpp b/llvm/lib/Target/X86/X86WinEHState.cpp
index c941196dd5..7f64285b19 100644
--- a/llvm/lib/Target/X86/X86WinEHState.cpp
+++ b/llvm/lib/Target/X86/X86WinEHState.cpp
@@ -780,11 +780,10 @@ void WinEHStatePass::insertStateNumberStore(Instruction *IP, int State) {
   Builder.CreateStore(Builder.getInt32(State), StateField);
 }
 
-void WinEHStatePass::updateEspForInAllocas(Function& F)
-{
-  for (BasicBlock& BB : F) {
+void WinEHStatePass::updateEspForInAllocas(Function &F) {
+  for (BasicBlock &BB : F) {
     for (Instruction &I : BB) {
-      if (auto* Alloca = dyn_cast<AllocaInst>(&I)) {
+      if (auto *Alloca = dyn_cast<AllocaInst>(&I)) {
         if (!Alloca->isUsedWithInAlloca())
           continue;
         IRBuilder<> Builder(Alloca->getNextNonDebugInstruction());
@@ -793,7 +792,7 @@ void WinEHStatePass::updateEspForInAllocas(Function& F)
         Builder.CreateStore(SP, Builder.CreateStructGEP(RegNodeTy, RegNode, 0));
       }
 
-      if (auto* II = dyn_cast<IntrinsicInst>(&I)) {
+      if (auto *II = dyn_cast<IntrinsicInst>(&I)) {
         if (II->getIntrinsicID() != Intrinsic::stackrestore)
           continue;
         IRBuilder<> Builder(II->getNextNonDebugInstruction());

``````````

</details>


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


More information about the llvm-commits mailing list