-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[Flang] Add missing dependency to AddDebugInfo pass #139099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `AddDebugInfo` pass currently has a dependency on the `DLTI` MLIR dialect caused by a call to the `fir::support::getOrSetMLIRDataLayout()` utility function. This dependency is not captured in the pass definition. This patch adds the dependency and simplifies several unit tests that had to explicitly use the `DLTI` dialect to prevent the missing dependency from causing compiler failures.
@llvm/pr-subscribers-flang-fir-hlfir Author: Sergio Afonso (skatrak) ChangesThe This dependency is not captured in the pass definition. This patch adds the dependency and simplifies several unit tests that had to explicitly use the Full diff: https://github.com/llvm/llvm-project/pull/139099.diff 30 Files Affected:
diff --git a/flang/include/flang/Optimizer/Transforms/Passes.td b/flang/include/flang/Optimizer/Transforms/Passes.td
index 9b6919eec3f73..3243b44df9c7a 100644
--- a/flang/include/flang/Optimizer/Transforms/Passes.td
+++ b/flang/include/flang/Optimizer/Transforms/Passes.td
@@ -210,7 +210,8 @@ def AddDebugInfo : Pass<"add-debug-info", "mlir::ModuleOp"> {
}];
let constructor = "::fir::createAddDebugInfoPass()";
let dependentDialects = [
- "fir::FIROpsDialect", "mlir::func::FuncDialect", "mlir::LLVM::LLVMDialect"
+ "fir::FIROpsDialect", "mlir::func::FuncDialect", "mlir::LLVM::LLVMDialect",
+ "mlir::DLTIDialect"
];
let options = [
Option<"debugLevel", "debug-level",
diff --git a/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp b/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
index c479c1a0892b5..8fa2f38818c02 100644
--- a/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
+++ b/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
@@ -23,6 +23,7 @@
#include "flang/Optimizer/Support/InternalNames.h"
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Support/Version.h"
+#include "mlir/Dialect/DLTI/DLTI.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Matchers.h"
diff --git a/flang/test/Transforms/debug-107988.fir b/flang/test/Transforms/debug-107988.fir
index 0ba4296138f50..674ce287a29ec 100644
--- a/flang/test/Transforms/debug-107988.fir
+++ b/flang/test/Transforms/debug-107988.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @test(%arg0: !fir.ref<!fir.char<1,?>> {fir.bindc_name = "str"}, %arg1: i64) {
%0 = fir.emboxchar %arg0, %arg1 : (!fir.ref<!fir.char<1,?>>, i64) -> !fir.boxchar<1>
%1 = fir.undefined !fir.dscope
diff --git a/flang/test/Transforms/debug-96314.fir b/flang/test/Transforms/debug-96314.fir
index e2d0f24a1105c..4df0c4a555d39 100644
--- a/flang/test/Transforms/debug-96314.fir
+++ b/flang/test/Transforms/debug-96314.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QMhelperPmod_sub(%arg0: !fir.ref<i32> {fir.bindc_name = "a"} ) {
return
} loc(#loc1)
diff --git a/flang/test/Transforms/debug-allocatable-1.fir b/flang/test/Transforms/debug-allocatable-1.fir
index fd0beaddcdb70..f523025f5945e 100644
--- a/flang/test/Transforms/debug-allocatable-1.fir
+++ b/flang/test/Transforms/debug-allocatable-1.fir
@@ -1,7 +1,7 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func private @_QFPff() {
%c1 = arith.constant 1 : index
%c0 = arith.constant 0 : index
diff --git a/flang/test/Transforms/debug-assumed-rank-array.fir b/flang/test/Transforms/debug-assumed-rank-array.fir
index ce474cd259619..41e0396b076f7 100644
--- a/flang/test/Transforms/debug-assumed-rank-array.fir
+++ b/flang/test/Transforms/debug-assumed-rank-array.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QFPfn(%arg0: !fir.box<!fir.array<*:i32>> ) {
%1 = fir.undefined !fir.dscope
%2 = fircg.ext_declare %arg0 dummy_scope %1 {uniq_name = "_QFFfnEx"} : (!fir.box<!fir.array<*:i32>>, !fir.dscope) -> !fir.box<!fir.array<*:i32>> loc(#loc2)
diff --git a/flang/test/Transforms/debug-assumed-shape-array-2.fir b/flang/test/Transforms/debug-assumed-shape-array-2.fir
index 212a3453d110d..acad57a710205 100644
--- a/flang/test/Transforms/debug-assumed-shape-array-2.fir
+++ b/flang/test/Transforms/debug-assumed-shape-array-2.fir
@@ -2,7 +2,7 @@
// Test assumed shape array with variable lower bound.
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func private @_QFPfn(%arg0: !fir.box<!fir.array<?xi32>> {fir.bindc_name = "b"}, %arg1: !fir.ref<i32> {fir.bindc_name = "n"}) attributes {} {
%c23_i32 = arith.constant 23 : i32
%c6_i32 = arith.constant 6 : i32
diff --git a/flang/test/Transforms/debug-assumed-size-array.fir b/flang/test/Transforms/debug-assumed-size-array.fir
index 892502cb64a59..40e57100fd9ff 100644
--- a/flang/test/Transforms/debug-assumed-size-array.fir
+++ b/flang/test/Transforms/debug-assumed-size-array.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QMhelperPfn(%arg0: !fir.ref<!fir.array<5x?xi32>> {fir.bindc_name = "a1"}, %arg1: !fir.ref<!fir.array<?xi32>> {fir.bindc_name = "a2"}, %arg2: !fir.ref<!fir.array<2x?xi32>> {fir.bindc_name = "a3"}) {
%c5 = arith.constant 5 : index
%c1 = arith.constant 1 : index
diff --git a/flang/test/Transforms/debug-char-type-1.fir b/flang/test/Transforms/debug-char-type-1.fir
index 630b52d96cb85..49f230f7307fa 100644
--- a/flang/test/Transforms/debug-char-type-1.fir
+++ b/flang/test/Transforms/debug-char-type-1.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global @_QMhelperEstr1 : !fir.char<1,40> {
%0 = fir.zero_bits !fir.char<1,40>
fir.has_value %0 : !fir.char<1,40>
diff --git a/flang/test/Transforms/debug-class-type.fir b/flang/test/Transforms/debug-class-type.fir
index aad15a831fd2f..23af60b71ca50 100644
--- a/flang/test/Transforms/debug-class-type.fir
+++ b/flang/test/Transforms/debug-class-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.type_info @_QTtest_type nofinal : !fir.type<_QTtest_type{a:i32,b:!fir.box<!fir.heap<!fir.array<?x?xf32>>>}> dispatch_table {
fir.dt_entry "test_proc", @_QPtest_proc
} loc(#loc1)
diff --git a/flang/test/Transforms/debug-common-block.fir b/flang/test/Transforms/debug-common-block.fir
index 481b26369a92c..d68b524225df5 100644
--- a/flang/test/Transforms/debug-common-block.fir
+++ b/flang/test/Transforms/debug-common-block.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global @__BLNK__ {alignment = 4 : i64} : tuple<i32, !fir.array<8xi8>> {} loc(#loc1)
fir.global @a_ {alignment = 4 : i64} : tuple<i32, !fir.array<8xi8>> {} loc(#loc2)
func.func @f1() {
diff --git a/flang/test/Transforms/debug-complex-1.fir b/flang/test/Transforms/debug-complex-1.fir
index 633f27af99fb1..f7be6b2d4a931 100644
--- a/flang/test/Transforms/debug-complex-1.fir
+++ b/flang/test/Transforms/debug-complex-1.fir
@@ -3,7 +3,7 @@
// check conversion of complex type of different size. Both fir and mlir
// variants are checked.
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @test1(%x : complex<f32>) -> complex<f64> {
%1 = fir.convert %x : (complex<f32>) -> complex<f64>
return %1 : complex<f64>
diff --git a/flang/test/Transforms/debug-derived-type-2.fir b/flang/test/Transforms/debug-derived-type-2.fir
index 63e842619edbe..1e128d702b347 100644
--- a/flang/test/Transforms/debug-derived-type-2.fir
+++ b/flang/test/Transforms/debug-derived-type-2.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global @_QMmEvar : !fir.type<_QMmTt1{elm:!fir.array<5xi32>,elm2:!fir.array<5x8xi32>}> {} loc(#loc1)
fir.type_info @_QMmTt1 noinit nodestroy nofinal : !fir.type<_QMmTt1{elm:!fir.array<5xi32>,elm2:!fir.array<5x8xi32>}> component_info {
fir.dt_component "elm" lbs [2]
diff --git a/flang/test/Transforms/debug-extra-global.fir b/flang/test/Transforms/debug-extra-global.fir
index d3bc22ad0c59b..e3a33e4cfdf40 100644
--- a/flang/test/Transforms/debug-extra-global.fir
+++ b/flang/test/Transforms/debug-extra-global.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global linkonce_odr @_QFEXnXxcx constant target : !fir.char<1,3> {
%0 = fir.string_lit "xcx"(3) : !fir.char<1,3>
fir.has_value %0 : !fir.char<1,3>
diff --git a/flang/test/Transforms/debug-fixed-array-type.fir b/flang/test/Transforms/debug-fixed-array-type.fir
index a15975c7cc92a..75cb88b08b248 100644
--- a/flang/test/Transforms/debug-fixed-array-type.fir
+++ b/flang/test/Transforms/debug-fixed-array-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
%c7 = arith.constant 7 : index
%c8 = arith.constant 8 : index
diff --git a/flang/test/Transforms/debug-fn-info.fir b/flang/test/Transforms/debug-fn-info.fir
index 85cfd13643ec3..c02835be50af5 100644
--- a/flang/test/Transforms/debug-fn-info.fir
+++ b/flang/test/Transforms/debug-fn-info.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
%0 = fir.alloca i32 {bindc_name = "i4", uniq_name = "_QFEi4"}
%1 = fircg.ext_declare %0 {uniq_name = "_QFEi4"} : (!fir.ref<i32>) -> !fir.ref<i32>
diff --git a/flang/test/Transforms/debug-imported-entity.fir b/flang/test/Transforms/debug-imported-entity.fir
index 7be6531a703a8..194bc82724583 100644
--- a/flang/test/Transforms/debug-imported-entity.fir
+++ b/flang/test/Transforms/debug-imported-entity.fir
@@ -1,7 +1,7 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global @_QMfooEv1 : i32 {
%0 = fir.zero_bits i32
fir.has_value %0 : i32
diff --git a/flang/test/Transforms/debug-index-type.fir b/flang/test/Transforms/debug-index-type.fir
index 20bd8471d7cf6..751e2e156dc20 100644
--- a/flang/test/Transforms/debug-index-type.fir
+++ b/flang/test/Transforms/debug-index-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func private @str(%arg0: index) -> i32 loc(#loc1)
}
#loc1 = loc("test.f90":5:1)
diff --git a/flang/test/Transforms/debug-line-table-existing.fir b/flang/test/Transforms/debug-line-table-existing.fir
index 0e006303c8a81..03eefd08a4379 100644
--- a/flang/test/Transforms/debug-line-table-existing.fir
+++ b/flang/test/Transforms/debug-line-table-existing.fir
@@ -3,7 +3,7 @@
// REQUIRES: system-linux
// Test that there are no changes to a function with existed fused loc debug
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QPs1() {
return loc(#loc1)
} loc(#loc2)
diff --git a/flang/test/Transforms/debug-line-table-inc-file.fir b/flang/test/Transforms/debug-line-table-inc-file.fir
index 216cd5e016f2f..32c9f515ead43 100644
--- a/flang/test/Transforms/debug-line-table-inc-file.fir
+++ b/flang/test/Transforms/debug-line-table-inc-file.fir
@@ -3,7 +3,7 @@
// REQUIRES: system-linux
// Test for included functions that have a different debug location than the current file
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QPsinc() {
return loc(#loc2)
} loc(#loc1)
diff --git a/flang/test/Transforms/debug-line-table-inc-same-file.fir b/flang/test/Transforms/debug-line-table-inc-same-file.fir
index bcaf449798231..aaa8d03a76ef0 100644
--- a/flang/test/Transforms/debug-line-table-inc-same-file.fir
+++ b/flang/test/Transforms/debug-line-table-inc-same-file.fir
@@ -4,7 +4,7 @@
// Test that there is only one FileAttribute generated for multiple functions
// in the same file.
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QPs1() {
return loc(#loc2)
} loc(#loc1)
diff --git a/flang/test/Transforms/debug-line-table.fir b/flang/test/Transforms/debug-line-table.fir
index d6e54fd1ac467..81aebf026882a 100644
--- a/flang/test/Transforms/debug-line-table.fir
+++ b/flang/test/Transforms/debug-line-table.fir
@@ -3,7 +3,7 @@
// RUN: fir-opt --add-debug-info="debug-level=LineTablesOnly" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=LINETABLE
// RUN: fir-opt --add-debug-info="is-optimized=true" --mlir-print-debuginfo %s | FileCheck %s --check-prefix=OPT
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QPsb() {
return loc(#loc_sb)
} loc(#loc_sb)
diff --git a/flang/test/Transforms/debug-local-var.fir b/flang/test/Transforms/debug-local-var.fir
index b7a1ff7185a63..06c9b01e75a61 100644
--- a/flang/test/Transforms/debug-local-var.fir
+++ b/flang/test/Transforms/debug-local-var.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
%0 = fir.alloca i32 {bindc_name = "i4", uniq_name = "_QFEi4"}
%1 = fircg.ext_declare %0 {uniq_name = "_QFEi4"} : (!fir.ref<i32>) -> !fir.ref<i32> loc(#loc1)
diff --git a/flang/test/Transforms/debug-module-1.fir b/flang/test/Transforms/debug-module-1.fir
index ede996f053835..c1e4c2eeffefe 100644
--- a/flang/test/Transforms/debug-module-1.fir
+++ b/flang/test/Transforms/debug-module-1.fir
@@ -1,7 +1,7 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global @_QMhelperEgli : i32 {
%0 = fir.zero_bits i32
fir.has_value %0 : i32
diff --git a/flang/test/Transforms/debug-ptr-type.fir b/flang/test/Transforms/debug-ptr-type.fir
index 64e64cb1a19ae..2bbece56a7ab5 100644
--- a/flang/test/Transforms/debug-ptr-type.fir
+++ b/flang/test/Transforms/debug-ptr-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
fir.global @_QMhelperEpar : !fir.box<!fir.ptr<!fir.array<?x?xf32>>> {
%0 = fir.zero_bits !fir.ptr<!fir.array<?x?xf32>>
%c0 = arith.constant 0 : index
diff --git a/flang/test/Transforms/debug-ref-type.fir b/flang/test/Transforms/debug-ref-type.fir
index 2b3af485385d8..745aebee778be 100644
--- a/flang/test/Transforms/debug-ref-type.fir
+++ b/flang/test/Transforms/debug-ref-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func private @_FortranAioBeginExternalListOutput(i8) -> !fir.ref<i8> loc(#loc1)
}
#loc1 = loc("test.f90":5:1)
diff --git a/flang/test/Transforms/debug-tuple-type.fir b/flang/test/Transforms/debug-tuple-type.fir
index c9b0d16c06e1a..e3b0bafdf3cd4 100644
--- a/flang/test/Transforms/debug-tuple-type.fir
+++ b/flang/test/Transforms/debug-tuple-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func private @fn1(!fir.ref<tuple<f64, f64>>)
func.func private @_FortranAioOutputDerivedType(!fir.ref<tuple<>>)
}
diff --git a/flang/test/Transforms/debug-variable-array-dim.fir b/flang/test/Transforms/debug-variable-array-dim.fir
index 1f401041dee57..a376133cf449a 100644
--- a/flang/test/Transforms/debug-variable-array-dim.fir
+++ b/flang/test/Transforms/debug-variable-array-dim.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @foo_(%arg0: !fir.ref<!fir.array<?x?xi32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "n"}, %arg2: !fir.ref<i32> {fir.bindc_name = "m"}, %arg3: !fir.ref<i32> {fir.bindc_name = "p"}) attributes {fir.internal_name = "_QPfoo"} {
%c5_i32 = arith.constant 5 : i32
%c6_i32 = arith.constant 6 : i32
diff --git a/flang/test/Transforms/debug-variable-char-len.fir b/flang/test/Transforms/debug-variable-char-len.fir
index 9e177d22d5b10..907b65a4c6d4f 100644
--- a/flang/test/Transforms/debug-variable-char-len.fir
+++ b/flang/test/Transforms/debug-variable-char-len.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s -o - | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func @foo(%arg0: !fir.ref<!fir.char<1,?>> {fir.bindc_name = "str1"} , %arg1: !fir.ref<i64> {fir.bindc_name = "len1"} loc("/home/haqadeer/work/fortran/t1/../str.f90":1:1), %arg2: i64) {
%0 = fir.emboxchar %arg0, %arg2 : (!fir.ref<!fir.char<1,?>>, i64) -> !fir.boxchar<1>
%c4_i32 = arith.constant 4 : i32
diff --git a/flang/test/Transforms/debug-vector-type.fir b/flang/test/Transforms/debug-vector-type.fir
index 63846ce006c6c..d3e1f6ec28d0f 100644
--- a/flang/test/Transforms/debug-vector-type.fir
+++ b/flang/test/Transforms/debug-vector-type.fir
@@ -1,6 +1,6 @@
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
-module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
+module {
func.func private @foo1(%arg0: !fir.vector<20:bf16>)
// CHECK-DAG: #[[F16:.*]] = #llvm.di_basic_type<tag = DW_TAG_base_type, name = "real", sizeInBits = 16, encoding = DW_ATE_float>
// CHECK-DAG: #llvm.di_composite_type<tag = DW_TAG_array_type, name = "vector real (20)", baseType = #[[F16]], flags = Vector, sizeInBits = 320, elements = #llvm.di_subrange<count = 20 : i64>>
|
What about the other passes that call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please wait for @tblah.
A quick look seems to suggest that several cuda and loop versioning tests (two passes among others that use fir::support::getOrSetMLIRDataLayout()
) also include the dlti.dl_spec
. May be the same changes are applicable there as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the point raised by @tblah, LGTM too.
Thanks for the quick reviews!
I did notice that the loop versioning pass might potentially have the same issue. I'll take a more detailed look at other passes using that utility and see if we should be adding the dialect dependency to them. I'll make another PR with these changes, if I find any. |
The
AddDebugInfo
pass currently has a dependency on theDLTI
MLIR dialect caused by a call to thefir::support::getOrSetMLIRDataLayout()
utility function.This dependency is not captured in the pass definition. This patch adds the dependency and simplifies several unit tests that had to explicitly use the
DLTI
dialect to prevent the missing dependency from causing compiler failures.