[PATCH] D103615: [Clang] Add option for vector compare compatibility.

2021-06-04 Thread Bardia Mahjour via Phabricator via cfe-commits
bmahjour added a comment. As far as I can see, there is no good reason for the special treatment of vector bool/pixel going forward. Could we drop this special treatment, or at least change the default to use a scalar results across the board (consistent with XL's behaviour and clang's current

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-06-04 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-06-04 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Remains the issue with the alignment, I would like to know @MyDeveloperDay 's opinion on that. Should the values be right aligned, or left aligned? As far as I see all alignment in clang-format is left until now. =

[PATCH] D103663: [AMDGPU] Add gfx1013 target

2021-06-04 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. You need to replace HasGFX10_BEncoding with HasGFX10_AEncoding in the BVH and IMAGE_MSAA_LOAD_X. You also need to update llvm.amdgcn.image.msaa.load.x.ll test to include gfx1013. Comment at: llvm/lib/Target/AMDGPU/AMDGPU.td:1106 [FeatureGFX10,

[PATCH] D103707: Add STDC macros

2021-06-04 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan created this revision. Herald added subscribers: jfb, kbarton, nemanjai. Jake-Egan 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/D103707 Files: clang/lib/Basic/T

[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

2021-06-04 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think MachO doesn't have comdats, so we need to leave the `__profd_` linkage as it was. I think private linkage also prevents atomization, which inhibits GC / dead stripping. I don't think this change really makes sense for MachO, so you could reasonably reland with that

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I was wondering, if we could try something new with the tests. To increase our confidence that the expected behavior is correct, how about including a Z3 proof with each of the test cases? For example: (declare-const a ( _ BitVec 32 )) (declare-const b ( _ BitVec

[PATCH] D103082: [AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics

2021-06-04 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma 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/D103082/new/ https://reviews.llvm.org/D103082 ___

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 349938. jcai19 marked an inline comment as done. jcai19 added a comment. Update test cases based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files:

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Ten Tzen via Phabricator via cfe-commits
tentzen added a comment. In D103664#2798732 , @aganea wrote: > Thanks for the quick fix! Would you mind fixing the two failing tests please? > (see above) Hmm, I cannot repro locally.. @zahiraam, currently -EHa is not completely ready yet. we need a co

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 349939. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103664/new/ https://reviews.llvm.org/D103664 Files: clang/lib/CodeGen/CGCleanup.cpp clang/lib/Driver/ToolChains/Clang.cpp Index: clang/lib/Driver/ToolC

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. That looks better, thanks @jcai19 . Based on @DavidSpickett 's LGTM I think this is now ready to land. @DavidSpickett did ask: > Also please include in the commit message t

[PATCH] D103663: [AMDGPU] Add gfx1013 target

2021-06-04 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.intersect_ray.ll:4 +; RUN: llc -global-isel -march=amdgcn -mcpu=gfx1013 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s +; RUN: llc -global-isel -march=amdgcn -mcpu=gfx1012 -v

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D103664#2799725 , @tentzen wrote: > In D103664#2798732 , @aganea wrote: > >> Thanks for the quick fix! Would you mind fixing the two failing tests >> please? (see above) > > Hmm, I ca

[PATCH] D103611: Correct the behavior of va_arg checking in C++

2021-06-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 349945. aaron.ballman added a comment. Changed the test case to speculatively see if the CI pipeline is happy with this (I'm trying to avoid adding a triple to the test). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103611/new/ https://revie

[PATCH] D103605: [analyzer] Introduce a new interface for tracking

2021-06-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:110 + /// (inlined defensive checks, returned null). + bool EnableNullFPSuppression = true; +}; I vaguely remember we wanting to put this def

[clang] ca68f3b - Fix a diagnoses-valid bug with using declarations

2021-06-04 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-06-04T15:52:07-04:00 New Revision: ca68f3bc48e48f839142de1461e95d87ae48e9df URL: https://github.com/llvm/llvm-project/commit/ca68f3bc48e48f839142de1461e95d87ae48e9df DIFF: https://github.com/llvm/llvm-project/commit/ca68f3bc48e48f839142de1461e95d87ae48e9df.diff

[PATCH] D103485: Fix a diagnoses-valid bug with using declarations

2021-06-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the review! I've commit in ca68f3bc48e48f839142de1461e95d87ae48e9df . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-04 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D103184#2799732 , @nickdesaulniers wrote: > That looks better, thanks @jcai19 . Based on @DavidSpickett 's LGTM I think > this is now ready to land. > > @DavidSpickett did ask: > >> Also please include in the commit message t

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Ten Tzen via Phabricator via cfe-commits
tentzen added a comment. @zahiraam, are you removing all those CHECKs: - CHECK: invoke void @llvm.seh.scope.** those are placed there to ensure SEH scope semantic is preserved for Od.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103664/new/ htt

[PATCH] D103605: [analyzer] Introduce a new interface for tracking

2021-06-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D103605#2798581 , @vsavchenko wrote: > In D103605#2798171 , @NoQ wrote: > >> - Trackers are attached to bug reports. A single bug report may have >> multiple trackers. >> - Why not have

[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

2021-06-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 349953. MaskRay edited the summary of this revision. MaskRay added a comment. Exclude Mach-O. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103372/new/ https://reviews.llvm.org/D103372 Files: llvm/lib/Transf

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D103664#2799852 , @tentzen wrote: > @zahiraam, are you removing all those CHECKs: > > - CHECK: invoke void @llvm.seh.scope.** > > those are placed there to ensure SEH scope semantic is preserved for Od.. I was just showing yo

[PATCH] D103605: [analyzer] Introduce a new interface for tracking

2021-06-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:127 +/// into a special block region. +BlockCapture + }; xazax.hun wrote: > There are some other places were we might have effects that are

[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

2021-06-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 349956. MaskRay added a comment. better description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103372/new/ https://reviews.llvm.org/D103372 Files: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp

[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

2021-06-04 Thread Fangrui Song 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 rG9e51d1f348b9: [InstrProfiling] If no value profiling, make data variable private and (for… (authored by MaskRay). Repository: rG LLVM Github Monor

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Ten Tzen via Phabricator via cfe-commits
tentzen added a comment. since I cannot repro it locally, let's have this patch in to resolve -EHa -O2 crashes for now. I will add more -O2 tests in following patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103664/new/ https://reviews.llvm.

[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

2021-06-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:935 + // data variables can be private. This optimization applies on COFF and ELF. + if (!DataReferencedByCode && !TT.isOSBinFormatMachO()) { +Linkage = GlobalValue::PrivateLin

[PATCH] D102736: Fix tmp files being left on Windows builds.

2021-06-04 Thread Amy Huang via Phabricator via cfe-commits
akhuang closed this revision. akhuang added a comment. Committed in 9d070b2f4889887f9ce497592ef01df7b9601a1c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102736/new/ https://re

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D103664#2799944 , @tentzen wrote: > since I cannot repro it locally, let's have this patch in to resolve -EHa -O2 > crashes for now. > I will add more -O2 tests in following patches. Sounds good to me! Repository: rG LLV

[PATCH] D103664: [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Ten Tzen via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG33ba8bd2c942: [Windows SEH]: Fix -O2 crash for Windows -EHa (authored by tentzen). Repository: rG LLVM Github Monorepo

[clang] 33ba8bd - [Windows SEH]: Fix -O2 crash for Windows -EHa

2021-06-04 Thread Ten Tzen via cfe-commits
Author: Ten Tzen Date: 2021-06-04T14:07:44-07:00 New Revision: 33ba8bd2c942062731a17e1b864b5953e3d79f1a URL: https://github.com/llvm/llvm-project/commit/33ba8bd2c942062731a17e1b864b5953e3d79f1a DIFF: https://github.com/llvm/llvm-project/commit/33ba8bd2c942062731a17e1b864b5953e3d79f1a.diff LOG:

[PATCH] D97699: [analyzer] Add InvalidPtrChecker

2021-06-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp:180 +// Note: This pointer has type 'const MemRegion *' +REGISTER_TRAIT_WITH_PROGRAMSTATE(EnvPtrRegion, const void *) + balazske wrote: > Is it not possible t

[PATCH] D103722: [clang] NFC: test for undefined behaviour in RawComment::getFormattedText()

2021-06-04 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added reviewers: teemperor, obruns, bruno. DmitryPolukhin requested review of this revision. Herald added a project: clang. This diff adds testcase for the issue fixed in https://reviews.llvm.org/D77468 but regression test was not added in the d

[PATCH] D103605: [analyzer] Introduce a new interface for tracking

2021-06-04 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103605#2799853 , @NoQ wrote: > In D103605#2798581 , @vsavchenko > wrote: > >> In D103605#2798171 , @NoQ wrote: >> >>> - Trackers are attac

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-04 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. In D103440#2799629 , @xazax.hun wrote: > I was wondering, if we could try something new with the tests. To increase > our confidence that the expected behavior is correct, how about including a > Z3 proof with each of the test cas

[PATCH] D103722: [clang] NFC: test for undefined behaviour in RawComment::getFormattedText()

2021-06-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks for adding more tests! LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103722/new/ https://reviews.llvm.org/D103722 __

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-06-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/test/CodeGenCUDA/device-use-host-var.cu:68 +// NEG-NOT: @_ZL13var_host_only +// NEG-NOT: external This seems to break if the pathname where the llvm checkout lives contains the word "external" https://logs.chrom

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-06-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/device-use-host-var.cu:68 +// NEG-NOT: @_ZL13var_host_only +// NEG-NOT: external sbc100 wrote: > This seems to break if the pathname where the llvm checkou

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-06-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/CodeGenCUDA/device-use-host-var.cu:68 +// NEG-NOT: @_ZL13var_host_only +// NEG-NOT: external yaxunl wrote: > sbc100 wrote: > > This seems to break if the pathname where the llvm checkout lives contains > > the

[PATCH] D103605: [analyzer] Introduce a new interface for tracking

2021-06-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:147 +class ExpressionHandler; +class StoreHandler; + vsavchenko wrote: > xazax.hun wrote: > > During path sensitive analysis we already have a

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-06-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/test/CodeGenCUDA/device-use-host-var.cu:68 +// NEG-NOT: @_ZL13var_host_only +// NEG-NOT: external tra wrote: > yaxunl wrote: > > sbc100 wrote: > > > This seems to break if the pathname where the llvm checkout live

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-06-04 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: clang/docs/UsersManual.rst:1484 + Where unsafe floating point optimizations are enabled, this option + determines whether the optimizer honors parentheses when floating-point + expressions are evaluated. If unsafe floating point opt

[PATCH] D103720: [clang] NFC: Rename rvalue to prvalue

2021-06-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 350006. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103720/new/ https://reviews.llvm.org/D103720 Files: clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp clang

[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

2021-06-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I measured a stage 2 `-DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_INSTRUMENTED_COVERAGE=on` build on Linux x86-64. % ls -1 /tmp/out/s3-custom/**/*.o(.) | wc -l 2174 % stat -c %s /tmp/out/s3-custom/**/*.o(.) | awk '{s+=$1}END{print s}' 6

<    1   2