[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I'd be in favor of defaulting to an `ERROR` and providing an option to downgrade to a `WARNING`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124489/new/ https://reviews.llvm.org/D124489

[PATCH] D124060: [PowerPC] Enable CR bits support for Power8 and above.

2022-04-26 Thread Amy Kwan via Phabricator via cfe-commits
amyk marked an inline comment as done. amyk added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:519 .Default(false); + Features["crbits"] = llvm::StringSwitch(CPU) +.Case("ppc64le", true)

[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

2022-04-26 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122920#3472379 , @asoffer wrote: > In D122920#3471865 , @yihanaa wrote: > >> In D122920#3471654 , @erichkeane >> wrote: >> >>> @yihanaa :

[PATCH] D124060: [PowerPC] Enable CR bits support for Power8 and above.

2022-04-26 Thread Amy Kwan via Phabricator via cfe-commits
amyk updated this revision to Diff 425417. amyk added a comment. Address review comments of adding documentation to `clang/docs/ClangCommandLineReference.rst` and adding AIX checks to `clang/test/Driver/ppc-crbits.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124487: [HLSL] Adjust access specifier behavior

2022-04-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/ParserHLSL/access_specifiers.hlsl:8 +private: + // expected-note@+2 {{declared private here}} + // expected-note@+1 {{declared private here}} May need tests for `protected:` and `public:`, and possibly for

[PATCH] D123958: [randstruct] Randomize all elements of a record

2022-04-26 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123958/new/ https://reviews.llvm.org/D123958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

2022-04-26 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added a comment. In D122920#3472379 , @asoffer wrote: > In D122920#3471865 , @yihanaa wrote: > >> In D122920#3471654 , @erichkeane >> wrote: >> >>> @yihanaa :

[PATCH] D122258: [MC] Omit DWARF unwind info if compact unwind is present for all archs

2022-04-26 Thread Jez Ng via Phabricator via cfe-commits
int3 added inline comments. Comment at: llvm/lib/CodeGen/MachineModuleInfo.cpp:69 MMI.TM.getMCRegisterInfo(), MMI.TM.getMCSubtargetInfo(), nullptr, - nullptr, false), + , false), MachineFunctions(std::move(MMI.MachineFunctions)) {

[PATCH] D122258: [MC] Omit DWARF unwind info if compact unwind is present for all archs

2022-04-26 Thread Jez Ng via Phabricator via cfe-commits
int3 updated this revision to Diff 425408. int3 marked an inline comment as done. int3 added a comment. Herald added a project: lld-macho. Herald added a reviewer: lld-macho. use MCTargetOptions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-04-26 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.cpp:1 +#include "IntegralLiteralExpressionMatcher.h" + ditto Comment at:

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-04-26 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. LegalizeAdulthood requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

[PATCH] D124316: [clang-tidy] Modernize-macro-to-enum should skip macros used in other macros

2022-04-26 Thread Richard 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 rG693246e03f28: [clang-tidy] Modernize-macro-to-enum should skip macros used in other macros (authored by LegalizeAdulthood). Repository: rG LLVM

[clang-tools-extra] 693246e - [clang-tidy] Modernize-macro-to-enum should skip macros used in other macros

2022-04-26 Thread via cfe-commits
Author: Richard Date: 2022-04-26T21:09:13-06:00 New Revision: 693246e03f28eaa72e0959fe6a969cea655b1fdc URL: https://github.com/llvm/llvm-project/commit/693246e03f28eaa72e0959fe6a969cea655b1fdc DIFF: https://github.com/llvm/llvm-project/commit/693246e03f28eaa72e0959fe6a969cea655b1fdc.diff LOG:

[PATCH] D124316: [clang-tidy] Modernize-macro-to-enum should skip macros used in other macros

2022-04-26 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 425399. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124316/new/ https://reviews.llvm.org/D124316 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2435 DetermineNoUndef(ParamType, getTypes(), DL, AI)) { - Attrs.addAttribute(llvm::Attribute::NoUndef); + if(!FuncAttrs.contains(llvm::Attribute::Convergent)) +

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425394. skc7 added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files: clang/lib/CodeGen/CGCall.cpp

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425393. skc7 added a comment. clang-format to CGCall.cpp. Added comment for the change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files:

[PATCH] D124496: [Clang][Attr] clanf-format update

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. Herald added a project: All. skc7 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D124496 Files: clang/lib/CodeGen/CGCall.cpp Index:

[PATCH] D124493: [symbolizer] Parse DW_TAG_variable DIs to show line info for globals

2022-04-26 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 425379. hctim added a comment. Wrong base, updating. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124493/new/ https://reviews.llvm.org/D124493 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D124493: [symbolizer] Parse DW_TAG_variable DIs to show line info for globals

2022-04-26 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Sorry for the large patch. Honestly, looks bigger than it is due to 1-line changes in many files + many-line changes in stuff that was pretty much moved around. I didn't see a great way to split this up except for sharding out the GlobalValue changes + IR + bitcode

[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

2022-04-26 Thread Moshe via Phabricator via cfe-commits
MosheBerman added a comment. In D123352#3475889 , @NoQ wrote: > I'm worried that even if the warning is correct, the suggested fix is not > necessarily the right solution. > > The very nature of path-sensitive warnings requires multiple events to happen

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. > Making it an ERROR and providing an option to downgrade it to a WARNING seems > reasonable to me. Thoughts? One nice property this would have is it would (eventually) allow us to collect a list of all the places that depend on this old code. It is potentially quite

[PATCH] D124452: [clang-format] Adjust editor cursor position past #include blocks

2022-04-26 Thread Owen Pan via Phabricator via cfe-commits
owenpan marked an inline comment as done. owenpan added inline comments. Comment at: clang/unittests/Format/SortIncludesTest.cpp:895 + Style.IncludeBlocks = Style.IBS_Regroup; + std::string Code = "#include \"b\"\n" // Start of line: 0 + "\n"

[PATCH] D124452: [clang-format] Adjust editor cursor position past #include blocks

2022-04-26 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 425376. owenpan added a comment. Updated the test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124452/new/ https://reviews.llvm.org/D124452 Files: clang/lib/Format/Format.cpp clang/unittests/Format/SortIncludesTest.cpp Index:

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Making it an `ERROR` and providing an option to downgrade it to a `WARNING` seems reasonable to me. Thoughts? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124489/new/ https://reviews.llvm.org/D124489

[PATCH] D124287: [modules][ODRHash] Compare ODR hashes to detect mismatches in duplicate ObjCInterfaceDecl.

2022-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D124287#3474369 , @jansvoboda11 wrote: > This sounds reasonable to me. What use-cases does `ASTStructuralEquivalence` > fit better than ODR hashes? I think the biggest advantage of `ASTStructuralEquivalence` is that it

[PATCH] D124466: [CUDA][HIP] Fix linkage of __clang_gpu_used_external

2022-04-26 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57a210e5b705: [CUDA][HIP] Fix linkage of __clang_gpu_used_external (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 57a210e - [CUDA][HIP] Fix linkage of __clang_gpu_used_external

2022-04-26 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2022-04-26T20:43:39-04:00 New Revision: 57a210e5b705f4d176facbd8a15aa3e89ea9e335 URL: https://github.com/llvm/llvm-project/commit/57a210e5b705f4d176facbd8a15aa3e89ea9e335 DIFF:

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I don't think many people are gonna notice a warning in the general spew of CMake configuration, tbh. Would it be too disruptive to make this an error instead and have a CMake option you can pass to get rid of the error? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-26 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 425354. dgoldman added a comment. Minor formatting fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124486/new/ https://reviews.llvm.org/D124486 Files:

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 425353. beanz added a comment. Making the warning message more specific. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124489/new/ https://reviews.llvm.org/D124489 Files: clang/runtime/CMakeLists.txt Index:

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 425344. jhuber6 added a comment. Making suggested changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124220/new/ https://reviews.llvm.org/D124220 Files: clang/include/clang/Driver/Options.td

[PATCH] D124435: [X86] Always extend the integer parameters in callee

2022-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:2988-2992 +.. option:: -mconservative-extend +Always extend the integer parameter both in the callee and caller. + +.. option:: -mno-conservative-extend +Keep the original integer parameter

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: delcypher, phosek, compnerd, ldionne, smeenai. Herald added a subscriber: mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This patch goes with the RFC posted here:

[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

2022-04-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'm worried that even if the warning is correct, the suggested fix is not necessarily the right solution. The very nature of path-sensitive warnings requires multiple events to happen on the path in order for the problem to manifest. Eliminating even one of those critical

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Posted an RFC: https://discourse.llvm.org/t/rfc-deprecate-and-remove-llvm-build-external-compiler-rt/62058 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124474/new/ https://reviews.llvm.org/D124474

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Dan Liew via Phabricator via cfe-commits
delcypher accepted this revision. delcypher added a comment. This revision is now accepted and ready to land. Change LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124474/new/ https://reviews.llvm.org/D124474

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Dan Liew via Phabricator via cfe-commits
delcypher added a comment. > I'd definitely prefer moving towards LLVM_ENABLE_RUNTIMES. We already require > LLVM_ENABLE_RUNTIMES for libc++, libc++abi and libunwind and I'm going to > propose doing the same for compiler-rt as well. +1 on this. Compiler-RT's CMake code is extremely and

[PATCH] D123436: [Clang] Use std::move in GlobalModuleIndex::readIndex. NFC

2022-04-26 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D123436#3475002 , @dblaikie wrote: > In D123436#3462567 , @dblaikie > wrote: > >> Perhaps GlobalModuleIndex should create the cursor itself - it's being >> handed the buffer anyway?

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Options.td:2527 HelpText<"Use the static host OpenMP runtime while linking.">; +def offload_device_only : Flag<["-"], "offload-device-only">, + HelpText<"Only compile for the offloading device.">;

[PATCH] D124486: [clangd] ExtractVariable support for C and Objective-C

2022-04-26 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. dgoldman requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. - Use the expression's type

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Driver/Options.td:2527 HelpText<"Use the static host OpenMP runtime while linking.">; +def offload_device_only : Flag<["-"], "offload-device-only">, + HelpText<"Only compile for the offloading device.">;

[clang] 35e7b4f - [NFC] Fix argument types in doxygen comment

2022-04-26 Thread Warren Ristow via cfe-commits
Author: Warren Ristow Date: 2022-04-26T16:30:55-07:00 New Revision: 35e7b4f82cfabc28ebc23558917440aece3f489f URL: https://github.com/llvm/llvm-project/commit/35e7b4f82cfabc28ebc23558917440aece3f489f DIFF: https://github.com/llvm/llvm-project/commit/35e7b4f82cfabc28ebc23558917440aece3f489f.diff

[PATCH] D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`.

2022-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 425334. vsapsai marked an inline comment as done. vsapsai added a comment. Drop unnecessary `cast<>`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124285/new/ https://reviews.llvm.org/D124285 Files:

[PATCH] D124285: [clang][NFC] In parts of Objective-C Sema use Obj-C-specific types instead of `Decl`.

2022-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added inline comments. Comment at: clang/include/clang/Sema/Sema.h:3300 - Decl *ActOnObjCContainerStartDefinition(Decl *IDecl); + void ActOnObjCContainerStartDefinition(ObjCContainerDecl *IDecl);

[PATCH] D123534: [dwarf] Emit a DIGlobalVariable for constant strings.

2022-04-26 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked an inline comment as done. hctim added inline comments. Comment at: clang/test/CodeGen/debug-info-variables.c:1 +// RUN: %clang_cc1 %s -debug-info-kind=standalone -S -emit-llvm -o - | FileCheck %s + dblaikie wrote: > Presumably named variables are

[PATCH] D123534: [dwarf] Emit a DIGlobalVariable for constant strings.

2022-04-26 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. > summary of DWARF: > & how many of these descriptions get added to the debug info? afaict, there is now: 1x .debug_addr entry for each string 1x. debug_info DW_TAG_variable for each string 1x. DW_TAG_array_type + DW_TAG_subrange_type for each unique sizeof(string) i

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 425322. python3kgae added a comment. Remove useless brackets. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123884/new/ https://reviews.llvm.org/D123884 Files:

[PATCH] D124435: [X86] Always extend the integer parameters in callee

2022-04-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/CodeGen/CGFunctionInfo.h:120 bool SRetAfterThis : 1; // isIndirect() bool InReg : 1; // isDirect() || isExtend() || isIndirect() bool CanBeFlattened: 1; // isDirect() Instead of

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I pointed out a few (not all) the places where you have unneeded brackets. Also all your new files don't have newlines at the end of them (the C standard specifies that as a requirement although pretty much all compilers just issue a warning). Comment

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 425315. python3kgae added a comment. Fix issues mentioned in comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123884/new/ https://reviews.llvm.org/D123884 Files:

[PATCH] D124469: [NFC] Cleanup miscellaneous header items

2022-04-26 Thread Warren Ristow via Phabricator via cfe-commits
wristow added a comment. Thanks for the review @RKSimon ! Comment at: clang/lib/Headers/__wmmintrin_pclmul.h:25 /// \code -/// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I); +/// __m128i _mm_clmulepi64_si128(__m128i X, __m128i Y, const int I); ///

[PATCH] D124469: [NFC] Cleanup miscellaneous header items

2022-04-26 Thread Warren Ristow 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 rGdf08b3493869: [NFC] Cleanup miscellaneous header items (authored by wristow). Herald added a project: clang. Repository: rG LLVM Github Monorepo

[clang] df08b34 - [NFC] Cleanup miscellaneous header items

2022-04-26 Thread Warren Ristow via cfe-commits
Author: Warren Ristow Date: 2022-04-26T14:36:49-07:00 New Revision: df08b3493869540bad5d4b040dae814e078b411d URL: https://github.com/llvm/llvm-project/commit/df08b3493869540bad5d4b040dae814e078b411d DIFF: https://github.com/llvm/llvm-project/commit/df08b3493869540bad5d4b040dae814e078b411d.diff

[PATCH] D123878: [AMDGPU] Add remarks to output some resource usage

2022-04-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:1178-1266 + +void AMDGPUAsmPrinter::emitResourceUsageRemarks( +const MachineFunction , const SIProgramInfo , +bool isModuleEntryFunction, bool hasMAIInsts) { + if (!ORE) +return; +

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added reviewers: compnerd, ldionne, smeenai. beanz added subscribers: smeenai, ldionne, compnerd. beanz added a comment. I don't want to roadblock or say "no we absolutely can't let this in", _but_... Apple Clang and Swift have long been the only reason we've kept this code alive. I

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Driver/Options.td:2535-2538 +def foffload_device_only : Flag<["-"], "foffload-device-only">, + HelpText<"Only compile for the offloading device.">; +def foffload_host_only : Flag<["-"], "foffload-host-only">, +

[PATCH] D122258: [MC] Omit DWARF unwind info if compact unwind is present for all archs

2022-04-26 Thread Lang Hames via Phabricator via cfe-commits
lhames added inline comments. Comment at: llvm/tools/llc/llc.cpp:697-700 +auto = MMIWP->getMMI().getContext(); +Ctx.setGenDwarfForAssembly(Target->Options.ForceDwarfFrameSection); const_cast(LLVMTM.getObjFileLowering()) +->Initialize(Ctx, *Target);

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Azharuddin Mohammed via Phabricator via cfe-commits
azharudd added a comment. In D124474#3475550 , @beanz wrote: > In D124474#3475539 , @azharudd > wrote: > >> In this case I'm just trying to make it work with existing build >> configurations where it is being

[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

2022-04-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 425303. vsapsai added a comment. Handle in `VisitObjCIvarDecl` only redeclarations in extensions. Interface+interface redeclarations should be handled in VisitObjCInterfaceDecl and implementation+implementation in VisitObjCImplementationDecl. Checked that

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 425301. jhuber6 added a comment. Adding `-fno` variants and replacing the uses of `--cuda-host-only` with and alias and this flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124220/new/

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D124474#3475550 , @beanz wrote: > In D124474#3475539 , @azharudd > wrote: > >> In this case I'm just trying to make it work with existing build >> configurations where it is being

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D124474#3475539 , @azharudd wrote: > In this case I'm just trying to make it work with existing build > configurations where it is being used (for example Swift). We should > definitely be moving away from

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Azharuddin Mohammed via Phabricator via cfe-commits
azharudd added a comment. In D124474#3475432 , @beanz wrote: > I question whether we should be extending this or killing it off... Is there > a reason you're using `LLVM_BUILD_EXTERNAL_COMPILER_RT` instead of > `LLVM_ENABLE_RUNTIMES=compiler-rt`? In

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Driver/Options.td:2535-2538 +def foffload_device_only : Flag<["-"], "foffload-device-only">, + HelpText<"Only compile for the offloading device.">; +def foffload_host_only : Flag<["-"], "foffload-host-only">, +

[PATCH] D124469: [NFC] Cleanup miscellaneous header items

2022-04-26 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Headers/__wmmintrin_pclmul.h:25 /// \code -/// __m128i _mm_clmulepi64_si128(__m128i __X, __m128i __Y, const int __I); +/// __m128i

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Driver/Options.td:2535-2538 +def foffload_device_only : Flag<["-"], "foffload-device-only">, + HelpText<"Only compile for the offloading device.">; +def foffload_host_only : Flag<["-"], "foffload-host-only">, +

[clang] 72adc46 - [PS5] Add debug option testing for the PS5 target

2022-04-26 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-04-26T13:42:38-07:00 New Revision: 72adc461cca59e3ed1fd2409aa592805572b URL: https://github.com/llvm/llvm-project/commit/72adc461cca59e3ed1fd2409aa592805572b DIFF: https://github.com/llvm/llvm-project/commit/72adc461cca59e3ed1fd2409aa592805572b.diff

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Comment at: clang/include/clang/Driver/Options.td:2535-2538 +def foffload_device_only : Flag<["-"], "foffload-device-only">, + HelpText<"Only compile for the offloading device.">; +def foffload_host_only : Flag<["-"], "foffload-host-only">, +

[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

2022-04-26 Thread Moshe via Phabricator via cfe-commits
MosheBerman added a comment. In D123352#3474033 , @whisperity wrote: > Regarding FixIts... FixIts are implemented in the "Diagnostic" library, which > is non-specific to neither Clang-Tidy nor Sema whatsoever, they use the same > infrastructure under

[PATCH] D123313: [OpenMP] Make clang argument handling for the new driver more generic

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123313/new/ https://reviews.llvm.org/D123313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-26 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D112921#3473632 , @pcwang-thead wrote: > In D112921#3473022 , @ldionne wrote: > >> (BTW I strongly support this patch, I just think we should do it properly on >> all platforms from

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I question whether we should be extending this or killing it off... Is there a reason you're using `LLVM_BUILD_EXTERNAL_COMPILER_RT` instead of `LLVM_ENABLE_RUNTIMES=compiler-rt`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Azharuddin Mohammed via Phabricator via cfe-commits
azharudd created this revision. azharudd added reviewers: yln, delcypher, beanz, phosek. Herald added a subscriber: mgorny. Herald added a project: All. azharudd requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When building with

[PATCH] D124452: [clang-format] Adjust editor cursor position past #include blocks

2022-04-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/SortIncludesTest.cpp:895 + Style.IncludeBlocks = Style.IBS_Regroup; + std::string Code = "#include \"b\"\n" // Start of line: 0 + "\n"

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:194 + /// The validator version for dxil. + std::string DxilValidatorVersion; + Rather than adding this to `CodeGenOptions`, it may make sense to put this in `TargetOptions`

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. OK, 1 issue left (see `FriendFunc`). Comment at: clang/test/SemaTemplate/concepts.cpp:436 + SingleDepthReferencesTopLambda(v); + // TODO: This should error on constraint failure! (Lambda!) + SingleDepthReferencesTopLambda(will_fail);

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6223-6224 if (IsCuda || IsHIP) { -if (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false)) +if (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false) || +

[PATCH] D121370: [clang-format] SortIncludes should support "@import" lines in Objective-C

2022-04-26 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk added a comment. In D121370#3471183 , @krasimir wrote: > It appears that this regressed include sorting in the following case, where > the contents of `test.h` show the expected include order and the > `clang-format` behavior before this patch: > >

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 425275. erichkeane added a comment. Update the concepts-test, remove some extra commented out code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119544/new/ https://reviews.llvm.org/D119544 Files: clang/docs/ReleaseNotes.rst

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6223-6224 if (IsCuda || IsHIP) { -if (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false)) +if (Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false) || +

[PATCH] D124220: [OpenMP] Add options to only compile the host or device when offloading

2022-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Driver/Options.td:2535-2538 +def foffload_device_only : Flag<["-"], "foffload-device-only">, + HelpText<"Only compile for the offloading device.">; +def foffload_host_only : Flag<["-"], "foffload-host-only">, +

[clang] 0a27622 - [NVPTX] Disable DWARF .file directory for PTX

2022-04-26 Thread Andrew Savonichev via cfe-commits
Author: Andrew Savonichev Date: 2022-04-26T21:40:36+03:00 New Revision: 0a27622a1d625f179a17f3a22a547d50b042b76e URL: https://github.com/llvm/llvm-project/commit/0a27622a1d625f179a17f3a22a547d50b042b76e DIFF:

[PATCH] D121299: [NVPTX] Disable DWARF .file directory for PTX

2022-04-26 Thread Andrew Savonichev via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0a27622a1d62: [NVPTX] Disable DWARF .file directory for PTX

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-26 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. In D120272#3475155 , @jhuber6 wrote: > Changing this to simply require that the user manually passes `-fgpu-rdc` in > order to use the new driver. I think

[PATCH] D124434: [Clang][Test] Run tests in C++14 mode explicitly.

2022-04-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124434#3475006 , @dblaikie wrote: > @rsmith @aaron.ballman - might be especially interesting to know your > thoughts on the C++ chapter-based testing and what the intent there is as > clang changes default

[PATCH] D124469: [NFC] Cleanup miscellaneous header items

2022-04-26 Thread Warren Ristow via Phabricator via cfe-commits
wristow created this revision. wristow added reviewers: craig.topper, RKSimon. Herald added a subscriber: StephenFan. Herald added a project: All. wristow requested review of this revision. - Explain the use of the _MM_SHUFFLE and _MM_SHUFFLE2 macros - Update some doxygen parameter descriptions

[PATCH] D123878: [AMDGPU] Add remarks to output some resource usage

2022-04-26 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:1178-1266 + +void AMDGPUAsmPrinter::emitResourceUsageRemarks( +const MachineFunction , const SIProgramInfo , +bool isModuleEntryFunction, bool hasMAIInsts) { + if (!ORE) +

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 425261. jhuber6 added a comment. Changing this to simply require that the user manually passes `-fgpu-rdc` in order to use the new driver. I think this makes more sense in the short term and we can move to make the new driver the default rdc approach later.

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-04-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I went through the changes and they look correct to me... yet I'm still mildly terrified. :-D Have you tried running clang-tidy through its paces with ASan/MSan enabled to see if the change introduces any use-after-free issues in practice? Repository: rG LLVM

[PATCH] D124466: [CUDA][HIP] Fix linkage of __clang_gpu_used_external

2022-04-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: mattd. Herald added a project: All. yaxunl requested review of this revision. Different TU's may have this globl var. appending linkage can only be used with lld recognized special variables. Change it to

[PATCH] D124434: [Clang][Test] Run tests in C++14 mode explicitly.

2022-04-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: aaron.ballman, rsmith. dblaikie added a comment. @rsmith @aaron.ballman - might be especially interesting to know your thoughts on the C++ chapter-based testing and what the intent there is as clang changes default versions/new versions are added. (& also whether

[PATCH] D123436: [Clang] Use std::move in GlobalModuleIndex::readIndex. NFC

2022-04-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D123436#3462567 , @dblaikie wrote: > Perhaps GlobalModuleIndex should create the cursor itself - it's being handed > the buffer anyway? Ping on this ^ - would this be a better direction that addresses the concerns?

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D123319#3473693 , @shafik wrote: > In D123319#3473283 , @dblaikie > wrote: > >> ('scuse the delay) >> >> Baseline: I'm still not really sure this is the right direction. Is there a

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2435 DetermineNoUndef(ParamType, getTypes(), DL, AI)) { - Attrs.addAttribute(llvm::Attribute::NoUndef); + if(!FuncAttrs.contains(llvm::Attribute::Convergent)) +

[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers

2022-04-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 425248. ASDenysPetrov marked 4 inline comments as done. ASDenysPetrov edited the summary of this revision. ASDenysPetrov added a comment. @martong thank you for the idea. I've tried to implement it. Could you look at the patch once again, please?

[PATCH] D123534: [dwarf] Emit a DIGlobalVariable for constant strings.

2022-04-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Size still seems moderately concerning, but might be acceptable. Got a summary of what the DWARF looks like now (without names)? (maybe there's something else we can strip/optimize) & how many of these descriptions get added to the debug info? Numbers for Split DWARF

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. Allowing a version on `-stdlib` is intuitively appealing, but I'm not sure it actually gives us the information we need. As I recall, `-stdlib` selects the high-level stdlib and not the low-level one, and those are related in code but not necessarily at

[PATCH] D118409: [OpenMPIRBuilder] Remove ContinuationBB argument from Body callback.

2022-04-26 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In D118409#3474131 , @kiranchandramohan wrote: > I think the CI is complaining about some clang-format issue in > clang/test/OpenMP/critical_codegen_attr.cpp clang-format should not be applied on Clang tests, many of them

[PATCH] D119544: Deferred Concept Instantiation Implementation

2022-04-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:507 + + ContextRAII SavedContext{*this, const_cast(FD)}; + LocalInstantiationScope Scope(*this, true); erichkeane wrote: > This line was the one that fixed the variable lookup in

  1   2   >