@@ -293,7 +294,8 @@ void CIRGenFunction::startFunction(GlobalDecl gd, QualType
returnType,
mlir::Value addrVal =
emitAlloca(cast(paramVar)->getName(),
- convertType(paramVar->getType()), paramLoc, alignment);
+ convertType(param
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/132468
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/132468
>From 6e84a91e4721d066ff3b79d5cb3535ac92f05af1 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 21 Mar 2025 13:11:11 -0700
Subject: [PATCH 1/4] [CIR] Emit allocas into the proper lexical scope
Alloca op
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
Alloca operations were being emitted into the entry block of the current
function unconditionally, even if the variable they represented was
declared in a different scope. This change upstreams the code for
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/132468
>From 9e84f55c840890befed2720e498c068ff4ca36cd Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 21 Mar 2025 13:11:11 -0700
Subject: [PATCH 1/4] [CIR] Emit allocas into the proper lexical scope
Alloca op
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
@@ -293,7 +294,8 @@ void CIRGenFunction::startFunction(GlobalDecl gd, QualType
returnType,
mlir::Value addrVal =
emitAlloca(cast(paramVar)->getName(),
- convertType(paramVar->getType()), paramLoc, alignment);
+ convertType(param
https://github.com/bcardosolopes approved this pull request.
LGTM after nit
https://github.com/llvm/llvm-project/pull/132468
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -44,3 +44,100 @@ void l0() {
// OGCG: br label %[[FOR_COND:.*]]
// OGCG: [[FOR_COND]]:
// OGCG: br label %[[FOR_COND]]
+
+void l1() {
+ for (int i = 0; ; ) {
+ }
+}
+
+// CIR: cir.func @l1
+// CIR-NEXT: cir.scope {
+// CIR-NEXT: %[[I:.*]] = cir.alloca !s32i,
@@ -293,7 +294,8 @@ void CIRGenFunction::startFunction(GlobalDecl gd, QualType
returnType,
mlir::Value addrVal =
emitAlloca(cast(paramVar)->getName(),
- convertType(paramVar->getType()), paramLoc, alignment);
+ convertType(param
@@ -0,0 +1,81 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/mmha approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/132468
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mmha edited https://github.com/llvm/llvm-project/pull/132468
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/132468
Alloca operations were being emitted into the entry block of the current
function unconditionally, even if the variable they represented was
declared in a different scope. This change upstreams the code for ha
llvmbot wrote:
@llvm/pr-subscribers-clangir
Author: Andy Kaylor (andykaylor)
Changes
Alloca operations were being emitted into the entry block of the current
function unconditionally, even if the variable they represented was
declared in a different scope. This change upstreams the code fo
andykaylor wrote:
CC: @mmha
https://github.com/llvm/llvm-project/pull/132468
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
21 matches
Mail list logo