[llvm] [TableGen] Use a more efficient memory buffer for output (PR #123353)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 03:19:41 PST 2025


jayfoad wrote:

> I think we should use timestamp based approach rather than file comparison (see gcc's -MD/-MT/-MF/...). Not sure how difficult it would be to integrate it with cmake/bazel.

Not sure what you're suggesting. Those gcc options are to do with generating dependencies, but we already get this mostly right. E.g. if I touch `RISCV.td` and rebuild `llc`, only the RISCV backend gets rebuilt.

`-write-if-changed` is a separate mechanism that detects when an input `.td` file _has_ changed, but in a harmless way that does not affect the `.inc` files generated by tablegen, so other source files that depend on _them_ do not need to be rebuilt.

https://github.com/llvm/llvm-project/pull/123353


More information about the llvm-commits mailing list