[PATCH] D92930: [Clang] Add vcmla and rotated variants for Arm ACLE.

2020-12-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 310632. fhahn added a comment. Updated to use new VCMLA_ROTS multiclass to define rotated variants. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92930/new/ https://reviews.llvm.org/D92930 Files: clang/include

[PATCH] D92930: [Clang] Add vcmla and rotated variants for Arm ACLE.

2020-12-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: SjoerdMeijer, dmgreen, t.p.northover. Herald added a subscriber: kristof.beyls. fhahn requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds vcmla and the rotated variants as defi

[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I think this also fixes https://bugs.llvm.org/show_bug.cgi?id=47397 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92436/new/ https://reviews.llvm.org/D92436 ___ cfe-commits mailing

[PATCH] D91631: [Matrix] Adjust matrix pointer type for inline asm arguments.

2020-11-18 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 rG680931af2757: [Matrix] Adjust matrix pointer type for inline asm arguments. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D91631: [Matrix] Adjust matrix pointer type for inline asm arguments.

2020-11-17 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. There's still one remaining issue. The backend will still crash when the resulting vector does not fit into the target's vector register directly. But that's the same as with `ext_vector_type` I think. The snippet below should produce the same `asm` call as a `float x 3 x

[PATCH] D91631: [Matrix] Adjust matrix pointer type for inline asm arguments.

2020-11-17 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. Herald added subscribers: cfe-commits, tschuett. Herald added a project: clang. fhahn requested review of this revision. Matrix types in memory are represented as arrays, but accessed through vector pointers, with the alignment specified on the access operation. For i

[PATCH] D91195: Add Annotation2MD pass to add !annotate metadata from llvm.global.annotations

2020-11-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added a comment. Thanks Jessica & Francis! I committed the initial version, with a small change to only run if the `!annotation` remarks are enabled. Comment at: llvm/include/llvm/Transforms/IPO/Annotation2Metadata.h:1 +//===- SCCP

[PATCH] D91195: Add Annotation2MD pass to add !annotate metadata from llvm.global.annotations

2020-11-16 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 rG8dbe44cb2936: Add pass to add !annotate metadata from @llvm.global.annotations. (authored by fhahn). Herald added a project: clang. Herald added a su

[PATCH] D91417: [IRGen] Add !annotation metadata for auto-init stores.

2020-11-16 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 rGca2e7e59994d: [IRGen] Add !annotation metadata for auto-init stores. (authored by fhahn). Changed prior to commit: https://reviews.llvm.org/D91417

[PATCH] D91417: [IRGen] Add !annotation metadata for auto-init stores.

2020-11-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1267 assert(!isa(constant)); - emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant); + emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant, true); } jdoerfert wr

[PATCH] D91417: [IRGen] Add !annotation metadata for auto-init stores.

2020-11-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: thegameg, paquette, jdoerfert, rjmccall. Herald added subscribers: cfe-commits, dexonsmith, jfb, hiraditya. Herald added projects: clang, LLVM. fhahn requested review of this revision. This patch updates Clang's IRGen to add !annotation nodes wit

[PATCH] D91253: [Matrix] Update mangling to use paramterized vendor ext type syntax.

2020-11-11 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 rG1d5daed1997d: [Matrix] Update mangling to use paramterized vendor ext type syntax. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D91253: [Matrix] Update mangling to use paramterized vendor ext type syntax.

2020-11-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3523 mangleType(T->getElementType()); + Out << "I"; } rjmccall wrote: > Your `I`s and `E`s are backwards. Argh, used different orders for comment

[PATCH] D91253: [Matrix] Update mangling to use paramterized vendor ext type syntax.

2020-11-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 304605. fhahn added a comment. Update comment and fix I and E order Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91253/new/ https://reviews.llvm.org/D91253 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/

[PATCH] D72281: [Matrix] Add matrix type to Clang.

2020-11-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3353-3371 + auto &ASTCtx = getASTContext(); + unsigned BitWidth = ASTCtx.getTypeSize(ASTCtx.getSizeType()); + llvm::APSInt Rows(BitWidth); + Rows = T->getNumRows(); + mangleIntegerLiteral(ASTCtx.getSize

[PATCH] D91253: [Matrix] Update mangling to use paramterized vendor ext type syntax.

2020-11-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, rsmith, Bigcheese. Herald added a subscriber: tschuett. Herald added a project: clang. fhahn requested review of this revision. The Itanium CXX ABI grammer has been extended to support parameterized vendor extended types [1]. This patc

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-11-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2379892 , @thakis wrote: > Very belated update: We've been running with this on our clang/tot bots for a > few weeks now and turned this on (or, more accurately stopped turning it off) > for "normal" builds today. All tes

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-10-30 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:144 + assert(ValueExpr && "Attribute must have a valid value expression."); + if (S.CheckLoopHintExpr(ValueExpr, St->getBeginLoc())) +return nullptr; sdesmalen wrote: > dav

[PATCH] D89699: [ExtVector] Make .even/.odd/.lo/.hi return vectors for single elements.

2020-10-19 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, jfb, scanon, rsmith, hfinkel. Herald added a subscriber: dexonsmith. Herald added a project: clang. fhahn requested review of this revision. Currently the 'swizzle' accessors .even/.odd/.lo/.hi return a scalar instead of a vector with a

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-10-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:1096 static_cast(Tok.getAnnotationValue()); - IdentifierInfo *PragmaNameInfo = Info->PragmaName.getIdentifierInfo(); nit: unrelated change? Comment at: clang/lib

[PATCH] D88154: Initial support for vectorization using Libmvec (GLIBC vector math library).

2020-10-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll:82 + +!1 = distinct !{!1, !2, !3} +!2 = !{!"llvm.loop.vectorize.width", i32 4} fhahn wrote: > I don't think we need this. You can just pass `-force-vector

[PATCH] D88154: Initial support for vectorization using Libmvec (GLIBC vector math library).

2020-10-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll:1 +; RUN: opt -vector-library=LIBMVEC -inject-tli-mappings -force-vector-width=4 -force-vector-interleave=1 -loop-vectorize -S < %s | FileCheck %s + spatel wrot

[PATCH] D88154: Initial support for vectorization using Libmvec (GLIBC vector math library).

2020-10-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll:2 +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt -vector-library=LIBMVEC-X86 -inject-tli-mappings -loop-vectorize -S < %s | FileChe

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-10-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I put up an impromptu round-table to discuss MemorySSA related topics, including potential new transformations like MemCpyOpt using MemorySSA: https://whova.com/portal/webapp/llvm_202010/CommunityBoard/topic/342030/ If there's any interest, I think it would be great to sy

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-10-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. FYI this has been temporarily reverted again roughly a week ago, because there seems to be a mis-compile, that is caused by LLVM introducing invalid lifetime.end calls and exposed by the more powerful DSE, which @asbirlea is currently trying to narrow down. Repository:

[PATCH] D88265: [Sema] Support Comma operator for fp16 vectors.

2020-09-30 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. LGTM, thanks. I'll commit this in a minute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88265/new/ https://reviews.llvm.org/D88265 ___ cfe-commits m

[PATCH] D88265: [Sema] Support Comma operator for fp16 vectors.

2020-09-30 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG700e63293eea: [Sema] Support Comma operator for fp16 vectors. (authored by arames, committed by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88265/n

[PATCH] D88265: Fix comma with half vectors.

2020-09-30 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D88265#2303841 , @arames wrote: > In D88265#2302653 , @fhahn wrote: > >> Could you adjust the commit message to be a bit more descriptive, e.g >> something like `[Sema] Support Comma opera

[PATCH] D88265: Fix comma with half vectors.

2020-09-30 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Could you adjust the commit message to be a bit more descriptive, e.g something like `[Sema] Support Comma operator for fp16 vectors.` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88265/new/ https://reviews.llvm.org/D88265

[PATCH] D88265: Fix comma with half vectors.

2020-09-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13936 // arm64). - assert(isVector(RHS.get()->getType(), Context.HalfTy) == - isVector(LHS.get()->getType(), Context.HalfTy) && - "both sides are half vectors or neither sides are"); + asser

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-21 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87972#2284060 , @MaskRay wrote: > I have tested this patch internally and seen gains and losses. On one > document search related benchmark 3~5% improvement. One zippy (snappy) there > is 3~5% regression. Perhaps we do need a c

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-21 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2285984 , @dmajor wrote: > I threw as many tests as I could find at 9d172c8e9c84 > , and I > don't see any regressions compared to its parent revision.

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Surprising this causes only such a small perf regression. I guess it should be OK given that, but here probably are some pathological cases out there where this may cause some noticeable compile-time regressions. IIUC the additional cases this catches come mainly from ful

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. All reported problems should be fixed now and we also made the fix for the issue @dmajor reported more conservative to catch more problematic cases. I just enabled DSE + MemorySSA again in 9d172c8e9c84 .

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-16 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2276899 , @dmajor wrote: > In D87163#2275896 , @asbirlea wrote: > >> I checked in a fix in https://reviews.llvm.org/rGfc8200633122, but I haven't >> yet verified it addresses all

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2275058 , @asbirlea wrote: > Yes, the load should have the Phi as the defining access. I'm still looking > into where this information should come from, but it's not hitting the phi > translation. > Thank you for the reve

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2274549 , @dmajor wrote: > Reduced a bit more: https://godbolt.org/z/j59evK (C++) and > https://godbolt.org/z/8xG688 (IR) -- the store at line 43 of `while.end` has > been removed. Thanks! I reverted the change for now i

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2273917 , @thakis wrote: > It's not blocking us because we added an explicit flag to force this off to > our build config for "normal" builds. (We still get the default-on behavior > on our bots that build with trunk clan

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-15 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2272749 , @asbirlea wrote: > I'd suggest reverting if the failures are blocking, but we do need a > reproducer so it can be recommitted after a fix is in place. +1, but I think ideally we would have reproducers for the re

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2271998 , @dmajor wrote: > In D87163#2270871 , @fhahn wrote: > >> In D87163#2270444 , @thakis wrote: >> >>> Heads-up: We're seeing fairly wid

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2270444 , @thakis wrote: > Heads-up: We're seeing fairly widespread test failures with this in Chromium > that go away when we force this flag off. It's possible that it's due to only > a small number of issues and they m

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2270568 , @uabelho wrote: > Hi, > > I'm seeing what I think is a miscompile with this: Thanks for the reproducer. We have to be more careful around pointers that may reference multiple locations in memory. I pushed f715d8

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2269674 , @thakis wrote: > The fix-up breaks tests: http://45.33.8.238/linux/27687/step_12.txt Thanks, should already be fixed in d85ac6d577ac Reposi

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/Driver/Options.td:4287-4290 +def fpass_by_value_noalias: Flag<["-"], "fpass-by-value-noalias">, + HelpText<"Allows assuming no references to passed by value escape before " + "transferring execution to the ca

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-12 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 rGa874d6334409: [Clang] Add option to allow marking pass-by-value args as noalias. (authored by fhahn). Changed prior to commit: https://reviews.llv

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 291183. fhahn marked an inline comment as done. fhahn added a comment. Add check lines for escape examples. Note that for return-by-value we already add noalias to the pointer unconditionally. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2198 +// reference to the underlying object. Mark it accordingly. +Attrs.addAttribute(llvm::Attribute::NoAlias); + rjmccall wrote: > fhah

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 291176. fhahn added a comment. Update code to limit adding noalias to types with `getArgPassingRestrictions() == RecordDecl::APK_CanPassInRegs`. This rules out problematic types, like ones with non-trivial constructors or ObjC structs with weak pointers. Thank

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-10 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 rGfb109c42d91c: [DSE] Switch to MemorySSA-backed DSE by default. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 291083. fhahn added a comment. Also restrict to types that are `isNonTrivialToPrimitiveCopy`, so we do not add noalias for problematic types, like ObjC structs with weak references. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2266725 , @asbirlea wrote: > I'm running additional testing in the background. I don't have anything > holding this back at this point. > Either check in and if something shows up, I'll let you know to resolve or > revert

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 291078. fhahn added a comment. Final rebase after new memcpy test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87163/new/ https://reviews.llvm.org/D87163 Files: clang/test/CodeGen/thinlto-distributed-newpm.l

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D87163#2264785 , @asbirlea wrote: > I'm running into a crash with this, could you please hold off until tomorrow? > I'm working on getting a reproducer. @asbirlea Thanks for the reproducer, the issue should be sorted out. The GV

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:312 switch (II->getIntrinsicID()) { default: llvm_unreachable("doesn't pass 'hasAnalyzableMemoryWrite' predicate"); case Intrinsic::lifetime_end: asbirlea

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. It looks like a recently introduced GVN crash is exposed by this change (probably D87061 ). I will commit once this is fixed. In D87163#2263685 , @nikic wrote: > LGTM as well, per llvm-dev discussi

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. As another data point, I have collected compile-time numbers for ARM64 with -Os -g LTO & -Oz -g LTO. Geoman changes below. Compile time here is actual execution time on a stabilized system. Compile time code size -Oz RLTO 0.67%

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 290658. fhahn added a comment. rebase on top of latest changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87163/new/ https://reviews.llvm.org/D87163 Files: clang/test/CodeGen/thinlto-distributed-newpm.ll

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Note that we now also have to compute the PostDominatorTree, which adds an extra bit of compile-time overhead. By adjusting the pipeline a bit more, we can re-use ADCE's PDTs in most cases, which gives a `-0.18%` geomean improvement for -O3 D87322

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/Driver/Options.td:4287-4290 +def fpass_by_value_noalias: Flag<["-"], "fpass-by-value-noalias">, + HelpText<"Allows assuming no references to passed by value escape before " + "transferring execution to the ca

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-09-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 290504. fhahn marked an inline comment as done. fhahn added a comment. Change to codegen option, adjust description for option, limit to trivially copyable types in C++, add corresponding test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:115 cl::desc("The number of memory instructions to scan for " "dead store elimination (default = 100)")); static cl::opt MemoryS

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 290140. fhahn added a comment. Adjust limit in description, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87163/new/ https://reviews.llvm.org/D87163 Files: clang/test/CodeGen/thinlto-distributed-newpm.

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-04 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: efriedma, dmgreen, asbirlea, reames. Herald added subscribers: cfe-commits, lxfind, nikic, kerbowa, jfb, dexonsmith, steven_wu, george.burgess.iv, modocache, hiraditya, Prazek, nhaehnle, jvesely. Herald added projects: clang, LLVM. fhahn requeste

[PATCH] D87102: [Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once

2020-09-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. LGTM, thanks for addressing this! Please wait a bit with committing, in case there are additional comments. Comment at: clang/lib/Sema/SemaExpr.cpp:4598 } // If the base is either a MatrixSubscriptExpr or a matrix type

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-08-31 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/D85473/new/ https://reviews.llvm.org/D85473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-08-24 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/D85473/new/ https://reviews.llvm.org/D85473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D86274: [Constants] Handle FNeg in getWithOperands.

2020-08-21 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 rGbc72a3ab949e: [Constants] Handle FNeg in getWithOperands. (authored by fhahn). Changed prior to commit: https://reviews.llvm.org/D86274?vs=286756&

[PATCH] D86274: [Constants] Handle FNeg in getWithOperands.

2020-08-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: efriedma, aprantl, arsenm. Herald added subscribers: cfe-commits, hiraditya. Herald added projects: clang, LLVM. fhahn requested review of this revision. Herald added a subscriber: wdng. Currently ConstantExpr::getWithOperands does not handle FNe

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-08-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/D85473/new/ https://reviews.llvm.org/D85473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D84886: Create LoopNestPass

2020-08-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D84886#2212202 , @TaWeiTu wrote: > @ychen Again, thanks for your comment! > > 1. Currently, `LoopInterchange` returns immediately if the loop is not a > top-level one. The main purpose of the loop nest pass is to prevent > situa

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-08-07 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 283837. fhahn added a comment. Thanks for taking a look! I adjusted the LangOpts description and added the flag to f_Group, as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85473/new/ https://reviews.

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-08-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, rsmith, hfinkel, jfb. Herald added subscribers: dang, dexonsmith. Herald added a project: clang. fhahn requested review of this revision. After the recent discussion on cfe-dev 'Can indirect class parameters be noalias?' [1], it seems l

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 282577. fhahn added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 Files: clang/docs/UsersManual.rst clang/lib/Driver/ToolChains/Clang.cpp clang/

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn reopened this revision. fhahn added a comment. This revision is now accepted and ready to land. IIUC the patch is currently reverted (in 78654e8511cf16d49f6680d782f3771a767ba942 ), due to ~20 llvm-test-suite failures. T

[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] 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] D80911: AArch64+ARM: make LLVM consider system registers volatile to prevent unsound optimizations.

2020-07-03 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. As mentioned earlier, I think the patch is a nice, isolated fix for the `read_register` issue and it should not make addressing the bigger issue more difficult. LGTM, thanks! Repository: rG

[PATCH] D80911: AArch64+ARM: make LLVM consider system registers volatile to prevent unsound optimizations.

2020-07-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added reviewers: fhahn, efriedma, hfinkel. fhahn added a comment. This seems similar to the problem described in https://bugs.llvm.org/show_bug.cgi?id=46210 : for intrinsics that are marked as reading memory, we do not account for the fact that the memory could be modified outside of the

[PATCH] D82928: [Coroutines] Fix code coverage for coroutine

2020-07-01 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Looks like this causes a bunch of build bot failures, e.g http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/31465 b It would be great if you could take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D82473: [Matrix] Use 1st/2nd instead of first/second in matrix diags.

2020-06-25 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG043b60839955: [Matrix] Use 1st/2nd instead of first/second in matrix diags. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82473/new/ ht

[PATCH] D82473: [Matrix] Use 1st/2nd instead of first/second in matrix diags.

2020-06-24 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, jfb, Bigcheese. Herald added subscribers: cfe-commits, tschuett, dexonsmith. Herald added a project: clang. This was suggested in D72782 and brings the diagnostics more in line with how argument refere

[PATCH] D80279: [libclang] Extend clang_Cursor_Evaluate().

2020-06-24 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG72131423cc95: [libclang] Extend clang_Cursor_Evaluate(). (authored by ckandeler, committed by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80279/new

[PATCH] D82213: [Remarks] Add callsite locations to inline remarks

2020-06-24 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. That's interesting. We are also using something similar for the matrix lowering remarks [1]: we traverse the inlining chain bottom up and emit a remark at each step which contains the expression available at that level. I think those approaches could be useful in general

[PATCH] D72782: [Matrix] Add __builtin_matrix_column_store to Clang.

2020-06-18 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb5e082e72891: [Matrix] Add __builtin_matrix_column_store to Clang. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72782/new/ https://rev

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-18 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG934bcaf10b57: [Matrix] Add __builtin_matrix_column_load to Clang. (authored by fhahn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72781/new/ https://revi

[PATCH] D72782: [Matrix] Add __builtin_matrix_column_store to Clang.

2020-06-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10792 def err_builtin_matrix_pointer_arg: Error< - "%select{first|second}0 argument must be a pointer to a valid matrix element type">; + "%0 argu

[PATCH] D72782: [Matrix] Add __builtin_matrix_column_store to Clang.

2020-06-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 271617. fhahn added a comment. Rebased after recent changes landed upstream. Will commit shortly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72782/new/ https://reviews.llvm.org/D72782 Files: clang/include/cl

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 271613. fhahn added a comment. Rebased after recent parent patches landed. Will commit shortly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72781/new/ https://reviews.llvm.org/D72781 Files: clang/include/cla

[PATCH] D72782: [Matrix] Add __builtin_matrix_column_store to Clang.

2020-06-17 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 271401. fhahn added a comment. Ping :) Rebased and applied feedback from D72781 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72782/new/ https://reviews.llvm.org/D72782 Files:

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-11 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D72781#2084077 , @rjmccall wrote: > LGTM. Thank you very much again John! This patch is pending on a few smallish improvements to the load/store intrinsics (D81472 ) and I'll land once that one

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 269556. fhahn marked 2 inline comments as done. fhahn added a comment. Adjust naming as suggested, pass through volatile flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72781/new/ https://reviews.llvm.org/D72

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 3 inline comments as done. fhahn added inline comments. Comment at: clang/include/clang/Sema/Sema.h:12126 + ExprResult SemaBuiltinMatrixColumnMajorLoadOverload(CallExpr *TheCall, + ExprResult CallResult); --

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

2020-06-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D72778#2080928 , @rjmccall wrote: > Yeah, that's fine. Thank you very much John! I filed https://bugs.llvm.org/show_bug.cgi?id=46251 to keep track of the initializer support, with a note on enabling the commented out test. R

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

2020-06-09 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3323a628ec82: [Matrix] Add __builtin_matrix_transpose to Clang. (authored by fhahn). Changed prior to commit: https://reviews.llvm.org/D72778?vs=269050&id=269463#toc Repository: rG LLVM Github Monore

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 9 inline comments as done. fhahn added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10789 +def err_builtin_matrix_scalar_constant_unsigned_expr_arg: Error< + "%0 argument must be a constant unsigned integer expression">; + --

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 269378. fhahn marked 5 inline comments as done. fhahn added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Simplified code as suggested, check if matrix type extensions is enabled (and add test) and set align attribute for poi

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 12 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:15107 + { +ExprResult PtrConv = DefaultLvalueConversion(PtrExpr); +if (PtrConv.isInvalid()) rjmccall wrote: > You should be doing `DefaultFu

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 269363. fhahn added a comment. Updated to - use DefaultFunctionArrayLvalueConversion for pointer conversion, use getAs subsequently - return Context.DependentTy if any part of the result matrix type is still type-dependent - add assertion & todo for volatile

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

2020-06-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked 2 inline comments as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:15051 + + Expr *Arg = TheCall->getArg(0); + if (!Arg->getType()->isConstantMatrixType()) { rjmccall wrote: > fhahn wrote: > > rjmccall wrote: > > >

[PATCH] D72781: [Matrix] Add __builtin_matrix_column_load to Clang.

2020-06-08 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 269249. fhahn added a comment. Ping. Applied feedback from D72778 to this patch, improved tests, support conversions/placeholders. One thing I am not sure is how to properly handle template substitutions for the pointer expr

<    1   2   3   4   5   6   7   8   >