Skip to content

[CIR][NFC] Cleanup: MLIRContext vs ASTContext #1217

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

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

dkolsen-pgi
Copy link
Collaborator

ClangIR CodeGen makes use of both mlir::MLIRContext and clang::ASTContext. Referring to these as just "context" can be ambiguous.

This change attempts to make the CodeGen code more clear by choosing better variable names. The change is almost entirely renaming: mostly change variables, parameters, and fields named context or ctx to mlirContext or astContext. There are some other renames having to do with contexts, and a small number of other drive-by fixes. (I considered also renaming functions named getContext(), but did not include that in this change.)

This is entirely code cleanup. There should be no behavior changes.

ClangIR CodeGen makes use of both `mlir::MLIRContext` and
`clang::ASTContext`. Referring to these as just "context" can be
ambiguous.

This change attempts to make the CodeGen code more clear by choosing
better variable names.  The change is almost entirely renaming: mostly
change variables, parameters, and fields named `context` or `ctx` to
`mlirContext` or `astContext`.  There are some other renames having to
do with contexts, and a small number of other drive-by fixes.  (I
considered also renaming functions named `getContext()`, but did not
include that in this change.)

This is entirely code cleanup.  There should be no behavior changes.
@bcardosolopes bcardosolopes changed the title [CIR] Cleanup: MLIRContext vs ASTContext [CIR][NFC] Cleanup: MLIRContext vs ASTContext Dec 9, 2024
@bcardosolopes bcardosolopes merged commit cfe7c63 into llvm:main Dec 9, 2024
6 checks passed
lanza pushed a commit that referenced this pull request Mar 18, 2025
ClangIR CodeGen makes use of both `mlir::MLIRContext` and
`clang::ASTContext`. Referring to these as just "context" can be
ambiguous.

This change attempts to make the CodeGen code more clear by choosing
better variable names. The change is almost entirely renaming: mostly
change variables, parameters, and fields named `context` or `ctx` to
`mlirContext` or `astContext`. There are some other renames having to do
with contexts, and a small number of other drive-by fixes. (I considered
also renaming functions named `getContext()`, but did not include that
in this change.)

This is entirely code cleanup.  There should be no behavior changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants