mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 22:06:06 +00:00

Unifies parsing and printing for DLTI attributes. Introduces a format of `#dlti.attr<key1 = val1, ..., keyN = valN>` syntax for all queryable DLTI attributes similar to that of the DictionaryAttr, while retaining support for specifying key-value pairs with `#dlti.dl_entry` (whether to retain this is TBD). As the new format does away with most of the boilerplate, it is much easier to parse for humans. This makes an especially big difference for nested attributes. Updates the DLTI-using tests and includes fixes for misc error checking/ error messages.
14 lines
604 B
Plaintext
14 lines
604 B
Plaintext
// Test that tco tool preserves incoming llvm.data_layout and creates a
|
|
// related dlti.dl_spec attribute. This tests a weird datalayout where
|
|
// i64 would be 128 bit aligned.
|
|
// RUN: tco -emit-fir %s | FileCheck %s
|
|
|
|
module attributes {llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:128-i128:128-f80:128-n8:16:32:64-S128"} {
|
|
}
|
|
// CHECK: module attributes {
|
|
// CHECK-SAME: dlti.dl_spec = #dlti.dl_spec<
|
|
// ...
|
|
// CHECK-SAME: i64 = dense<128> : vector<2xi64>,
|
|
// ...
|
|
// CHECK-SAME: llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:128-i128:128-f80:128-n8:16:32:64-S128"
|