-
Notifications
You must be signed in to change notification settings - Fork 85
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
[CIR][Lowering] Lower non-global constant arrays #171
Conversation
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. [ghstack-poisoned]
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: 0a85dde2244aa9e945d320f55b6667add5f9be60 Pull Request resolved: #171
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 with comments to address.
Note: This is indeed an interesting difference, if we forget about LLVM and think only about CIR for a moment, we're also not being uniform right now (my fault), given that const_struct attrs are used inline within cir.const and others are going through globals, at some point we need to migrate more.
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. [ghstack-poisoned]
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
@sitio-couto This diff is causing |
|
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: llvm/clangir#171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: llvm#171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: llvm#171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: #171
Lowers `cir.const` operations initialized with constant arrays to LLVM const operations. Also adds supports for `#const.array` with string literals. This implementation differs from Clang: it does not create a global for the constant array, nor uses memcpy to initialize the array. Instead, it stores a constant value directly into the stack where it is used. ghstack-source-id: af42e9a89a27360f58657803ea452d890d2f2324 Pull Request resolved: llvm/clangir#171
Stack from ghstack (oldest at bottom):
Lowers
cir.const
operations initialized with constant arrays to LLVMconst operations. Also adds supports for
#const.array
with stringliterals.
This implementation differs from Clang: it does not create a global for
the constant array, nor uses memcpy to initialize the array. Instead, it
stores a constant value directly into the stack where it is used.