Details
- Reviewers
tejohnson mehdi_amini - Commits
- rGf5d1712189a2: IRGen: When loading the main module in the distributed ThinLTO backend, look…
rC293209: IRGen: When loading the main module in the distributed ThinLTO backend, look…
rL293209: IRGen: When loading the main module in the distributed ThinLTO backend, look…
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang/lib/CodeGen/BackendUtil.cpp | ||
---|---|---|
867 ↗ | (On Diff #85515) | Would it be better to have this in llvm (e.g. in BitcodeReader like getBitcodeModuleList), or do you anticipate that we will never need that functionality within llvm itself? |
clang/lib/CodeGen/CodeGenAction.cpp | ||
848 ↗ | (On Diff #85515) | What should happen if we have a multi-module bitcode file but no ThinLTOIndexFile? Right now I think that would error (with or without this patch), right? Do we instead want to compile the non-ThinLTO module, or compile the ThinLTO module without ThinLTO (which is what would happen if you passed a single-module bitcode file to clang without -fthinlto-index). |
clang/test/CodeGen/thinlto_backend.ll | ||
26 ↗ | (On Diff #85515) | Are we testing the right thing here? How do we know we have loaded the correct module when passed an empty index file which causes us to drop to non-ThinLTO compilation with -ignore-empty-index-file? Maybe that handling is later, but it isn't clear from this test - can you instead test using an index file that enables ThinLTO compilation? |
clang/include/clang/CodeGen/BackendUtil.h | ||
---|---|---|
51 ↗ | (On Diff #85515) | Yes, it's what clang-format does though. |
clang/lib/CodeGen/BackendUtil.cpp | ||
867 ↗ | (On Diff #85515) | Maybe -- at this point I feel that we are shoehorning far too much thinlto backend functionality into clang and that we should think about making it into a separate tool. If we ever create such a tool, we can easily move this function there. |
clang/lib/CodeGen/CodeGenAction.cpp | ||
841 ↗ | (On Diff #85515) | Done for this function as well as loadModule in r292970 and r292972. |
848 ↗ | (On Diff #85515) | Yes, we'd error out in that case, and I think that's fine. Basically at the moment we only support passing ThinLTO output to either the linker or the thin backend, and anything else is unsupported. |
clang/test/CodeGen/thinlto_backend.ll | ||
26 ↗ | (On Diff #85515) | Done, and split out into a separate test. |