[llvm] cbe0e53 - [Matrix] Also run lowering during -O0.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 02:52:54 PDT 2020
Author: Florian Hahn
Date: 2020-07-16T10:51:31+01:00
New Revision: cbe0e539e79eaa30d7d0d6f39b9ea4e45f923141
URL: https://github.com/llvm/llvm-project/commit/cbe0e539e79eaa30d7d0d6f39b9ea4e45f923141
DIFF: https://github.com/llvm/llvm-project/commit/cbe0e539e79eaa30d7d0d6f39b9ea4e45f923141.diff
LOG: [Matrix] Also run lowering during -O0.
Currently the backends cannot lower the matrix intrinsics directly and
rely on the lowering to vector instructions happening in the middle-end.
At the moment, this means the backend crashes when matrix types
extension code is compiled with -O0, e.g.
http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O0-g/7902/
This patch enables also runs the lowering with -O0 in the middle-end as
a temporary solution. Long term, a lightweight version of the lowering
should run in the backend, on demand.
Added:
Modified:
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index d73d42c52074..24814370f57a 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -294,6 +294,13 @@ void PassManagerBuilder::populateFunctionPassManager(
if (LibraryInfo)
FPM.add(new TargetLibraryInfoWrapperPass(*LibraryInfo));
+ // The backends do not handle matrix intrinsics currently.
+ // Make sure they are also lowered in O0.
+ // FIXME: A lightweight version of the pass should run in the backend
+ // pipeline on demand.
+ if (EnableMatrix)
+ FPM.add(createLowerMatrixIntrinsicsPass());
+
if (OptLevel == 0) return;
addInitialAliasAnalysisPasses(FPM);
More information about the llvm-commits
mailing list