[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-09-22 Thread Florian Hahn via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGea21d688dc0a: [Matrix] Emit assumption that matrix indices are valid. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-09-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. All required changes to make use of this have recently landed or are ready to land. So I am going to commit this momentarily. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 __

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-08-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 365959. fhahn added a comment. rebased after latest changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CG

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-06-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 352108. fhahn added a comment. In D102478#2817768 , @erichkeane wrote: > Just a couple of nits here, basically see how much we can put in the 'cheap > to check' branch. Thanks! I moved the suggested bits inside the t

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-06-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Just a couple of nits here, basically see how much we can put in the 'cheap to check' branch. Comment at: clang/lib/CodeGen/CGExpr.cpp:1944 +llvm::Value *Idx = LV.getMatrixIdx(); +const auto MatTy = LV.getType()->getAs(); +llvm::MatrixBu

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-06-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 348357. fhahn added a comment. Fix failing clang/test/CodeGenObjC/matrix-type-operators.m. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 Files: clang/lib/CodeGen/CG

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 348212. fhahn marked an inline comment as done. fhahn added a comment. Fix clang-tidy warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 Files: clang/lib/CodeG

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: llvm/include/llvm/IR/MatrixBuilder.h:242 +auto *Cmp = B.CreateICmpULT(Idx, NumElts); +if (!isa(Cmp)) { + Function *TheFn = rjmccall wrote: > xbolva00 wrote: > > Prefer e

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 348210. fhahn added a comment. Thanks for the comments! Updates: - Only emit assumptions for optimized builds; the assumes are not helpful for unoptimized builds - Use builder::CreateAssumption instead of manually constructing assume calls - Add assert that c

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Do you want to generate these even at -O0? Comment at: llvm/include/llvm/IR/MatrixBuilder.h:242 +auto *Cmp = B.CreateICmpULT(Idx, NumElts); +if (!isa(Cmp)) { + Function *TheFn = xbolva00 wrote: > Prefer early exit? Should

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/include/llvm/IR/MatrixBuilder.h:245 + Intrinsic::getDeclaration(getModule(), Intrinsic::assume); + B.CreateCall(TheFn->getFunctionType(), TheFn, {Cmp}, Name); +} B.CreateAssumption(Cmp) may work w

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/include/llvm/IR/MatrixBuilder.h:242 +auto *Cmp = B.CreateICmpULT(Idx, NumElts); +if (!isa(Cmp)) { + Function *TheFn = Prefer early exit? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 345703. fhahn added a comment. Undo unrelated changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102478/new/ https://reviews.llvm.org/D102478 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprS

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 345702. fhahn added a comment. Herald added a subscriber: hiraditya. Thanks for taking a look! I added a phase ordering test and updated the pipeline tests as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, anemet, rsmith, erichkeane. Herald added subscribers: dexonsmith, tschuett. fhahn requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. The matrix extension requires the indices