-
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.
This patch adds a new attribute `#cir.global_addr`` to the CIR dialect. This attribute is quite similar to `#cir.global_view`, except that the new attribute represents the address of the global variable as an integer instead of a pointer. And the new attribute does not have the "indecies" stuff. CIRGen would not generate this attribute. I'm adding this new attribute because it could be useful during ABI lowering. For example, when doing ABI lowering for a member function pointer constant, ItaniumABI needs to lower the constant into a `#cir.const_struct` with two fields, first of which is an integer that represents the address of a function. This is where we need this attribute.
- Loading branch information
Showing
4 changed files
with
142 additions
and
48 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