Forward -enable-matrix flag to the LTO plugin because matrix intrinsics lowering happens at link time in thinLTO.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang/test/Driver/clang_f_opts.c | ||
|---|---|---|
| 615 ↗ | (On Diff #534557) | Don't use clang_f_opts.c. Pick a more a specific aix-* test file. |
| clang/test/Driver/clang_f_opts.c | ||
|---|---|---|
| 615 ↗ | (On Diff #534557) | My thought stays the same. We probably should find another test file for enable-matrix. |
| clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
|---|---|---|
| 683 | The lowering pass is added in buildModuleOptimizationPipeline function: if (EnableMatrix) {
OptimizePM.addPass(LowerMatrixIntrinsicsPass());
OptimizePM.addPass(EarlyCSEPass());
}Here's the PassBuilder pipelines for thin and full LTO: thinLTO compile
buildThinLTOPreLinkDefaultPipeline
thinLTO link:
buildThinLTODefaultPipeline
buildModuleOptimizationPipeline
fullLTO compile:
buildLTOPreLinkDefaultPipeline
buildPerModuleDefaultPipeline
buildModuleOptimizationPipeline
fullLTO link:
buildLTODefaultPipeline | |
| clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
|---|---|---|
| 683 | // Matrix intrinsic lowering happens at link time with ThinLTO. Enable LowerMatrixIntrinsicsPass, which is transitively called by buildThinLTODefaultPipeline under EnableMatrix. | |
With regular LTO, when does it happen?
The canonical spelling for ThinLTO is "ThinLTO".