-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[bazel] Replace gentbl with gentbl_cc_library #124996
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
Conversation
This file contains hidden or 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
LLVM has two tablegen generators: one in llvm/tblgen.bzl (`gentbl`, macro-based) and one in mlir/tblgen.bzl (`gentbl_cc_library`, rule-based). The `gentbl_cc_library` generator in MLIR has some advantages to being a rule, and at any rate, it seems better to just use the same tablegen rule everywhere instead of competing implementations.
aaronmondal
approved these changes
Jan 30, 2025
Member
aaronmondal
left a comment
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.
We should probably aim to remove the tblgen macro entirely at some point (in favor of a tblgen_toolchain + rules) and this moves us towards that 👍
slackito
approved these changes
Jan 30, 2025
rupprecht
added a commit
to rupprecht/Enzyme
that referenced
this pull request
Jan 30, 2025
Enzyme uses tablegen generators from both llvm/tblgen.bzl and mlir/tblgen.bzl. This consolidates usage so that we only use one of them (from MLIR). Later we may delete the llvm/tblgen.bzl entirely. This is mostly mechanical, but as a side effect, we need to adjust `includes` to pick up `bundled_includes.h`. It was probably relying on an `includes` config from the llvm/tblgen.bzl implementation that is no longer being provided. See also llvm/llvm-project#124996.
pashu123
pushed a commit
to iree-org/llvm-project
that referenced
this pull request
Feb 1, 2025
LLVM has two tablegen generators: one in llvm/tblgen.bzl (`gentbl`, macro-based) and one in mlir/tblgen.bzl (`gentbl_cc_library`, rule-based). The `gentbl_cc_library` generator in MLIR has some advantages to being a rule, and at any rate, it seems better to just use the same tablegen rule everywhere instead of competing implementations.
pashu123
pushed a commit
to iree-org/llvm-project
that referenced
this pull request
Feb 4, 2025
LLVM has two tablegen generators: one in llvm/tblgen.bzl (`gentbl`, macro-based) and one in mlir/tblgen.bzl (`gentbl_cc_library`, rule-based). The `gentbl_cc_library` generator in MLIR has some advantages to being a rule, and at any rate, it seems better to just use the same tablegen rule everywhere instead of competing implementations.
pashu123
pushed a commit
to iree-org/llvm-project
that referenced
this pull request
Feb 4, 2025
LLVM has two tablegen generators: one in llvm/tblgen.bzl (`gentbl`, macro-based) and one in mlir/tblgen.bzl (`gentbl_cc_library`, rule-based). The `gentbl_cc_library` generator in MLIR has some advantages to being a rule, and at any rate, it seems better to just use the same tablegen rule everywhere instead of competing implementations.
wsmoses
pushed a commit
to rupprecht/Enzyme
that referenced
this pull request
Feb 6, 2025
Enzyme uses tablegen generators from both llvm/tblgen.bzl and mlir/tblgen.bzl. This consolidates usage so that we only use one of them (from MLIR). Later we may delete the llvm/tblgen.bzl entirely. This is mostly mechanical, but as a side effect, we need to adjust `includes` to pick up `bundled_includes.h`. It was probably relying on an `includes` config from the llvm/tblgen.bzl implementation that is no longer being provided. See also llvm/llvm-project#124996.
wsmoses
pushed a commit
to EnzymeAD/Enzyme
that referenced
this pull request
Feb 6, 2025
* [bazel] Fully replace gentbl with gentbl_cc_library Enzyme uses tablegen generators from both llvm/tblgen.bzl and mlir/tblgen.bzl. This consolidates usage so that we only use one of them (from MLIR). Later we may delete the llvm/tblgen.bzl entirely. This is mostly mechanical, but as a side effect, we need to adjust `includes` to pick up `bundled_includes.h`. It was probably relying on an `includes` config from the llvm/tblgen.bzl implementation that is no longer being provided. See also llvm/llvm-project#124996. * Write generated files to subdirectories (matching where cmake puts them) and use strip_include_prefix to mirror how they're referenced. Avoids needing to use `includes = ["."]` which is overly broad, and leads to a build failure.
Mittagskogel
pushed a commit
to Mittagskogel/Enzyme
that referenced
this pull request
Feb 14, 2025
* [bazel] Fully replace gentbl with gentbl_cc_library Enzyme uses tablegen generators from both llvm/tblgen.bzl and mlir/tblgen.bzl. This consolidates usage so that we only use one of them (from MLIR). Later we may delete the llvm/tblgen.bzl entirely. This is mostly mechanical, but as a side effect, we need to adjust `includes` to pick up `bundled_includes.h`. It was probably relying on an `includes` config from the llvm/tblgen.bzl implementation that is no longer being provided. See also llvm/llvm-project#124996. * Write generated files to subdirectories (matching where cmake puts them) and use strip_include_prefix to mirror how they're referenced. Avoids needing to use `includes = ["."]` which is overly broad, and leads to a build failure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LLVM has two tablegen generators: one in llvm/tblgen.bzl (
gentbl, macro-based) and one in mlir/tblgen.bzl (gentbl_cc_library, rule-based). Thegentbl_cc_librarygenerator in MLIR has some advantages to being a rule, and at any rate, it seems better to just use the same tablegen rule everywhere instead of competing implementations.