[PATCH] D84180: [Matrix] Add LowerMatrixIntrinsics to the NPM
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 09:32:35 PDT 2020
fhahn added inline comments.
================
Comment at: clang/test/CodeGen/matrix-lowering-opt-levels.c:7
+// RUN: %clang -Os -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang -Oz -fenable-matrix -S -emit-llvm %s -o - | FileCheck %s
+
----------------
SjoerdMeijer wrote:
> fhahn wrote:
> > Might be good to add new-pm run-lines as well.
> The many mysteries of the NPM..... Now looking I guess you mean adding -fexperimental-new-pass-manager (I was working with a build with the NPM enabled/built).
adding lines with ` -fexperimental-new-pass-manager ` is what I mean. Not sure if that works with NPM enabled builds though.
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:933
+
+ EarlyFPM.addPass(LowerMatrixIntrinsicsPass());
EarlyFPM.addPass(SimplifyCFGPass());
----------------
SjoerdMeijer wrote:
> fhahn wrote:
> > SjoerdMeijer wrote:
> > > fhahn wrote:
> > > > I think we should keep this under the same enable-matrix flag like in the old pass manager for now and remove the flag for both when the pass only gets run on functions that contain matrix intrinsics.
> > > Ah yeah, cheers, forgot about that! Will add that.
> > Is there reason this is run at a different position to the legacy pass manager? If not, I think we should run them at roughly the same location, to minimize differences between new and old PM. In the old pass manager, we run before the VectorizerStart callbacks. Here this would be around line 1102 I think.
> Since the intrinsics are generated by Clang I thought lowering them the earlier the better. And in the old PM, EarlyCSE was run after it, so that's why I put it right here just before EarlyCSE, but wouldn't mind moving it to where you suggested.
Yes, EarlyCSE runs after LowerMatrixIntrinsics in addition, if EnableMatrix. I think it's not worth diverging in the new PM. If there's a better position, we should use it for both new PM/LegacyPM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84180/new/
https://reviews.llvm.org/D84180
More information about the llvm-commits
mailing list