[PATCH] D69094: [WIP] Add override relationship.

2020-11-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein abandoned this revision. hokein added a comment. Herald added a subscriber: yaxunl. closing it in favor of https://reviews.llvm.org/D91610. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69094/new/ https://reviews.llvm.org/D69094 ___

[PATCH] D91519: [AST][Mach0] Fix unused-variable warnings

2020-11-17 Thread Gabriel Hjort Åkerlund via Phabricator via cfe-commits
ehjogab updated this revision to Diff 305984. ehjogab added a comment. Replace dyn_cast with isa Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91519/new/ https://reviews.llvm.org/D91519 Files: clang/lib/AST/APValue.cpp lld/MachO/SymbolTable.cp

[PATCH] D72184: [BPF] support atomic instructions

2020-11-17 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. make sense. will add and/or/xor support in the next revision. will also think about how to support hardware-level barrier. Totally agree that we should have adequate atomic op support in cpu=v4. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D91327: [NewPM] Redesign of PreserveCFG Checker

2020-11-17 Thread Serguei Katkov via Phabricator via cfe-commits
skatkov added inline comments. Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:769 +auto *F = any_cast(IR); +if (auto *Result = FAM.getCachedResult( +*const_cast(F))) Result -> GraphBefore Comment at: llvm/lib/Pass

[PATCH] D91610: [clangd] Add OverriddenBy Relation to index.

2020-11-17 Thread Utkarsh Saxena 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 rG4bc085f5b3ed: [clangd] Add OverridenBy Relation to index. (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] 4bc085f - [clangd] Add OverridenBy Relation to index.

2020-11-17 Thread Utkarsh Saxena via cfe-commits
Author: Utkarsh Saxena Date: 2020-11-18T06:59:49+01:00 New Revision: 4bc085f5b3eda5273721fd787ffa65e2f155fc45 URL: https://github.com/llvm/llvm-project/commit/4bc085f5b3eda5273721fd787ffa65e2f155fc45 DIFF: https://github.com/llvm/llvm-project/commit/4bc085f5b3eda5273721fd787ffa65e2f155fc45.diff

[PATCH] D87981: [X86] AMX programming model prototype.

2020-11-17 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke updated this revision to Diff 305978. LuoYuanke added a comment. Address Wei's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87981/new/ https://reviews.llvm.org/D87981 Files: clang/include/clang/Basic/BuiltinsX86_64.def cla

[PATCH] D91610: [clangd] Add OverriddenBy Relation to index.

2020-11-17 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 305976. usaxena95 marked an inline comment as done. usaxena95 added a comment. Addressed final comments. Ready to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91610/new/ https://reviews.llvm.org/D91610

[PATCH] D91659: Allow anonymous enum typedefs to be referenced with the 'enum' specifier under MSVC compat mode

2020-11-17 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 marked 3 inline comments as done. shivanshu3 added a comment. Thank you very much for the review @rsmith! Comment at: clang/lib/Sema/SemaDecl.cpp:15752-15754 + bool AnonymousEnumEligible = getLangOpts().MSVCCompat && + (

[PATCH] D91626: [clangd] Implement textDocument/implementation.

2020-11-17 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 305974. usaxena95 added a comment. Remove unintended change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91626/new/ https://reviews.llvm.org/D91626 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp c

[PATCH] D91626: [clangd] Implement textDocument/implementation.

2020-11-17 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 305972. usaxena95 added a comment. Addressed final comments. Ready to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91626/new/ https://reviews.llvm.org/D91626 Files: clang-tools-extra/clangd/ClangdLS

[PATCH] D91659: Allow anonymous enum typedefs to be referenced with the 'enum' specifier under MSVC compat mode

2020-11-17 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 updated this revision to Diff 305971. shivanshu3 added a reviewer: rsmith. shivanshu3 added a comment. Addressing some of rsmith's comments: - Add a test case where an enum variable is declared in the same scope as the enum definition - Fix a style issue with parentheses - Simplify th

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. LGTM. Thanks. You'd better wait one or two days to see if other people objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90441/new/ https

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 marked an inline comment as done. LiuChen3 added a comment. > It allows more than two, right? like `{vex}{vex2}{vex3} instruction`. I think > it should be a bug for att. Yes, My previous statement is incorrect, it should be ‘two more’. Thanks for your correction. We might need another

[PATCH] D91651: [clang] Add a warning (à la gcc) for too small enum bitfields

2020-11-17 Thread Faisal Vali via Phabricator via cfe-commits
faisalv planned changes to this revision. faisalv marked 3 inline comments as done. faisalv added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:16443-16446 + const unsigned BitsNeeded = + IsSignedEnum + ? std::max(ED->getNumPositiveBits() + 1

[PATCH] D91651: [clang] Add a warning (à la gcc) for too small enum bitfields

2020-11-17 Thread Faisal Vali via Phabricator via cfe-commits
faisalv updated this revision to Diff 305970. faisalv added a comment. Based on Richards Feedback, this update includes the following changes: - avoids calling the fragile getZextValue() for comparing against bit-field width, and uses APSInt's comparison operator overload - suppresses/avoids the

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. > 2. Delete IsPrefix parameter, and delete 'break', so that we won't check > prefix again. I am not sure if this is right. Att format can allow two prefix > and using the last one as the finally encoding prefix. I think this may not > be the original intention of the de

[PATCH] D87981: [X86] AMX programming model prototype.

2020-11-17 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added inline comments. Comment at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:44 VirtRegMap *VRM; + MachineRegisterInfo *MRI; wxiao3 wrote: > what's the purpose of this member? It is useless. Thanks. Comment at: llvm/lib/Target/X

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 marked an inline comment as done. LiuChen3 added a comment. > 2. Delete IsPrefix parameter, and delete 'break' It should be 'continue'. Sorry for this mistake. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3083 + } + if (IsPrefix) { +Nam

[PATCH] D72184: [BPF] support atomic instructions

2020-11-17 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added a comment. looks good. Before landing we need to agree on the full set of instructions that -mcpu=v4 will support. atomic_fetch_or|xor|and are probably needed as instructions. The kernel JIT will generate x86 cmpxchg for them. Because if llvm generates bpf cmpxchg insn then we'd need t

[PATCH] D91269: [Clang][CodeGen][RISCV] Add hard float ABI tests with empty struct

2020-11-17 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. We don't usually add known-broken tests like this before a fix, as opposed to just landing them as part of the fix, but if you have a good reason to do so it's okay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Rong Xu via Phabricator via cfe-commits
xur added a comment. This is probably OK for -Os (SizeLevel == 1), but we need to be careful with Oz (SizeLevel == 2). We already know that enabling preinliner in general will reduce size -- as the preinliner is pretty conservative. But there will be cases size will be increased. I would like

[PATCH] D91676: Avoid redundant work when computing vtable vcall visibility

2020-11-17 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: pcc, ostannard. Herald added a project: clang. tejohnson requested review of this revision. Add a Visited set to avoid repeatedly processing the same base classes in complex class hierarchies. This cut down the compile time of one source

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 updated this revision to Diff 305959. LiuChen3 added a comment. 1. Check prefix, ignoring case 2. Delete IsPrefix parameter, and delete 'break', so that we won't check prefix again. I am not sure if this is right. Att format can allow two prefix and using the last one as the finally enc

[clang] 6a89cb8 - Revert "Revert "Revert "[analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis."""

2020-11-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-11-17T18:59:21-08:00 New Revision: 6a89cb8136f3435bd977b419b683dc0acc98e61e URL: https://github.com/llvm/llvm-project/commit/6a89cb8136f3435bd977b419b683dc0acc98e61e DIFF: https://github.com/llvm/llvm-project/commit/6a89cb8136f3435bd977b419b683dc0acc98e61e.dif

[clang] 41bcc05 - Revert "Revert "[analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis.""

2020-11-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-11-17T18:45:09-08:00 New Revision: 41bcc05e2a4e3062eb12ac6e071bc835decc38f5 URL: https://github.com/llvm/llvm-project/commit/41bcc05e2a4e3062eb12ac6e071bc835decc38f5 DIFF: https://github.com/llvm/llvm-project/commit/41bcc05e2a4e3062eb12ac6e071bc835decc38f5.dif

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); rsmith wrote:

LLVM buildmaster will be updated and restarted tonight

2020-11-17 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 8PM PST today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 305948. zequanwu added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. update wrong diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91673/new/ https://reviews.ll

[PATCH] D91673: [PGO] Enable preinline and cleanup when optimize for size

2020-11-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: xur, davidxl, rnk. Herald added subscribers: cfe-commits, wenlei. Herald added a project: clang. zequanwu requested review of this revision. This is intended to reduce the binary size of both phase 1 and phase 2 builds. By compiling chrome

[PATCH] D91580: [Frontend] Add flag to allow PCM generation despite compiler errors

2020-11-17 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5834996fefc9: [Frontend] Add flag to allow PCM generation despite compiler errors (authored by bnbarham, committed by akyrtzi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[clang] 5834996 - [Frontend] Add flag to allow PCM generation despite compiler errors

2020-11-17 Thread Argyrios Kyrtzidis via cfe-commits
Author: Ben Barham Date: 2020-11-17T17:27:50-08:00 New Revision: 5834996fefc937d6211dc8c8a5b200068753391a URL: https://github.com/llvm/llvm-project/commit/5834996fefc937d6211dc8c8a5b200068753391a DIFF: https://github.com/llvm/llvm-project/commit/5834996fefc937d6211dc8c8a5b200068753391a.diff LO

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Thanks for the walkthroughs/help. Also stared at the code a bit. I think I get it now. Some of the confusion also came from having both LPM and NPM versions of the always inliner in the same file, though they seem to share no code. I'll leave the more nuanced review to

[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch

2020-11-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/test/Transforms/Inline/inline_nossp.ll:3 +; RUN: opt -passes='cgscc(inline)' %s -S | FileCheck %s +; RUN: opt -always-inline -o - -S %s | FileCheck %s + nickdesaulniers wrote: > aeubanks wrote: > > nickdesau

[clang] f4c6080 - Revert "[IR] add fn attr for no_stack_protector; prevent inlining on mismatch"

2020-11-17 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-11-17T17:27:14-08:00 New Revision: f4c6080ab820219c5bf78b0c2143e7fa194da296 URL: https://github.com/llvm/llvm-project/commit/f4c6080ab820219c5bf78b0c2143e7fa194da296 DIFF: https://github.com/llvm/llvm-project/commit/f4c6080ab820219c5bf78b0c2143e7fa194da296.di

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added inline comments. Comment at: clang/lib/AST/Stmt.cpp:795 + SmallVector Pieces; + AsmStr.split(Pieces, "\n\t"); + std::string MSAsmString; pengfei wrote: > Can we always assume the separator is `\n\t`? I think so. From the code, we can see '\n\t'

[PATCH] D67112: [Sema] Introduce function reference conversion, NFC

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D67112#2401110 , @aaronpuchert wrote: > In D67112#2398577 , @rsmith wrote: > >> Looks fine as far as it goes, but it looks like we're also missing a cast in >> function pointer initializ

[PATCH] D91669: Add ScopedTrace to verify methods in FormatTestObjC

2020-11-17 Thread Samuel Giddins via Phabricator via cfe-commits
segiddins created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. segiddins requested review of this revision. Add tests from D17700 Don’t break before nested block param when prior param is not a block Repository: rG LLV

[PATCH] D91659: Allow anonymous enum typedefs to be referenced with the 'enum' specifier under MSVC compat mode

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15545-15546 +// is only used for C code. +if (getLangOpts().MSVCCompat && (Kind == TTK_Enum) && Previous.empty() && +(TUK == TUK_Reference)) { + LookupResult TypedefEnumLookup(*this, Name,

[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch

2020-11-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/test/Transforms/Inline/inline_nossp.ll:3 +; RUN: opt -passes='cgscc(inline)' %s -S | FileCheck %s +; RUN: opt -always-inline -o - -S %s | FileCheck %s + aeubanks wrote: > nickdesaulniers wrote: > > aeubanks

[PATCH] D88138: [NPM] Add target specific hook to add passes for New Pass Manager

2020-11-17 Thread Ankit via Phabricator via cfe-commits
quic_aankit added a comment. In D88138#2397785 , @vtjnash wrote: > I think this, and similar recent commits, are causing the shared library > builds to fail some tests if this code gets linked into libLLVM.so: > https://bugs.llvm.org/show_bug.cgi?id=4818

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-17 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:455-520 +#if SANITIZER_SOLARIS +// dlpi_tls_modid is only available since Solaris 11.4 SRU 10. Use +// dlinfo(RTLD_DI_LINKMAP) instead which works on both Solaris 11.3 and

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); jdoerfert wrote:

[PATCH] D91664: Add a less ambiguous macro for Android version.

2020-11-17 Thread Jiyong Park via Phabricator via cfe-commits
jiyong added a comment. This LGTM, but just FYI: for darwin targets, these are __ENVIRONMENT__VERSION_MIN_REQUIRED__ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91664/new/ https://reviews.llvm.org/D91664

[PATCH] D91592: [ASTMatchers] Fix typo for hasAnyOverloadedOperatorName

2020-11-17 Thread Keishi Hattori via Phabricator via cfe-commits
keishi added a comment. In D91592#2399535 , @aaron.ballman wrote: > LGTM! Do you need me to commit on your behalf? If so, is `Keishi Hattori > ` the correct attribution you'd like me to use? Yes. Please use `Keishi Hattori `. Thank you! Repository:

[clang] f8f6d64 - Revert "Revert "[analyzer] NFC: Move IssueHash to libAnalysis.""

2020-11-17 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2020-11-17T16:01:49-08:00 New Revision: f8f6d6455f963d5924990824866c4b55ae694639 URL: https://github.com/llvm/llvm-project/commit/f8f6d6455f963d5924990824866c4b55ae694639 DIFF: https://github.com/llvm/llvm-project/commit/f8f6d6455f963d5924990824866c4b55ae694639.dif

[PATCH] D91311: Add new 'preferred_name' attribute.

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D91311#2400998 , @dblaikie wrote: > In D91311#2400926 , @ldionne wrote: > >> For instance, I can easily imagine a library that provides an API where some >> types shouldn't be named (for

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); rjmccall wrot

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); rsmith wrote:

[PATCH] D91580: [Frontend] Add flag to allow PCM generation despite compiler errors

2020-11-17 Thread Ben Barham via Phabricator via cfe-commits
bnbarham updated this revision to Diff 305914. bnbarham added a comment. Have allow-pcm also set allow-pch + test to make sure that works. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91580/new/ https://reviews.llvm.org/D91580 Files: clang/include/clang/Driver/Options.td clang/inc

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); jdoerfert wrote:

[PATCH] D67112: [Sema] Introduce function reference conversion, NFC

2020-11-17 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D67112#2398577 , @rsmith wrote: > Looks fine as far as it goes, but it looks like we're also missing a cast in > function pointer initialization via function conversion: > [...] > > |-VarDecl 0x105143e8 col:8 p 'void (*

[PATCH] D91327: [NewPM] Redesign of PreserveCFG Checker

2020-11-17 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. Found some cosmetics, but I'm not familiar enough with the NPM to do a full review. Comment at: llvm/include/llvm/Passes/StandardInstrumentations.h:99 struct CFG { struct BBGuard final : public CallbackVH { BBGuard(const BasicBlock *BB) :

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-17 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added a comment. In D91567#2401021 , @dblaikie wrote: > In D91567#2398637 , @mtrofin wrote: > >> In D91567#2398623 , @dblaikie wrote: >> >>> In D91567#2398461

[PATCH] D91664: Add a less ambiguous macro for Android version.

2020-11-17 Thread Dan Albert via Phabricator via cfe-commits
danalbert created this revision. danalbert added reviewers: enh, srhines, jiyong. Herald added a project: clang. danalbert requested review of this revision. Android has a handful of API levels relevant to developers described here: https://developer.android.com/studio/build#module-level. `__ANDRO

[PATCH] D91590: [NVPTX] Efficently support dynamic index on CUDA kernel aggregate parameters.

2020-11-17 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. I am legit excited about this if we could figure out how to make it work, but I don't have anything to add beyond what tra said. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91590/new/ https://reviews.llvm.org/D91590

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); arichardson w

[PATCH] D87928: Provide -fsource-dir flag in Clang

2020-11-17 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D87928#2396448 , @phosek wrote: > `-fsource-dir` is only used for coverage mapping and macros. Oh, interesting; it would be nice to consistently make all paths relative paths. > Here `out/default` is the working directory s

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2169 +if (!CodeGenOpts.NullPointerIsValid && +getContext().getTargetAddressSpace(FI.arg_begin()->type) == 0) { + Attrs.addAttribute(llvm::Attribute::NonNull); Isn't the `

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D91567#2398637 , @mtrofin wrote: > In D91567#2398623 , @dblaikie wrote: > >> In D91567#2398461 , @mtrofin wrote: >> >>> In D91567#2398440

[PATCH] D91651: [clang] Add a warning (à la gcc) for too small enum bitfields

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:16443-16446 + const unsigned BitsNeeded = + IsSignedEnum + ? std::max(ED->getNumPositiveBits() + 1, ED->getNumNegativeBits()) + : ED->getNumPositiveBits(); -

[clang] 8e923ec - Fix assertions and bad warnings on extremely wide bit-fields.

2020-11-17 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-11-17T14:36:51-08:00 New Revision: 8e923ec2a803d54154aaa0079c1cfcf146b7a22f URL: https://github.com/llvm/llvm-project/commit/8e923ec2a803d54154aaa0079c1cfcf146b7a22f DIFF: https://github.com/llvm/llvm-project/commit/8e923ec2a803d54154aaa0079c1cfcf146b7a22f.diff

[clang] a72f11e - Fix a pair of tests that would fail on a win32 box

2020-11-17 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2020-11-17T14:28:52-08:00 New Revision: a72f11ee20fec2df5611c49ec5ec2ce32ab8eb4c URL: https://github.com/llvm/llvm-project/commit/a72f11ee20fec2df5611c49ec5ec2ce32ab8eb4c DIFF: https://github.com/llvm/llvm-project/commit/a72f11ee20fec2df5611c49ec5ec2ce32ab8eb4c.diff L

[PATCH] D91311: Add new 'preferred_name' attribute.

2020-11-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D91311#2400926 , @ldionne wrote: > In D91311#2400917 , @dblaikie wrote: > >> How would that work for users - they would get error messages from the >> compiler using type names that don

[PATCH] D91660: [OPENMP]Fix PR48174: compile-time crash with target enter data on a global struct.

2020-11-17 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91660/new/ https://reviews.llvm.org/D91660 ___

[PATCH] D91660: [OPENMP]Fix PR48174: compile-time crash with target enter data on a global struct.

2020-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: guansong, yaxunl. Herald added a project: clang. ABataev requested review of this revision. Herald added a subscriber: sstefan1. The compiler should treat array subscript with base pointer as a first poin

[PATCH] D13673: Add initial support for the MUSL C library.

2020-11-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D13673#2394187 , @jroelofs wrote: > More context: https://www.openwall.com/lists/musl/2013/03/29/13 Thanks for the context. This is a very puristic point of view from the musl author.. not very useful. There are things that ar

[PATCH] D91659: Allow anonymous enum typedefs to be referenced with the 'enum' specifier under MSVC compat mode

2020-11-17 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 created this revision. shivanshu3 added reviewers: zahen, tiagoma, rnk, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. shivanshu3 requested review of this revision. Goal: Clang should be able to parse the following code with '-fms-compatibility' because MS

[PATCH] D90719: [DebugInfo] Modify ctor homing as workaround for unconstructed libcxx types

2020-11-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Sorry, I read this last week and probably forgot to reply. I think the right thing to do is to fix the UB, which appears to mean fixing libc++. However, can you take a look at whether defining these macros help? // Fix undefined behavior in how __tree stores its end

[PATCH] D91311: Add new 'preferred_name' attribute.

2020-11-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added subscribers: david_stone, mattcalabrese, mpark. ldionne added a comment. In D91311#2400917 , @dblaikie wrote: > How would that work for users - they would get error messages from the > compiler using type names that don't exist in the source

[PATCH] D90719: [DebugInfo] Modify ctor homing as workaround for unconstructed libcxx types

2020-11-17 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. Ok, it seems like the general opinion here is that libc++ should be changed in some way and not ctor homing. I don't know who'd be responsible for changing the libc++ code, though. Maybe I should file a bug for libc++? Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 305900. aeubanks added a comment. make build(Thin)LTODefaultPipeline handle O0 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91585/new/ https://reviews.llvm.org/D91585 Files: clang/lib/CodeGen/BackendUtil.c

[PATCH] D91311: Add new 'preferred_name' attribute.

2020-11-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D91311#2400775 , @ldionne wrote: > In D91311#2398526 , @rsmith wrote: > >> [...] > > Thanks for your detailed explanation. I did not understand the philosophy of > the attribute, and it

[PATCH] D91656: [clang-tidy] add concurrent module

2020-11-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I'm not a native english speaker, but i think the module name be `concurrency`, not `concurrent`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91656/new/ https://reviews.llvm.org/D91656 ___

[PATCH] D91656: [clang-tidy] add concurrent module

2020-11-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. You have messed up the revisions, this should be the parent, D90944 should be the child. Thats why the build bot can't apply the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91656/

[PATCH] D91485: [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved

2020-11-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 305898. njames93 added a comment. Whoops missed one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91485/new/ https://reviews.llvm.org/D91485 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnC

[PATCH] D91485: [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved

2020-11-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 305897. njames93 marked an inline comment as done. njames93 added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91485/new/ https://reviews.llvm.org/D91485 Files: clang-tools-ext

[PATCH] D91485: [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved

2020-11-17 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 8 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-else-after-return.cpp:313 +#endif +} aaron.ballman wrote: > We should probably add some tests for more pathological case

[PATCH] D91279: [PowerPC] DForm instructions should be preferred when using zero register

2020-11-17 Thread Stefan Pintilie via Phabricator via cfe-commits
stefanp added a comment. In D91279#2390160 , @shchenz wrote: > Using dform with offset 0 can save one register r0/X0, this is benefit for > register allocation? But adding it in `PPCPreEmitPeephole` pass which is > after register allocation will make the

[PATCH] D72184: [BPF] support atomic instructions

2020-11-17 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 305895. yonghong-song added a comment. use the same register for dst and val for fetch-add, fetch-sub and xchg instructions. for fetch-sub, if it is deemed later using different registers for dst/val is preferred, I can make the change then. Reposito

[PATCH] D85808: [Remarks][2/2] Expand remarks hotness threshold option support in more tools

2020-11-17 Thread Wei Wang via Phabricator via cfe-commits
weiwang updated this revision to Diff 305891. weiwang added a comment. update test case for clang option pass-through Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85808/new/ https://reviews.llvm.org/D85808 Files: clang/include/clang/Basic/CodeG

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks planned changes to this revision. aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:2365 + // Don't do anything for (thin)lto backend compiles at O0. + if (Matches[1] != "thinlto" && Matches[1] != "lto") +MPM.addPass(buildO0Def

[PATCH] D86119: [OPENMP50]Allow overlapping mapping in target constrcuts.

2020-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/src/omptarget.cpp:233 MapperComponents -.Components[target_data_function == targetDataEnd ? I : E - I - 1]; +.Components[target_data_function == targetDataEnd ? E - I - 1 : I]; Ma

[PATCH] D86119: [OPENMP50]Allow overlapping mapping in target constrcuts.

2020-11-17 Thread George Rokos via Phabricator via cfe-commits
grokos added inline comments. Comment at: openmp/libomptarget/src/omptarget.cpp:233 MapperComponents -.Components[target_data_function == targetDataEnd ? I : E - I - 1]; +.Components[target_data_function == targetDataEnd ? E - I - 1 : I]; Map

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:2365 + // Don't do anything for (thin)lto backend compiles at O0. + if (Matches[1] != "thinlto" && Matches[1] != "lto") +MPM.addPass(buildO0DefaultPipeline(L, Matches[1] != "default"));

[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations

2020-11-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D91630#2400731 , @rsmith wrote: > Do `[[deprecated]]` and `[[maybe_unused]]` now work for > //using-declarator//s? If so, a test for that would be useful. I think the answer is yes and no, respectively (at least in terms

[PATCH] D91495: [clang-tidy] false-positive for bugprone-redundant-branch-condition in case of passed-by-ref params

2020-11-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-redundant-branch-condition.cpp:10 +bool tryToExtinguish(bool&); +bool tryToExtinguishByVal(bool &); void tryPutFireOut(); Did you mea

[PATCH] D91485: [clang-tidy] ElseAfterReturn check wont suggest fixes if preprocessor branches are involved

2020-11-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:118 static void removeElseAndBrackets(DiagnosticBuilder &Diag, ASTContext &Context, - const Stmt *Else, SourceLocation ElseLoc) { +

[PATCH] D91311: Add new 'preferred_name' attribute.

2020-11-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D91311#2398526 , @rsmith wrote: > [...] Thanks for your detailed explanation. I did not understand the philosophy of the attribute, and it's now clear to me that it shouldn't be tied to the typedef, indeed. > There's another

[PATCH] D91610: [clangd] Add OverriddenBy Relation to index.

2020-11-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/index/Relation.h:31 +/// { Subject = A, Predicate = BaseOf, Object = B }. +/// - "A::Foo is overriden by B::Foo" is represented

[PATCH] D90982: Ignore implicit nodes in IgnoreUnlessSpelledInSource mode

2020-11-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi. I suspect it might be this patch or D90984 that might be leading to the test failure we're seeing on our arm64 builders FAIL: Clang-Unit :: AST/./ASTTests/Traverse.IgnoreUnlessSpelledInSourceImplicit (15871 of 26886) **

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Thanks, generally this seems to be good cleanup. Question on one of the changes below though. Comment at: llvm/lib/Passes/PassBuilder.cpp:2365 + // Don't do anything for (thin)lto backend compiles at O0. + if (Matches[1] != "thinlto" && Mat

[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations

2020-11-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Do `[[deprecated]]` and `[[maybe_unused]]` now work for //using-declarator//s? If so, a test for that would be useful. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:714 - // C++11 attributes are not allowed on a using-declaration, but GNU ones - // a

[PATCH] D91162: Give up on evaluating value-dependent potential constexpr before hitting the assertion.

2020-11-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. oops, this reminds me of the patch https://reviews.llvm.org/D84637 (I should have landed it, sorry), that patch should fix a general recovery-expr crash inside constexpr function body. I think the crash test should be fixed by that (let me check tomorrow). Repository:

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-17 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added a comment. In D91567#2400207 , @aeubanks wrote: > What about removing the existing AlwaysInlinerPass and replacing it with this > one? Or is that something you were planning to do in a follow-up change? That's the plan, yes. >> open the op

[PATCH] D91656: [clang-tidy] add concurrent module

2020-11-17 Thread Vasily Kulikov via Phabricator via cfe-commits
segoon created this revision. segoon added a reviewer: njames93. Herald added subscribers: cfe-commits, lxfind, arphaman, modocache, xazax.hun, mgorny. Herald added a project: clang. segoon requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1.

[PATCH] D91625: [clang] Do not crash on pointer wchar_t pointer assignment.

2020-11-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:8726 +else if (!lhptee->isWideCharType() && + lhptee->hasSignedIntegerRepresentation()) ltrans = S.Context.getCorrespondingUnsignedType(ltrans); I'm wondering whether the

[PATCH] D91428: Add support for multiple program address spaces

2020-11-17 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. @arsenm, Are you suggesting that we just relax the verification rules to allow calling function pointers to arbitrary address spaces without needing any changes to the data layout string? That seems fine to me, but the data layout string solution does allow targets to o

[PATCH] D91428: Add support for multiple program address spaces

2020-11-17 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. While the IR definitely should support mixing functions with different address spaces, I don't see the point of encoding multiple of these in the datalayout Comment at: llvm/include/llvm/IR/DataLayout.h:125-129 + /// Vector of address spaces that can c

[PATCH] D91580: [Frontend] Add flag to allow PCM generation despite compiler errors

2020-11-17 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. I'd like if we only had to use one flag (`-fallow-pcm-with-compiler-errors`) and have it handle both modules and PCH. Could you make the flag also work for PCH and/or add a test that verifies it works? You may only have to change Opts.AllowPCHWithCompilerErrors = Args

  1   2   3   >