Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert fir.allocmem and fir.freemem operations to calls to malloc an…
…d free, respectively This patch is part of the upstreaming effort from the fir-dev branch. Address review comments - move CHECK blocks to after the mlir code in the test file - fix style with respect to anonymous namespaces: only include class definitions in the namespace and make functions static and outside the namespace - fix a few nits - remove TODO in favor of notifyMatchFailure - removed unnecessary CHECK line from convert-to-llvm.fir - rebase on main - add TODO back in - get successfull test of TODO in AllocMemOp converion of derived type with LEN params - clearer comments and reduced use of auto - move defintion of computeDerivedTypeSize to fix build error Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Co-authored-by: Jean Perier <jperier@nvidia.com> Reviewed By: awarzynski, clementval, kiranchandramohan, schweitz Differential Revision: https://reviews.llvm.org/D114104
- Loading branch information
1 parent
8421fa5
commit c2acd45
Showing
3 changed files
with
217 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s | ||
|
||
// Test `fir.allocmem` of derived type with LEN parameters conversion to llvm. | ||
// Not implemented yet. | ||
|
||
func @allocmem_test(%arg0 : i32, %arg1 : i16) { | ||
// CHECK: not yet implemented fir.allocmem codegen of derived type with length parameters | ||
%0 = fir.allocmem !fir.type<_QTt(p1:i32,p2:i16){f1:i32,f2:f32}>(%arg0, %arg1 : i32, i16) {name = "_QEvar"} | ||
return | ||
} |
Oops, something went wrong.