[all-commits] [llvm/llvm-project] c2acd4: Convert fir.allocmem and fir.freemem operations to...

Alexis Perry-Holby via All-commits all-commits at lists.llvm.org
Tue Dec 7 14:59:31 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2acd4539396af2beb8f37e38e8da9e4a04565f5
      https://github.com/llvm/llvm-project/commit/c2acd4539396af2beb8f37e38e8da9e4a04565f5
  Author: AlexisPerry <aperry at lanl.gov>
  Date:   2021-12-07 (Tue, 07 Dec 2021)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    A flang/test/Fir/Todo/allocmem.fir
    M flang/test/Fir/convert-to-llvm.fir

  Log Message:
  -----------
  Convert fir.allocmem and fir.freemem operations to calls to malloc and 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 at nvidia.com>
Co-authored-by: Jean Perier <jperier at nvidia.com>

Reviewed By: awarzynski, clementval, kiranchandramohan, schweitz

Differential Revision: https://reviews.llvm.org/D114104




More information about the All-commits mailing list