-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[Bazel] Add more llvm tools #163228
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
[Bazel] Add more llvm tools #163228
Conversation
|
|
||
| cc_binary( | ||
| name = "llvm-sim", | ||
| testonly = True, |
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.
Are these tools really just for tests? They seem more like general purpose utils, which happen to be useful for tests.
OTOH, there's not too much harm in marking this testonly. I'd be fine adding them like this and then removing the testonly attr later if we need to use it outside of a testing context.
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.
Thanks! llvm-sim is added because it's configured in the lit.cfg.py:
llvm-project/llvm/test/lit.cfg.py
Line 268 in 894eaf4
| "llvm-sim", |
|
|
||
| cc_binary( | ||
| name = "llvm-ctxprof-util", | ||
| testonly = True, |
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.
The commit description in a737b87 explicitly describes this as a test tool, so this one is definitely OK.
Adding llvm-ir2vec, llvm-ctxprof-util (and llvm-sim) in the Bazel configs. llvm-ctxprof-util and llvm-ir2vec are used in several LIT unit tests, and the missing binary is causing unit test failures. llvm-ctxprof-util: https://github.com/llvm/llvm-project/blob/15cde999d47c3edc7647faf5fd967f5d5d88416a/llvm/test/Analysis/CtxProfAnalysis/flatten-icp.ll#L2 llvm-ir2vec: https://github.com/llvm/llvm-project/blob/55d4e92c8821d5543469118a76fe38db866377b7/llvm/utils/mlgo-utils/IR2Vec/generateTriplets.py#L60 llvm-sim: https://github.com/llvm/llvm-project/blob/894eaf481542adefde861a7e39f769f21d3f4fa4/llvm/test/lit.cfg.py#L268
Adding llvm-ir2vec, llvm-ctxprof-util (and llvm-sim) in the Bazel configs. llvm-ctxprof-util and llvm-ir2vec are used in several LIT unit tests, and the missing binary is causing unit test failures. llvm-ctxprof-util: https://github.com/llvm/llvm-project/blob/15cde999d47c3edc7647faf5fd967f5d5d88416a/llvm/test/Analysis/CtxProfAnalysis/flatten-icp.ll#L2 llvm-ir2vec: https://github.com/llvm/llvm-project/blob/55d4e92c8821d5543469118a76fe38db866377b7/llvm/utils/mlgo-utils/IR2Vec/generateTriplets.py#L60 llvm-sim: https://github.com/llvm/llvm-project/blob/894eaf481542adefde861a7e39f769f21d3f4fa4/llvm/test/lit.cfg.py#L268
Adding llvm-ir2vec, llvm-ctxprof-util (and llvm-sim) in the Bazel configs. llvm-ctxprof-util and llvm-ir2vec are used in several LIT unit tests, and the missing binary is causing unit test failures.
llvm-ctxprof-util:
llvm-project/llvm/test/Analysis/CtxProfAnalysis/flatten-icp.ll
Line 2 in 15cde99
llvm-ir2vec:
llvm-project/llvm/utils/mlgo-utils/IR2Vec/generateTriplets.py
Line 60 in 55d4e92