-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Improve llvm-config.h to record which target is configured or not #71164
Improve llvm-config.h to record which target is configured or not #71164
Conversation
Created using spr 1.3.4
Before this change,. toggling on or off a target required building fairly few files. Now it's a full rebuild. Any chance we could use a different approach here? |
Is this a common thing to switch back and forth? Also isn’t ccache good enough cases where one would want to back and forth? |
Actually: the header change will invalidate ccache |
Thinking a bit more about this: seems to me that the underlying problem with respect to caching and rebuilding is that the llvm-config.h file is monolithic and every flag adds to the burden. |
That would solve the issue, however, that's a big refactor. How about, just creating |
I don't see anything more special about these than any other flags right now though. |
You're right, I was just proposing avoiding a bigger refactor as splitting it means going through each include of |
Splitting more would be nice, but doing the smaller thing might be easier. |
I do it several times a week at least. I usually only build with host arch, and if I need to enable an additional arch to debug a per-arch thing I turn on that arch. That used to be very quick, and now it isn't. (As you say, it's a full rebuild without any cache hits.) Maybe it could be a generated header in mlir for gpu targets only? Then it wouldn't affect me at all. Putting it in llvm-config.h just because the file already exists seems a bit weird – half of llvm-config.h are these defines now. |
I do this as well, but it hardly a frequent thing that I break another target. But then I don't work on SelectionDAG either (but if I was, I would keep all the targets enabled all the time: better ccache and better incremental rebuild anyway)
Does not make sense to me: this isn't an MLIR settings...
Seems to me like this is the unfortunate design of llvm-config.h... Please take a look at #71273 ! |
These macro can help guarding some tests and other section of code
which rely on detecting if a particular target is available. This
is common the MLIR codegeneration for GPU targets for example.