-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][CIRGen][TBAA] Add support for scalar types (#1220)
- Loading branch information
1 parent
8d649fb
commit c94c04e
Showing
20 changed files
with
505 additions
and
58 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
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,38 @@ | ||
//===----------------------------------------------------------------------===// | ||
// TBAAAttr | ||
//===----------------------------------------------------------------------===// | ||
|
||
def CIR_TBAAAttr : CIR_Attr<"TBAA", "tbaa", []> { | ||
let summary = "CIR dialect TBAA base attribute"; | ||
} | ||
|
||
//===----------------------------------------------------------------------===// | ||
// TBAAScalarAttr | ||
//===----------------------------------------------------------------------===// | ||
|
||
def CIR_TBAAScalarAttr : CIR_Attr<"TBAAScalar", "tbaa_scalar", [], "TBAAAttr"> { | ||
let summary = "Describes a scalar type in TBAA with an identifier."; | ||
|
||
let parameters = (ins CIR_AnyScalarType : $type); | ||
|
||
let description = [{ | ||
Define a TBAA attribute. | ||
|
||
Example: | ||
```mlir | ||
// CIR_TBAAScalarAttr | ||
#tbaa_scalar = #cir.tbaa_scalar<type = !s32i> | ||
#tbaa_scalar1 = #cir.tbaa_scalar<type = !u32i> | ||
``` | ||
|
||
See the following link for more details: | ||
https://llvm.org/docs/LangRef.html#tbaa-metadata | ||
}]; | ||
|
||
let assemblyFormat = "`<` struct(params) `>`"; | ||
} | ||
|
||
def CIR_AnyTBAAAttr : AnyAttrOf<[ | ||
CIR_TBAAAttr, | ||
CIR_TBAAScalarAttr | ||
]>; |
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
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
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
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
Oops, something went wrong.