[all-commits] [llvm/llvm-project] bff94d: [CIR] Emit allocas into the proper lexical scope (...
Andy Kaylor via All-commits
all-commits at lists.llvm.org
Tue Mar 25 16:14:19 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bff94d774cda03e43aff1cdf6e4945136bbab3d7
https://github.com/llvm/llvm-project/commit/bff94d774cda03e43aff1cdf6e4945136bbab3d7
Author: Andy Kaylor <akaylor at nvidia.com>
Date: 2025-03-25 (Tue, 25 Mar 2025)
Changed paths:
M clang/include/clang/CIR/Dialect/Passes.h
M clang/include/clang/CIR/Dialect/Passes.td
M clang/include/clang/CIR/MissingFeatures.h
M clang/lib/CIR/CodeGen/CIRGenDecl.cpp
M clang/lib/CIR/CodeGen/CIRGenExpr.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.h
M clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
A clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
M clang/lib/CIR/Lowering/CIRPasses.cpp
M clang/test/CIR/CodeGen/loop.cpp
A clang/test/CIR/Transforms/hoist-allocas.cir
M clang/tools/cir-opt/cir-opt.cpp
Log Message:
-----------
[CIR] Emit allocas into the proper lexical scope (#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
handling
insertion of the alloca into the proper lexcial scope. It also adds a
CIR-to-CIR transformation to hoist allocas to the function entry block,
which is necessary to produce the expected LLVM IR during lowering.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list