[PATCH] D77334: [AVR] Remove duplicate specification of lib directory

2020-04-11 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Nice catch, cheers. Do you need someone to commit this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77334/new/ https://review

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-11 Thread Ten Tzen via Phabricator via cfe-commits
tentzen created this revision. tentzen added reviewers: rnk, eli.friedman, JosephTremoulet, asmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per Windows SEH Spec, except _leave, all other early exits of a _try (goto/return/continue/break) are considered abnormal exit

[PATCH] D77847: [clangd] Rebuild dependent files when a header is saved.

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 256756. sammccall marked an inline comment as done. sammccall added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77847/new/ https://reviews.llvm.org/D77847 Files: clang-

[PATCH] D77847: [clangd] Rebuild dependent files when a header is saved.

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added a comment. In D77847#1974126 , @kadircet wrote: > should we also have a unittest for checking ast caching works as expected? TUSchedulerTests has `NoopOnEmptyChanges` which I think tests exactly

[PATCH] D77938: [clangd] Extend YAML Serialization

2020-04-11 Thread Mark Nauwelaerts via Phabricator via cfe-commits
mnauw added a comment. This was previously part of D77385 . Rather than a separate file (which seems a bit tricky), the test YAML has simply been included in the unit test itself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D77938: [clangd] Extend YAML Serialization

2020-04-11 Thread Mark Nauwelaerts via Phabricator via cfe-commits
mnauw created this revision. mnauw added a reviewer: sammccall. mnauw added a project: clang-tools-extra. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. mnauw added a comment. This was previously part o

[PATCH] D77776: [Driver] Drop support for FreeBSD < 10

2020-04-11 Thread Greg V via Phabricator via cfe-commits
myfreeweb added a comment. > But the default should indeed be either the host version yep, I've had this patch: --- lib/Support/Triple.cpp.orig 2020-04-10 20:51:46 UTC +++ lib/Support/Triple.cpp @@ -14,6 +14,9 @@ #include "llvm/Support/Host.h" #include "llvm/Support/TargetParse

[PATCH] D77334: [AVR] Remove duplicate specification of lib directory

2020-04-11 Thread Dennis van der Schagt via Phabricator via cfe-commits
dennisschagt added a comment. Thanks! Yes, can you commit it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77334/new/ https://reviews.llvm.org/D77334 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D77940: [AArch64] Add NVIDIA Carmel support

2020-04-11 Thread Raul Tambre via Phabricator via cfe-commits
tambre updated this revision to Diff 256763. tambre added a comment. Remove cacheline size Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77940/new/ https://reviews.llvm.org/D77940 Files: clang/test/Driver/aarch64-cpus.c clang/test/Preprocessor

[PATCH] D77940: [AArch64] Add NVIDIA Carmel support

2020-04-11 Thread Raul Tambre via Phabricator via cfe-commits
tambre created this revision. tambre added reviewers: sdesmalen, paquette. Herald added subscribers: cfe-commits, danielkiss, jfb, hiraditya, kristof.beyls. Herald added a project: clang. tambre updated this revision to Diff 256763. tambre added a comment. tambre edited the summary of this revisio

[PATCH] D77940: [AArch64] Add NVIDIA Carmel support

2020-04-11 Thread Raul Tambre via Phabricator via cfe-commits
tambre updated this revision to Diff 256764. tambre added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77940/new/ https://reviews.llvm.org/D77940 Files: clang/test/Driver/aarch64-cpus.c clang/test/Preprocessor/aarch6

[PATCH] D77847: [clangd] Rebuild dependent files when a header is saved.

2020-04-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks, LGTM! In D77847#1975940 , @sammccall wrote: > In D77847#1974126 , @kadircet wrote: > > > should we

[PATCH] D77908: [WebAssembly] Enable nontrapping-fptoint for `default` cpu

2020-04-11 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. Looks good! I don't have anything to add beyond Thomas' review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77908/new/ https://reviews.llvm.org/D77908 ___ cfe-commit

[PATCH] D75788: [OpenMP] Provide math functions in OpenMP device code via OpenMP variants

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/test/Headers/nvptx_device_math_macro.cpp:11 + double a(0); +// CHECK-NOT: call +// CHECK: call double @llvm.fabs.f64(double Hmm, this fails if the test is run from a directory containing "call". > ; ModuleID

[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, javed.absar. Herald added a project: clang. To avoid excessive extra stat()s, only check the possible locations of headers that weren't found at all (leading

[PATCH] D76768: [analyzer] Added support of scan-build and exploded-graph-rewriter regression tests for Windows

2020-04-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @thakis, > ^ This is not usually true. (But I think lit adds build/bin to the PATH for > tests, so it's possibly true for tests, which would be enough.) AFAIK lit do not add anything to PATH. You should do it by yourself. > If you run `del bin\*` followed by `mak

[clang-tools-extra] a50df66 - [clangd] Remove redundant code in test. NFC

2020-04-11 Thread via cfe-commits
Author: Sam McCall Date: 2020-04-11T17:14:31+02:00 New Revision: a50df668f6889707cad53f1b5339179e337a9eef URL: https://github.com/llvm/llvm-project/commit/a50df668f6889707cad53f1b5339179e337a9eef DIFF: https://github.com/llvm/llvm-project/commit/a50df668f6889707cad53f1b5339179e337a9eef.diff LO

[clang] 52dcbcb - Simplify string joins. NFCI.

2020-04-11 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2020-04-11T17:20:11+02:00 New Revision: 52dcbcbfe07acfe79ac16b343684f8786f1fd0d7 URL: https://github.com/llvm/llvm-project/commit/52dcbcbfe07acfe79ac16b343684f8786f1fd0d7 DIFF: https://github.com/llvm/llvm-project/commit/52dcbcbfe07acfe79ac16b343684f8786f1fd0d7.dif

[PATCH] D77944: [clangd][test] Provide registered targets to lit tests

2020-04-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We had tests in clangd (target_info.test) that got enabled only on systems that know about x86. But the

[PATCH] D77847: [clangd] Rebuild dependent files when a header is saved.

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D77847#1976020 , @kadircet wrote: > Thanks, LGTM! > > In D77847#1975940 , @sammccall wrote: > > > In D77847#1974126 , @kadircet > > wrote: > >

[PATCH] D77938: [clangd] Extend YAML Serialization

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for doing this! Comment at: clang-tools-extra/clangd/unittests/YAMLTests.cpp:1 +//===-- YAMLTests.cpp - YAML container unit tests -===// +// Ack, sorry for not mentioning this in the previous review. Th

[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. At first I thought this would be easy to test via clang/test/PCH, but the outer layers of PrecompiledPreamble seem to be totally distinct from PCHGenerator etc. This is only used in ASTUnit and clangd. Maybe it's reachable in libclang but I couldn't easily work out how

[PATCH] D77944: [clangd][test] Provide registered targets to lit tests

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/test/lit.cfg.py:17 +def calculate_arch_features(arch_string): + features = [] + for arch in arch_string.split():

Re: [PATCH] D63194: [clangd] Link and initialize target infos

2020-04-11 Thread Kadir Çetinkaya via cfe-commits
Hi Filipe! Thanks for letting me know, I've sent https://reviews.llvm.org/D77944 to enable this in clangd lit config. Regarding the failure, I can't seem to repro on machines I have access to. The premerge-tests also seems to be succeeding, please see https://results.llvm-merge-guard.org/BETA_amd6

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-04-11 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D76365#1975784 , @tra wrote: > It appears I can crash clang with some texture code: > https://godbolt.org/z/5vdEwC `llvm.nvvm.tex.unified.2d.v4f32.f32` has a vector output, the alias __attribute__((device)) float tex2d_ld(te

[PATCH] D77847: [clangd] Rebuild dependent files when a header is saved.

2020-04-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D77847#1976077 , @sammccall wrote: > OK, I misunderstood what we're testing, please tell me if I got it right this > time :-) > > Plausible bad behavior: we send a no-op change to a relatively inactive file. > TUScheduler bui

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77632#1975619 , @mehdi_amini wrote: > The existing TLI provides a very convenient way to define a VecLib without > LLVM knowing about it ahead of time. This feature is important for any > embedded use of LLVM as a library o

[PATCH] D77947: [clangd] Send the correct error code when cancelling requests.

2020-04-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. I couldn't quite bring myself to make Cancellation depend on LSP ErrorCode. Magic nu

[PATCH] D75574: RFC: Implement objc_direct_protocol attribute to remove protocol metadata

2020-04-11 Thread Nathan Lanza via Phabricator via cfe-commits
lanza added a comment. > If someone writes up a short proposal for this, with motivation and impact, > we'd be happy to present it internally. I have a rough draft that I'll be touching up and submitting Monday most likely! Thanks, John! Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D77910: AMDGPU: Define cl_khr_gl_sharing as a supported extension

2020-04-11 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. I don't think we can guarantee this is or will be supported on all devices. The language runtime makes this decision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77910/new/ https://reviews.llvm.org/D77910 ___ c

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D77632#1976126 , @tejohnson wrote: > I think this should work. Just reiterating something we chatted about off > patch yesterday, we really need a unit test that mimics the behavior utilized > by the XLA compiler, for regr

[PATCH] D75788: [OpenMP] Provide math functions in OpenMP device code via OpenMP variants

2020-04-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/test/Headers/nvptx_device_math_macro.cpp:11 + double a(0); +// CHECK-NOT: call +// CHECK: call double @llvm.fabs.f64(double sammccall wrote: > Hmm, this fails if the

[PATCH] D77882: [clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py`

2020-04-11 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. please add this to the release notes too :) something like "new option -allow-enabling-alpha-checkers added to run-clang-tidy to enable alpha checkers" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77882/new/ https

[PATCH] D77777: [nvptx] Add `nvvm.texsurf.handle` internalizer.

2020-04-11 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In D7#1975618 , @hliao wrote: > In D7#1975406 , @tra wrote: > > > In D7#1975178 , @hliao wrote: > > > > > the 1st argument in `llvm.nvvm

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77632#1974409 , @tejohnson wrote: > In D77632#1974363 , @wenlei wrote: > > > In D77632#1974015 , @nikic wrote: > > > > > This change causes a ~0.5

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D77632#1975619 , @mehdi_amini wrote: > The existing TLI provides a very convenient way to define a VecLib without > LLVM knowing about it ahead of time. This feature is important for any > embedded use of LLVM as a library out-

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei created this revision. wenlei added reviewers: tejohnson, nikic, mehdi_amini, hoyFB. Herald added subscribers: cfe-commits, hiraditya. Herald added a project: clang. Minor changes to reduce the copying needed for TLI and TLA by using move whenever possible. Repository: rG LLVM Github M

[clang-tools-extra] d34a91a - [clangd][test] Provide registered targets to lit tests

2020-04-11 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-04-11T22:03:08+02:00 New Revision: d34a91a10f7a25e3046f2d74df830a77ef81aebb URL: https://github.com/llvm/llvm-project/commit/d34a91a10f7a25e3046f2d74df830a77ef81aebb DIFF: https://github.com/llvm/llvm-project/commit/d34a91a10f7a25e3046f2d74df830a77ef81aebb.dif

[clang-tools-extra] 5d56712 - [clangd] Disable failing target_info test

2020-04-11 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-04-11T22:17:01+02:00 New Revision: 5d5671242eb731bf3bc504b94b6a472cab23a359 URL: https://github.com/llvm/llvm-project/commit/5d5671242eb731bf3bc504b94b6a472cab23a359 DIFF: https://github.com/llvm/llvm-project/commit/5d5671242eb731bf3bc504b94b6a472cab23a359.dif

[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.

2020-04-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. It is unfortunate that we are testing `PrecompiledPreamble` through clangd rather than its own unittest :/ Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:101 + + // We always receive FileNotFound followed by InclusionDirective. + // We want

[PATCH] D77944: [clangd][test] Provide registered targets to lit tests

2020-04-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked an inline comment as done. Closed by commit rGd34a91a10f7a: [clangd][test] Provide registered targets to lit tests (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D77944?vs=256774

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. yaxunl edited the summary of this revision. Currently clang fails to compile the following CUDA program in device compilation: __host__ int foo(int x) { return 1; } template __device__ __host__ int foo(T x) {

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB added a comment. Thanks for the nice cleanup! Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:456 + TargetLibraryAnalysis(const Triple &T) + : BaselineInfoImpl(TargetLibraryInfoImpl(T)) {} + TargetLibraryAnalysis(const TargetLibraryInfoImpl &BaselineInfo

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If `nvcc` ignores host/device-ness when selecting overloads, that's probably the specified behavior, right? I agree that it would be better to not ignore it, but Clang shouldn't just make up better rules for languages with external specifications. CHANGES SINCE LAST

[PATCH] D77955: [clangd] Add target_info test

2020-04-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, phosek, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D77955 Files: clang-tools-extra/clangd/test/target_info.test Ind

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Needs a testcase in clang/test/CodeGen to verify the generated IR. I haven't looked at this code in a while, but this looks reasonable. Comment at: clang/lib/CodeGen/EHScopeStack.h:164 +F_IsEHCleanupKind = 0x4, +F_HasSehAbnormalExi

[PATCH] D77542: [PowerPC] Treat 'Z' inline asm constraint as a true memory constraint

2020-04-11 Thread Amy Kwan via Phabricator via cfe-commits
amyk added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:277 break; case 'Q': // Memory operand that is an offset from a register (it is // usually better to use `m' or `es' in asm statements) Just curious, but does this ca

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Hongtao Yu via Phabricator via cfe-commits
hoyFB accepted this revision. hoyFB added inline comments. This revision is now accepted and ready to land. Comment at: llvm/include/llvm/Analysis/TargetLibraryInfo.h:456 + TargetLibraryAnalysis(const Triple &T) + : BaselineInfoImpl(TargetLibraryInfoImpl(T)) {} + TargetLib

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D77632#1976231 , @wenlei wrote: > And agree with @tejohnson, if the openness is a feature, it should be covered > in tests, otherwise it can feel somewhat like a loophole and prone to breakage The thing is that LLVM does

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D77954#1976294 , @rjmccall wrote: > If `nvcc` ignores host/device-ness when selecting overloads, that's probably > the specified behavior, right? I agree that it would be better to not ignore > it, but Clang shouldn't just mak

[PATCH] D77390: Fix __builtin_amdgcn_workgroup_size_x/y/z return type

2020-04-11 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/test/CodeGenOpenCL/builtins-amdgcn.cl:541 switch (d) { - case 0: *out = __builtin_amdgcn_workgroup_size_x(); break; + case 0: *out = __builtin_amdgcn_workgroup_size_x() + 1; break; case 1: *out =

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D77954#1976316 , @yaxunl wrote: > In D77954#1976294 , @rjmccall wrote: > > > If `nvcc` ignores host/device-ness when selecting overloads, that's > > probably the specified behavior, right

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGException.cpp:1651 + llvm::Value* Load = CGF.Builder.CreateLoad(Addr, "cleanup.dest"); + IsForEH = CGF.Builder.CreateTrunc(Load, CGM.Int8Ty); +} Is just truncating the value really corr

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-11 Thread Andrew via Phabricator via cfe-commits
browneee updated this revision to Diff 256803. browneee marked 3 inline comments as done. browneee added a comment. Address comments from dblaikie. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77621/new/ https://reviews.llvm.org/D77621 Files: l

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Some parts of this are dependent on the patch that got reverted, but I have some other questions below about the changes in BackendUtil.cpp. Comment at: clang/lib/CodeGen/BackendUtil.cpp:689 // Set up the per-function pass manager. - FPM.add(new

[PATCH] D77632: [TLI] Per-function fveclib for math library used for vectorization

2020-04-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D77632#1976240 , @wenlei wrote: > In D77632#1974409 , @tejohnson wrote: > > > In D77632#1974363 , @wenlei wrote: > > > > > In D77632#1974015

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei marked an inline comment as done. wenlei added a comment. In D77952#1976336 , @tejohnson wrote: > Some parts of this are dependent on the patch that got reverted, but I have > some other questions below about the changes in BackendUtil.cpp. Thank

[PATCH] D77952: [TLI] Reduce copies for TLI and TLA

2020-04-11 Thread Wenlei He via Phabricator via cfe-commits
wenlei updated this revision to Diff 256806. wenlei added a comment. address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77952/new/ https://reviews.llvm.org/D77952 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include/llvm/Analysis/

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm not saying that we need to be bug-for-bug-compatible with `nvcc`, I'm just saying that we should be able to point to *something* to justify our behavior. I take it that the CUDA spec has rules for some amount of host/device-based overloading? What are they based

[PATCH] D77621: ADT: SmallVector size & capacity use word-size integers when elements are small.

2020-04-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: llvm/include/llvm/ADT/SmallVector.h:53 + // The maximum size depends on size_type used. + size_t SizeMax() { return size_type(-1ULL); } dblaikie wrote: > I'd probably use numeric_limits here & make this static const

[PATCH] D77062: [analyzer] Added check for unacceptable equality operation between Loc and NonLoc types

2020-04-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77062#1959286 , @ASDenysPetrov wrote: > @Szelethus , @NoQ please, look at my solution. I'm not sure if it is correct, > but it actually passes all the tests and throw off the issue. Sorry for the late answer, I've been ki

[PATCH] D77390: Fix __builtin_amdgcn_workgroup_size_x/y/z return type

2020-04-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/test/CodeGenOpenCL/builtins-amdgcn.cl:541 switch (d) { - case 0: *out = __builtin_amdgcn_workgroup_size_x(); break; + case 0: *out = __builtin_amdgcn_workgroup_size_x() +

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D77954#1976378 , @rjmccall wrote: > I'm not saying that we need to be bug-for-bug-compatible with `nvcc`, I'm > just saying that we should be able to point to *something* to justify our > behavior. I take it that the CUDA spec

[PATCH] D77954: [CUDA][HIP] Fix overload resolution issue for device host functions

2020-04-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D77954#1976456 , @yaxunl wrote: > In D77954#1976378 , @rjmccall wrote: > > > I'm not saying that we need to be bug-for-bug-compatible with `nvcc`, I'm > > just saying that we should be

[PATCH] D77923: OpenCL: Fix some missing predefined macros

2020-04-11 Thread Jan Vesely via Phabricator via cfe-commits
jvesely added a comment. OPENCL_VERSION sounds like something that should be really set by the opencl driver rather than the compiler. coarse-grained SVM can be done without FEATURE_FLAT_ADDRESS_SPACE, so those gpus can get over 1.2, while the compiler can be used in an implementation that does

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:264 + CheckNoderef(*this, E->getType(), TInfo->getType(), OpLoc); + Warning on this seems reasonable for `static_cast` and `dynamic_cast`, but should `reinterpret_cast` (or the `reinterpret

[PATCH] D77962: PR38490: Support reading values out of __uuidof(X) expressions during constant evaluation.

2020-04-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added reviewers: aeubanks, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. We try to avoid materializing a full _GUID APValue wherever possible; instead, when accessing an individual field, we only extract the corresponding portion o

[PATCH] D77882: [clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py`

2020-04-11 Thread Andi via Phabricator via cfe-commits
Abpostelnicu updated this revision to Diff 256825. Abpostelnicu added a comment. Add release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77882/new/ https://reviews.llvm.org/D77882 Files: clang-tools-extra/clang-tidy/tool/run-clang-tidy.

[PATCH] D77882: [clang-tidy] Add option to use alpha checkers from clang-analyzer when using `run-clang-tidy.py`

2020-04-11 Thread Andi via Phabricator via cfe-commits
Abpostelnicu added a comment. In D77882#1976216 , @sylvestre.ledru wrote: > please add this to the release notes too :) > something like "new option -allow-enabling-alpha-checkers added to > run-clang-tidy to enable alpha checkers" Is it ok just to ad

[PATCH] D77936: [Windows SEH] Fix abnormal-exits in _try

2020-04-11 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 256836. tentzen marked an inline comment as done. tentzen added a comment. Per Eli's feedbacks: (1) a test case (windows-seh-abnormal-exit.c) is added under clang\test\CodeGen directory. (2) an assert is added to catch the extremely rare case that the numbe