[PATCH] D42978: Make march/target-cpu print a note with the list of valid values

2018-02-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a reviewer: rengolin. fhahn added a comment. I like the idea. However for all backends, except Arm and AArch64, we would have to maintain another list of CPU names. At least for the targets which implement `isValidCPUName`, we could add an array with valid names and use that. That'

[PATCH] D42978: Make march/target-cpu print a note with the list of valid values

2018-02-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Also with tests for each backend, this diff will get quite big. As this is opt-in, it might make sense to enable backends separately. Repository: rC Clang https://reviews.llvm.org/D42978 ___ cfe-commits mailing list cfe-co

[PATCH] D42978: Make march/target-cpu print a note with the list of valid values for ARM

2018-02-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In https://reviews.llvm.org/D42978#1001616, @Hahnfeld wrote: > I think this means that the Clang test needs to be updated whenever somebody > adds an architecture to LLVM? Maybe just test that Clang emits a note and > don't check which values it prints? These should be ch

[PATCH] D42978: Make march/target-cpu print a note with the list of valid values for ARM

2018-02-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM thanks. Please wait a day or so with committing so others can raise additional concerns. Comment at: test/Misc/target-invalid-cpu-note.c:8 +// AARCH64: note: valid target

[PATCH] D33448: [CodeGen] Add thumb-mode to function target-features for arm/thumb triples.

2017-05-24 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In https://reviews.llvm.org/D33448#762410, @echristo wrote: > I probably would have added this as a feature in ARMTargetInfo similar to > CRC/soft-float/etc. > > Thoughts? Do you mean ARMTargetMachine::getSubtargetImpl (https://github.com/llvm-mirror/llvm/blob/master/li

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-05-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 100222. fhahn retitled this revision from "[CodeGen] Add thumb-mode to function target-features for arm/thumb triples." to "[CodeGen] Add thumb-mode to target-features for arm/thumb triples.". fhahn edited the summary of this revision. fhahn added a comment. M

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-05-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. @echristo lib/Basic/Targets.cpp is indeed a much better place to add thumb-mode to the target features, thanks for pointing me in the right direction! https://reviews.llvm.org/D33448 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 100371. fhahn added a comment. Updated the comment, thanks for the reviewing this patch! https://reviews.llvm.org/D33448 Files: lib/Basic/Targets.cpp test/CodeGen/arm-long-calls.c test/CodeGen/arm-no-movt.c test/CodeGen/arm-target-features.c test/Co

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I'll hold off merging this patch until https://reviews.llvm.org/D33436 lands, which fixes a problem with mixed ARM/Thumb codegen https://reviews.llvm.org/D33448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-05-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. Herald added subscribers: kristof.beyls, javed.absar, aemerson. This patch adds support for the target("arm") and target("thumb") attributes, which can be used to force the compiler to generated ARM or Thumb code for a function. In LLVM, ARM or Thumb code generation c

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-05-31 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 100880. fhahn added a comment. reworded comment and improved test case to ensure only a single thumb-mode attribute is added. https://reviews.llvm.org/D33721 Files: include/clang/Basic/Attr.td test/CodeGen/arm-target-attr.c Index: test/CodeGen/arm-targ

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 100994. fhahn added a comment. Agreed, ARMTargetInfo is a much better place to do the conversion! Moved attribute conversion to ARMTargetInfo::initFeatureMap. Unfortunately FeaturesVec is const, so creating a mutable clone seemed the most straight-forward thi

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: lib/Basic/Targets.cpp:5439-5442 +// [-|+]thumb-mode target features respectively. +std::vector UpdatedFeaturesVec(FeaturesVec); +for (auto &Feature : UpdatedFeaturesVec) { + if (Feature.compare("+arm") == 0) --

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-06-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I've discovered another problem while doing an ARM bootstrap build with mixed ARM/Thumb codegen. With https://reviews.llvm.org/D33898 , the bootstrap build with mixed ARM/Thumb code works properly. After that's in I'll finally commit this patch. https://reviews.llvm.org

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 101427. fhahn marked an inline comment as done. fhahn added a comment. use else if https://reviews.llvm.org/D33721 Files: lib/Basic/Targets.cpp test/CodeGen/arm-target-attr.c Index: test/CodeGen/arm-target-attr.c

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-06-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 101687. fhahn added a comment. rebased https://reviews.llvm.org/D33448 Files: lib/Basic/Targets.cpp test/CodeGen/arm-long-calls.c test/CodeGen/arm-no-movt.c test/CodeGen/arm-target-features.c test/CodeGen/arm-thumb-mode-target-feature.c Index: test

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I'll commit this for you Paul https://reviews.llvm.org/D40299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-20 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321183: [Complex] Don't use __div?c3 when building with fast-math. (authored by fhahn, committed by ). Repository: rC Clang https://reviews.llvm.org/D40299 Files: lib/CodeGen/CGExprComplex.cpp tes

[PATCH] D60516: [LTO] Add plumbing to save stats during LTO on MacOS.

2019-04-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: anemet, tejohnson, thegameg. Herald added subscribers: cfe-commits, dang, dexonsmith, steven_wu, hiraditya, inglorion, mehdi_amini. Herald added projects: clang, LLVM. Gold and ld on Linux already support saving stats, but the infrastructure is

[PATCH] D60516: [LTO] Add plumbing to save stats during LTO on Darwin.

2019-04-17 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/D60516/new/ https://reviews.llvm.org/D60516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D60516: [LTO] Add plumbing to save stats during LTO on Darwin.

2019-04-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added a comment. In D60516#1470518 , @tejohnson wrote: > LGTM with a minor fix needed below. > > Darwin still uses the old LTO API, which is why the lto Config based handling > in the new LTO API (LTO.h/LTO.cp

[PATCH] D60516: [LTO] Add plumbing to save stats during LTO on Darwin.

2019-04-19 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358753: [LTO] Add plumbing to save stats during LTO on Darwin. (authored by fhahn, committed by ). Changed prior to commit: https://reviews.llvm.org/D60516?vs=194524&id=195873#toc Repository: rL LLVM

[PATCH] D61939: AArch64: add support for arm64_23 (ILP32) IR generation

2019-05-30 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Hi Tim. Would it be possible to split this in the 'trivial' changes (extending the triple handling for example) and the arm64_32 related changes to size, ABI stuff and so on? The trivial changes look good to me and by splitting them off people can focus on reviewing the

[PATCH] D61939: AArch64: add support for arm64_32 (ILP32) triple and -arch option.

2019-06-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61939/new/ https://reviews.llvm.org/D61939 _

[PATCH] D65776: [Clang] Pragma vectorize_predicate implies vectorize

2019-08-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D65776#1615834 , @Meinersbur wrote: > Mmmh, I would have expected this to work the same way as `vectorize_width`. > According to the docs: > > > The following example implicitly enables vectorization and interleaving by > > spec

[PATCH] D65776: [Clang] Pragma vectorize_predicate implies vectorize

2019-08-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added reviewers: hfinkel, reames. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks! Please wait a few days with committing, in case any additional comments come in via the mailing list. CHANGES SINCE LAST ACTION https://r

[PATCH] D66290: [clang] Pragma vectorize_width() implies vectorize(enable)

2019-08-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. > As also pointed out in the discussion on the cfe dev list, this is probably a > bit > of a silly combination: > > > vectorize(enable) vectorize_width(1) > > > but it could still mean that the vectorizer interleaves. So, with this > simplification, disabl

[PATCH] D66290: [clang] Pragma vectorize_width() implies vectorize(enable)

2019-08-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I think it would be slightly better to split off the change to disable vectorization via `llvm.loop.vectorize.enable=false` instead of width=1. This changes the behaviour from "disable vectorization, but allow interleaving in the vectoriser" to "disable the vectoriser". I

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: jfb, rsmith, rjmccall, efriedma, hfinkel. Herald added subscribers: llvm-commits, dexonsmith, hiraditya. Herald added projects: clang, LLVM. I am not sure if this is the best way to do the matching and would appreciate any pointers for improving

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 207754. fhahn added a comment. Strip away llvm changes, use ABIAlignment for address space. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64128/new/ https://reviews.llvm.org/D64128 Files: clang/lib/CodeGen/CGE

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2025 + + auto *CE = dyn_cast(peelParens(BO->getLHS())); + if (!CE || CE->getCastKind() != CK_PointerToIntegral) xbolva00 wrote: > BO->getLHS()->IgnoreParens() ? That's very useful, than

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 207761. fhahn marked 2 inline comments as done. fhahn added a comment. Use IgnoreParens(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64128/new/ https://reviews.llvm.org/D64128 Files: clang/lib/CodeGen/CGEx

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Thanks for the quick responses and the helpful comments. Thank you very much Hal, for summarizing the argument from previous discussions. My initial understanding indeed was that by generating ptrmask directly for C/C++ expressions, we can circumvent the issues that come

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D64128#1569836 , @hfinkel wrote: > In D64128#1569817 , @rjmccall wrote: > > > The pointer/integer conversion is "implementation-defined", but it's not > > totally unconstrained. C notes t

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D64128#1572504 , @rjmccall wrote: > I would be opposed to any addition of a `-f` flag for this absent any > evidence that it's valuable for some actual C code; this patch appears to be > purely speculative. I certainly don't th

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2019-07-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D64128#1576391 , @rjmccall wrote: > I wouldn't favor adding something really obscure that was only useful for > clang, but I think builtins to set and clear mask bits while promising to > preserve object-reference identity would

[PATCH] D57265: [PM/CC1] Add -f[no-]split-cold-code CC1 options to toggle splitting

2019-09-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. This seems fine to me. IIUC the only potential drawback with the old pass manager is that we potentially have to run the required passes unconditionally, even if we do not use them. Vedant, did you have a chance to check the impact on overall compile time? ==

[PATCH] D45771: [Driver] Support for -save-stats in AddGoldPlugin.

2018-04-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: tejohnson, mehdi_amini, compnerd. Herald added a subscriber: emaste. fhahn added a dependency: D45531: [LTO] Add stats-file option to LTO/Config.h.. This patch updates AddGoldPlugin to pass stats-file to the Gold plugin, if -save-stats is passed.

[PATCH] D45771: [Driver] Support for -save-stats in AddGoldPlugin.

2018-04-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 143292. fhahn marked 2 inline comments as done. fhahn added a comment. Thank you very much for the review and the excellent suggestions. I simplified getStatsFileName, added a doxygen comment and changed the arguments of AddGoldPlugin as suggested https://re

[PATCH] D45771: [Driver] Support for -save-stats in AddGoldPlugin.

2018-04-20 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330422: [Driver] Support for -save-stats in AddGoldPlugin. (authored by fhahn, committed by ). Changed prior to commit: https://reviews.llvm.org/D45771?vs=143292&id=143299#toc Repository: rC Clang h

[PATCH] D46030: [TargetInfo] Sort target features before passing them to the backend

2018-04-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. Thanks Eli, LGTM! Comment at: lib/Basic/Targets.cpp:641 Opts->Features.push_back((F.getValue() ? "+" : "-") + F.getKey().str()); + llvm::sort(Opts->Features.begin(), Opts

[PATCH] D48931: [Driver,AArch64] Add support for -mcpu=native.

2018-07-06 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336429: [Driver,AArch64] Add support for -mcpu=native. (authored by fhahn, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48931 Files: lib/Dri

[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

2020-05-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn abandoned this revision. fhahn added a comment. In D64128#1578916 , @fhahn wrote: > In D64128#1576391 , @rjmccall wrote: > > > I wouldn't favor adding something really obscure that was only useful for > > cla

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 265728. fhahn marked 4 inline comments as done. fhahn added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. In D76791#2048387 , @rjmccall wrote: > Sorry for the slow review; I'm getting

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/AST/Expr.cpp:3859 + + auto *SubscriptE = dyn_cast(this); + return SubscriptE rjmccall wrote: > You need to `IgnoreParens()` here. This code is now gone. ===

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 265750. fhahn added a comment. Add clarifying comment to ActOnMatrixSubscriptExpr calls in ActOnArraySubscriptExpr. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76791/new/ https://reviews.llvm.org/D76791 Files

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/AST/Expr.h:2648 +/// MatrixSubscriptExpr - Matrix subscript expression for the MatrixType +/// extension. +class MatrixSubscriptExpr : public Expr { rjmccall wrote: > Oh, that's interesting. So you've

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 266205. fhahn marked 7 inline comments as done. fhahn added a comment. Address John's latest comments, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76791/new/ https://reviews.llvm.org/D76791 Files: cl

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 266303. fhahn marked an inline comment as done. fhahn added a comment. Add support for user-defined conversion function, use PrepareScalarCast and add overloads for matrix +/- operators. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:11989 + else +return false; + rjmccall wrote: > I would suggest checking some preconditions and then just calling > `PrepareScalarCast`. > > You should allow implicit conversions from cla

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 266602. fhahn marked 10 inline comments as done. fhahn added a comment. Addressed latest round of comments, thanks! Changes include: - OK_MatrixComponent now behaves like OK_VectorComponent with respect to taking address/reference. - Look through non-overload

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/AST/Expr.h:2648 +/// MatrixSubscriptExpr - Matrix subscript expression for the MatrixType +/// extension. +class MatrixSubscriptExpr : public Expr { rjmccall wrote: > fhahn wrote: > > rjmccall wrote: >

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:4650 + (Base->isTypeDependent() || RowIdx->isTypeDependent() || + (ColumnIdx && ColumnIdx->isTypeDependent( +return new (Context) MatrixSubscriptExpr(Base, RowIdx, ColumnIdx,

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 266643. fhahn marked 4 inline comments as done. fhahn added a comment. Addressed latest comments: - Handle placeholder types in CreateBuiltinMatrixSubscriptExpr and do not limit to non-overload types there. - Check !MatrixSubscriptExpr instead of ParenExpr. -

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:8587 +if (S.Context.hasSameType(M1, M2)) + AddCandidate(M1, M2); + rjmccall wrote: > I don't think this works if one side or the othe

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-27 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 266675. fhahn added a comment. Fixed overload candidates, use copy instead of const reference, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76793/new/ https://reviews.llvm.org/D76793 Files: clang/incl

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-28 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 266842. fhahn marked 4 inline comments as done. fhahn added a comment. Use initialization step for all conversions (including for arithemtic types), add & call separate addMatrixBinaryArithmeticOverloads Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-28 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:11989 + else +return false; + rjmccall wrote: > fhahn wrote: > > rjmccall wrote: > > > I would suggest checking some preconditions and then just calling > > > `PrepareScalarCast`. > > > >

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-28 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:12112 +return InvalidOperands(Loc, OriginalLHS, OriginalRHS); + } + rjmccall wrote: > You need to not actually apply this conversion to the LHS if this is a > compound assignment. You can

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-28 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 267061. fhahn marked 7 inline comments as done. fhahn added a comment. Updated tests to use more targeted checks, fix typo and rebased on top of master (so this change can be applied before D76791 . Repository: rG LLVM Gith

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 267296. fhahn marked 5 inline comments as done. fhahn added a comment. Thanks for the latest round of comments! All expect one should be addressed. For the remaining comment, I responded inline. Also, it would be great if you could let me know if the updated c

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-29 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6f6e91d19337: [Matrix] Implement + and - operators for MatrixType. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76793/new/ https://rev

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-05-29 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D76791#2063926 , @rjmccall wrote: > > Yes at the moment I think we want to limit element wise > > accesses/modifications to go through the access operator only, to guarantee > > we can rely on the vector forms in codegen. > > >

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-06-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3787 + ColIdx->getType()->getScalarSizeInBits()); + llvm::Type *IntTy = llvm::IntegerType::get(getLLVMContext(), MaxWidth); + RowIdx = Bui

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-06-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 267601. fhahn added a comment. Force index types to size_t in Sema, remove code to extend index values in Codegen. Update tests to check more targeted IR. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76791/new/

[PATCH] D76794: [Matrix] Implement * binary operator for MatrixType.

2020-06-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 267627. fhahn added a comment. Ping :) Updated the patch to include the feedback from D76793 (adding overloads, conversions, more targeted tests) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-06-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added a comment. Thanks for all the feedback John! Comment at: clang/lib/CodeGen/CGExpr.cpp:3787 + ColIdx->getType()->getScalarSizeInBits()); + llvm::Type *IntTy = llvm::IntegerType::get(getLLVMContext

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-06-01 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f3f88d2f50d: [Matrix] Implement matrix index expressions ([][]). (authored by fhahn). Changed prior to commit: https://reviews.llvm.org/D76791?vs=267601&id=267701#toc Repository: rG LLVM Github Mono

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-06-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:4738-4739 +bool ConversionOk = tryConvertToTy(*this, Context.getSizeType(), &ConvExpr); +assert(ConversionOk && + "should be able to convert any integer

[PATCH] D67833: [OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime

2020-07-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I think this change introduced the following warnings, where `auto &` is used for types that are always copied. It would be great if you could take a look. lvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp:8011:24: warning: loop variable 'L' is always a copy because the

[PATCH] D84180: [Matrix] Add LowerMatrixIntrinsics to the NPM

2020-07-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Awesome, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84180/new/ https://reviews.llvm.org/D84180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 254861. fhahn added a comment. Specify that standard conversion rules do not apply to assignments for matrix types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 Files

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 255341. fhahn added a comment. Update standard conversion wording as suggested by @rjmccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 Files: clang/docs/LanguageEx

[PATCH] D77058: [Clang] Add llvm.loop.unroll.disable to loops with -fno-unroll-loops.

2020-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping. @tejohnson are you happy with this approach, given that it sounds good to @dexonsmith as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77058/new/ https://reviews.llvm.org/D77058 __

[PATCH] D77058: [Clang] Add llvm.loop.unroll.disable to loops with -fno-unroll-loops.

2020-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D77058#1964427 , @Meinersbur wrote: > Note that loop-metadata is best-effort only and may be forgotten in the > optimization pipeline. Agreed, that can be a potential issue (I tried to note that in the description), but I thin

[PATCH] D77058: [Clang] Add llvm.loop.unroll.disable to loops with -fno-unroll-loops.

2020-04-07 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG338be9c59527: [Clang] Add llvm.loop.unroll.disable to loops with -fno-unroll-loops. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77058/

[PATCH] D77540: [PATCH] [ARM]: Armv8.6-a Matrix Mul Asm and Intrinsics Support

2020-04-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. This patch is quite big and I think it would be easier to review if it would be split up into distinct clang/llvm parts and maybe NEON/SVE parts on the LLVM side. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:71 + +// +sve implies +f32mm

[PATCH] D77540: [PATCH] [ARM]: Armv8.6-a Matrix Mul Asm and Intrinsics Support

2020-04-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D77540#1970034 , @LukeGeeson wrote: > In D77540#1969873 , @fhahn wrote: > > > This patch is quite big and I think it would be easier to review if it > > would be split up into distinct cla

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/docs/MatrixSupport.rst:254 + +Example +=== SjoerdMeijer wrote: > Hi Florian, just reading this for the first time, this is cool stuff, and > just a drive-by comment: > >

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/docs/MatrixSupport.rst:3 +Matrix Support +== + rjmccall wrote: > This extension should be called something like "Matrices" or "Matrix Types". > The "X Support" name makes it sound like it's a suppor

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257025. fhahn marked 15 inline comments as done. fhahn added a comment. Address @rjmccall comments. In D76612#1975719 , @rjmccall wrote: > Scanned through the first bit. Thanks a lot! I hope I managed to address the c

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/docs/MatrixSupport.rst:39 + +Future Work: Initialization syntax. + rjmccall wrote: > Maybe break the TODOs here into their own sections, which would come much > later. Done, I've moved the TODOs to a TODO section ju

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257115. fhahn marked 10 inline comments as done. fhahn added a comment. Address latest comments, thanks again! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 Files: cl

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/docs/MatrixTypes.rst:79 + floating point type, convert the integer or floating point operand to the + underlying element type of the operand of matrix type. + rjmccall wrote: > You should standardize on one term an

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257253. fhahn marked 8 inline comments as done. fhahn added a comment. Address latest comments, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 Files: clang/doc

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257259. fhahn marked an inline comment as done. fhahn added a comment. Rename __builtin_matrix_columnwise_{load,store} => __builtin_matrix_column_major_{load,store} Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257304. fhahn added a comment. Fix typo, remove a 2 places where `underlying` element type was used, move C portion of the example to LanguageExtensions.rst, drop the rest of the example. : Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257309. fhahn added a comment. Drop another instance of underlying element type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 Files: clang/docs/LanguageExtensions.rs

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 3 inline comments as done. fhahn added inline comments. Comment at: clang/docs/MatrixTypes.rst:12 +fixed-size matrices as language values and perform arithmetic on them. + +This feature is currently experimental, and both its design and its SjoerdMei

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/docs/MatrixTypes.rst:27 +internal layout, overall size and alignment are implementation-defined. +A *matrix element type* must be a real type (as in C99 6.2.5p17) excluding +enumeration types o

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/docs/MatrixTypes.rst:79 + floating point type, convert the integer or floating point operand to the + underlying element type of the operand of matrix type. + rjmccall wrote: > fhahn wrote: > > rjmccall wrote: > >

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 257741. fhahn marked 3 inline comments as done. fhahn added a comment. Update list of types excluded from real types, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D766

[PATCH] D81138: [SemaOverload] Use iterator_range to iterate over VectorTypes (NFC).

2020-06-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, arphaman, jfb, Bigcheese. Herald added a subscriber: dexonsmith. Herald added a project: clang. We can simplify the code a bit by using iterator_range instead of plain iterators. Matrix type support here (added in 6f6e91d19337

[PATCH] D72778: [Matrix] Add __builtin_matrix_transpose to Clang.

2020-06-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 268569. fhahn added a comment. Ping. Simplified code and update tests to use more targeted check lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72778/new/ https://reviews.llvm.org/D72778 Files: clang/in

[PATCH] D81138: [SemaOverload] Use iterator_range to iterate over VectorTypes (NFC).

2020-06-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D81138#2074313 , @rjmccall wrote: > Thanks, LGTM. (But you can use QualType by value.) Thanks, changed in the committed version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D811

[PATCH] D81138: [SemaOverload] Use iterator_range to iterate over VectorTypes (NFC).

2020-06-04 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG714e84be4615: [SemaOverload] Use iterator_range to iterate over VectorTypes (NFC). (authored by fhahn). Changed prior to commit: https://reviews.llvm.org/D81138?vs=268408&id=268572#toc Repository: rG

[PATCH] D76794: [Matrix] Implement * binary operator for MatrixType.

2020-06-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:12130 + QualType LHSType = LHS.get()->getType().getUnqualifiedType(); + QualType RHSType = RHS.get()->getType().getUnqualifiedType(); + rjmccall wrote: > You never actually do anything with th

[PATCH] D76794: [Matrix] Implement * binary operator for MatrixType.

2020-06-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 269027. fhahn marked 2 inline comments as done. fhahn added a comment. In D76794#2078232 , @rjmccall wrote: > Your IRGen test cases cover a lot of ground, but please add more Sema test > cases that go over the basics: e

[PATCH] D72778: [Matrix] Add __builtin_matrix_transpose to Clang.

2020-06-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 269032. fhahn marked an inline comment as done. fhahn added a comment. Thanks for all the comments! Simplified code as suggested, handle placeholder expressions and add tests for them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D72778: [Matrix] Add __builtin_matrix_transpose to Clang.

2020-06-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 3 inline comments as done. fhahn added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1642 + return cast(Ty.getCanonicalType()); +}; + rjmccall wrote: > Unnecessary semicolon. I think it's probably clearer just to > `castAs()` inline

  1   2   3   4   5   6   7   8   >