[flang-commits] [PATCH] D141136: [flang] Allow and use fir.rebox in fir.global

Pete Steinfeld via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jan 6 08:26:49 PST 2023


PeteSteinfeld requested changes to this revision.
PeteSteinfeld added a comment.
This revision now requires changes to proceed.

I get build errors with this patch.  I'm building with GCC 9.3.0.  Here's the relevant excerpt from my build log:

  [6211/7172] Building CXX object tools/flang/lib/Optimizer/CodeGen/CMakeFiles/obj.FIRCodeGen.dir/CodeGen.cpp.o
  FAILED: tools/flang/lib/Optimizer/CodeGen/CMakeFiles/obj.FIRCodeGen.dir/CodeGen.cpp.o 
  /home/sw/thirdparty/gcc/gcc-9.3.0/linux86-64/bin/g++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/local/home/psteinfeld/main/allow/build/tools/flang/lib/Optimizer/CodeGen -I/local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen -I/local/home/psteinfeld/main/allow/flang/include -I/local/home/psteinfeld/main/allow/build/tools/flang/include -I/local/home/psteinfeld/main/allow/build/include -I/local/home/psteinfeld/main/allow/llvm/include -isystem /local/home/psteinfeld/main/allow/llvm/../mlir/include -isystem /local/home/psteinfeld/main/allow/build/tools/mlir/include -isystem /local/home/psteinfeld/main/allow/build/tools/clang/include -isystem /local/home/psteinfeld/main/allow/llvm/../clang/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Werror -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/flang/lib/Optimizer/CodeGen/CMakeFiles/obj.FIRCodeGen.dir/CodeGen.cpp.o -MF tools/flang/lib/Optimizer/CodeGen/CMakeFiles/obj.FIRCodeGen.dir/CodeGen.cpp.o.d -o tools/flang/lib/Optimizer/CodeGen/CMakeFiles/obj.FIRCodeGen.dir/CodeGen.cpp.o -c /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp: In instantiation of ‘mlir::LLVM::GEPOp {anonymous}::FIROpConversion<FromOp>::genGEP(mlir::Location, mlir::Type, mlir::ConversionPatternRewriter&, mlir::Value, ARGS ...) const [with ARGS = {int, unsigned int, mlir::Value, int}; FromOp = fir::BoxDimsOp]’:
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:208:23:   required from ‘mlir::Value {anonymous}::FIROpConversion<FromOp>::loadDimFieldFromBox(mlir::Location, mlir::Value, mlir::Value, int, mlir::Type, mlir::ConversionPatternRewriter&) const [with FromOp = fir::BoxDimsOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:184:22:   required from ‘llvm::SmallVector<mlir::Value, 3> {anonymous}::FIROpConversion<FromOp>::getDimsFromBox(mlir::Location, llvm::ArrayRef<mlir::Type>, mlir::Value, mlir::Value, mlir::ConversionPatternRewriter&) const [with FromOp = fir::BoxDimsOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:548:58:   required from here
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#1’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
    305 |     llvm::SmallVector<mlir::LLVM::GEPArg> cv = {args...};
        |                                                 ^~~~
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp: In instantiation of ‘mlir::LLVM::GEPOp {anonymous}::FIROpConversion<FromOp>::genGEP(mlir::Location, mlir::Type, mlir::ConversionPatternRewriter&, mlir::Value, ARGS ...) const [with ARGS = {int, unsigned int, unsigned int, int}; FromOp = fir::cg::XReboxOp]’:
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:219:25:   required from ‘mlir::Value {anonymous}::FIROpConversion<FromOp>::getDimFieldFromBox(mlir::Location, mlir::Value, unsigned int, int, mlir::Type, mlir::ConversionPatternRewriter&) const [with FromOp = fir::cg::XReboxOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:194:22:   required from ‘llvm::SmallVector<mlir::Value, 3> {anonymous}::FIROpConversion<FromOp>::getDimsFromBox(mlir::Location, llvm::ArrayRef<mlir::Type>, mlir::Value, unsigned int, mlir::ConversionPatternRewriter&) const [with FromOp = fir::cg::XReboxOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:2014:79:   required from here
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#1’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#2’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp: In instantiation of ‘mlir::LLVM::GEPOp {anonymous}::FIROpConversion<FromOp>::genGEP(mlir::Location, mlir::Type, mlir::ConversionPatternRewriter&, mlir::Value, ARGS ...) const [with ARGS = {int, unsigned int, unsigned int, int}; FromOp = fir::cg::XArrayCoorOp]’:
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:219:25:   required from ‘mlir::Value {anonymous}::FIROpConversion<FromOp>::getDimFieldFromBox(mlir::Location, mlir::Value, unsigned int, int, mlir::Type, mlir::ConversionPatternRewriter&) const [with FromOp = fir::cg::XArrayCoorOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:231:12:   required from ‘mlir::Value {anonymous}::FIROpConversion<FromOp>::getStrideFromBox(mlir::Location, mlir::Value, unsigned int, mlir::ConversionPatternRewriter&) const [with FromOp = fir::cg::XArrayCoorOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:2428:76:   required from here
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#1’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#2’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp: In instantiation of ‘mlir::LLVM::GEPOp {anonymous}::FIROpConversion<FromOp>::genGEP(mlir::Location, mlir::Type, mlir::ConversionPatternRewriter&, mlir::Value, ARGS ...) const [with ARGS = {int, unsigned int, unsigned int, int}; FromOp = fir::CoordinateOp]’:
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:219:25:   required from ‘mlir::Value {anonymous}::FIROpConversion<FromOp>::getDimFieldFromBox(mlir::Location, mlir::Value, unsigned int, int, mlir::Type, mlir::ConversionPatternRewriter&) const [with FromOp = fir::CoordinateOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:231:12:   required from ‘mlir::Value {anonymous}::FIROpConversion<FromOp>::getStrideFromBox(mlir::Location, mlir::Value, unsigned int, mlir::ConversionPatternRewriter&) const [with FromOp = fir::CoordinateOp]’
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:2678:69:   required from here
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#1’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
  /local/home/psteinfeld/main/allow/flang/lib/Optimizer/CodeGen/CodeGen.cpp:305:49: error: narrowing conversion of ‘args#2’ from ‘unsigned int’ to ‘int32_t’ {aka ‘int’} [-Werror=narrowing]
  cc1plus: error: unrecognized command line option ‘-Wno-ctad-maybe-unsupported’ [-Werror]
  cc1plus: all warnings being treated as errors


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141136/new/

https://reviews.llvm.org/D141136



More information about the flang-commits mailing list