[flang-commits] [flang] [flang] In AllocMemOp lowering, convert types for calling malloc on 32-bit (PR #129308)
via flang-commits
flang-commits at lists.llvm.org
Fri Feb 28 13:14:51 PST 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 9a54c77aa361d0d1f98a39a89e3f543d15d182a5 ef5f2305dbb7c82fca3f131b72e14480ae7c79ab --extensions cpp -- flang/lib/Optimizer/CodeGen/CodeGen.cpp flang/lib/Optimizer/CodeGen/TypeConverter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
index b6ce5f328b..cda6c135ef 100644
--- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -982,8 +982,7 @@ struct EmboxCharOpConversion : public fir::FIROpConversion<fir::EmboxCharOp> {
template <typename ModuleOp>
static mlir::SymbolRefAttr
getMallocInModule(ModuleOp mod, fir::AllocMemOp op,
- mlir::ConversionPatternRewriter &rewriter,
- bool addr32) {
+ mlir::ConversionPatternRewriter &rewriter, bool addr32) {
static constexpr char mallocName[] = "malloc";
if (auto mallocFunc =
mod.template lookupSymbol<mlir::LLVM::LLVMFuncOp>(mallocName))
@@ -1003,9 +1002,9 @@ getMallocInModule(ModuleOp mod, fir::AllocMemOp op,
}
/// Return the LLVMFuncOp corresponding to the standard malloc call.
-static mlir::SymbolRefAttr
-getMalloc(fir::AllocMemOp op, mlir::ConversionPatternRewriter &rewriter,
- bool addr32) {
+static mlir::SymbolRefAttr getMalloc(fir::AllocMemOp op,
+ mlir::ConversionPatternRewriter &rewriter,
+ bool addr32) {
if (auto mod = op->getParentOfType<mlir::gpu::GPUModuleOp>())
return getMallocInModule(mod, op, rewriter, addr32);
auto mod = op->getParentOfType<mlir::ModuleOp>();
``````````
</details>
https://github.com/llvm/llvm-project/pull/129308
More information about the flang-commits
mailing list