[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specif

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: sbc100. MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#c

[PATCH] D157157: [clang] Add clang support for Machine Function Splitting on AArch64

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5852 options::OPT_fno_split_machine_functions)) { -// This codegen pass is only available on x86-elf targets. -if (Triple.isX86() && Triple.isOSBinFormatELF())

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay reopened this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1787 +if (!VCI->isMinSignedValue()) { + return EmitAbs(CGF, ArgValue, true); +} nit: we delete

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156821#4599471 , @thurston wrote: > This patch might have broke the buildbots, starting with when it was first > built in https://lab.llvm.org/buildbot/#/builders/85/builds/18390 > > > /b/sanitizer-x86_64-linux-bootstrap-u

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: compiler-rt/test/ubsan/TestCases/Misc/abs.cpp:11 +int main() { + // ABORT: abs.cpp:[[@LINE+3]]:17: runtime error: negation of -{{[0-9]+}} cannot be repres

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:1787 +if (!VCI->isMinSignedValue()) { + return EmitAbs(CGF, ArgValue, true); +} MaskRay wrote: > nit: we delete braces in this cascading case > > https://llvm.org/docs/Coding

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Currenly both Clang and GCC support the following set of flags that control code gen of signed overflow: > [...] > Howerver, clang ignores these flags for __builtin_abs(int) and its > higher-width versions, so passing minimum integer value always causes poison. This

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target/target_clones attributes

2023-08-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, FreddyYe, pengfei, RKSimon, skan. Herald added subscribers: Enna1, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: llvm-

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 551773. MaskRay marked 6 inline comments as done. MaskRay added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158329/new/ https://reviews.llvm.org/D158329 Files: clang/lib/CodeGen

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13272 + uint64_t Mask = llvm::X86::getCpuSupportsMask(FeatureStrs); + uint32_t FeaturesMask[4] = {uint32_t(Mask), uint32_t(Mask >> 32), 0, 0}; + return EmitX86CpuSupports(FeaturesMask);

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry, but I think this change should be reverted. (a) `-fsplit-machine-functions` on an unsupported target now emits a warning instead of an error. This diverges from the regular expectation for target-specific features. % fclang --target=riscv64 -fsplit-machine-fun

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions M

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 551787. MaskRay marked 4 inline comments as done. MaskRay added a comment. Use Lo_32/Hi_32 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158329/new/ https://reviews.llvm.org/D158329 Files: clang/lib/CodeGen/

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13278 +llvm::Value * +CodeGenFunction::EmitX86CpuSupports(std::array FeatureMask) { Value *Result = Builder.getTrue(); erichkeane wrote: > Hmm... I guess size-wise this is on the edge o

[PATCH] D158231: [clang][test] Fix clang machine-function-split tests

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay resigned from this revision. MaskRay added a comment. This revision now requires review to proceed. Sorry, after reading through D157750 , I think the patch should be reverted. Comment at: clang/test/CodeGen/fsplit-machine-functions.c:

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156821#4600605 , @craig.topper wrote: > In D156821#4600550 , @MaskRay wrote: > >>> Currenly both Clang and GCC support the following set of flags that control >> >> code gen of signed

[PATCH] D158378: [Driver] move Minix header search path management to the driver

2023-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thank you for driving the migration! case llvm::Triple::Minix: AddGnuCPlusPlusIncludePaths("/usr/gnu/include/c++/4.4.3", "", "", "", triple); The GCC 4.4.3 thing is from 3e2ee147d0ddb23592b2ec8294381b5e1801cc62 (2010). https://githu

[PATCH] D158385: [tsan] Respect !nosanitize metadata and remove gcov special case

2023-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: Sanitizers, dvyukov, melver, vitalybuka, Enna1. Herald added a subscriber: hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commi

[PATCH] D158378: [Driver] move Minix header search path management to the driver

2023-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D158378#4602375 , @brad wrote: > In D158378#4602289 , @MaskRay wrote: > >> Thank you for driving the migration! >> >> case llvm::Triple::Minix: >> AddGnuCPlusPlusIncludePaths("/us

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to specif

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13318-13320 +Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(i - 1)}; +Value *Features = Builder.CreateAlignedLoad( +Int32Ty, Builder.CreateGEP(ATy, CpuFeatures2, Idxs),

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13318-13320 +Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(i - 1)}; +Value *Features = Builder.CreateAlignedLoad( +Int32Ty, Builder.Create

[PATCH] D156821: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin

2023-08-21 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 rGf0bbda00bd06: [CodeGen] [ubsan] Respect integer overflow handling in abs builtin (authored by artem, committed by MaskRay). Changed prior to commit:

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions s

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 552078. MaskRay marked 3 inline comments as done. MaskRay added a comment. <4 x i32> => <3 x i32> (though no difference at runtime) remove a redundant `= 57` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158329/

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13317 + continue; +Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(i - 1)}; +Value *Features = Builder.CreateAlignedLoad( FreddyYe wrote: > Don't quite understand why w

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: brad. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This ToolChain was added back in 2010 but has been unmaintained with no test. The constructe

[PATCH] D158378: [Driver] move Minix header search path management to the driver

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created https://reviews.llvm.org/D158461 to remove it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158378/new/ https://reviews.llvm.org/D158378 ___ cfe-commits mailing list cfe

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D158461#4605084 , @brad wrote: > Isn't there more than this to do a full proper removal? > > Looking around it looks like the Ananas and Contiki support can be removed. > Ananas used > to use Clang but switched back to GCC and

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp and Contiki.cpp

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 552171. MaskRay retitled this revision from "[Driver] Remove unlikely-working Minix.cpp" to "[Driver] Remove unlikely-working Minix.cpp and Contiki.cpp". MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a project: LLVM. Herald

[PATCH] D158476: [driver] Search for compatible Android runtime directories

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > // Android target triples contain a target version. If we don't have > libraries for the exact target version, we should fall back to the next > newest version or a versionless path, if any. An Android maintainer can override my opinion but my feeling is that this ad

[PATCH] D158461: [Driver] Remove unlikely-working Minix.cpp and Contiki.cpp

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 552204. MaskRay added a comment. update gn Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158461/new/ https://reviews.llvm.org/D158461 Files: clang/lib/Basic/Targets.cpp clang/lib/Basic/Targets/OSTargets.h

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13319 +Value *Features = Builder.CreateAlignedLoad( +Int32Ty, Builder.CreateGEP(ATy, CpuFeatures2, Idxs), +CharUnits::fromQuantity(4)); FreddyYe wrote: > MaskRay wrote:

[PATCH] D117929: [XRay] Add support for RISCV

2023-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Context not available See https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface Comment at: compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake:83 set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS6

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/hipstdpar.c:1 +// RUN: not %clang -### -hipstdpar --compile %s 2>&1 | \ +// RUN: FileCheck --check-prefix=HIPSTDPAR-MISSING-LIB %s Better to use `--hipstdpar` instead of `-hipstdpar`. In GCC, `-h` is

[PATCH] D158252: Fix regression of D157680

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/x86-no-gather-no-scatter.cpp:2 /// Tests -mno-gather and -mno-scatter -// RUN: %clang -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s -// RUN: %clang_cl -c /Qgather- -### %s 2>&1 | FileCheck --chec

[PATCH] D158329: [X86] Support arch=x86-64{,-v2,-v3,-v4} for target_clones attribute

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. (I think there is no action item on my side and this patch is good for review) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158329/new/ https://reviews.llvm.org/D158329 ___ cfe-

[PATCH] D158612: [flang][driver] Ensure negative flags have the same visibility as positive

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: flang/test/Driver/fintegrated-as.f90:15 +! +! Without `-fno-integrated-as` (default) / With `-fintegrated-as` +!-

[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

2023-10-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557659. MaskRay added a comment. test rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152279/new/ https://reviews.llvm.org/D152279 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/RISCV

[PATCH] D156286: [docs] Bump minimum GCC version to 7.5

2023-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156286#4534968 , @aaron.ballman wrote: > There's a mention on the RFC thread that Ubuntu 18.04 still ships with GCC > 7.3. That's an LTS release but it EOLed just last month, so it's not clear > how disruptive this would be

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156363#4544803 , @aaron.ballman wrote: > In D156363#4544782 , @thakis wrote: > >> http://45.33.8.238/linux/113921/step_7.txt is failing due to this. Is this >> something on my end? >

[PATCH] D146054: [RISCV] Add --print-supported-extensions support

2023-07-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4340 +} + } no blank line here Comment at: clang/test/Driver/print-supported-extensions.c:93 +// CHECK-NEXT: xventanacondops 1.0 +// +// CHECK:Experimental e

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156363#4545410 , @phosek wrote: > We see 14 failing tests on our Linux and macOS builders, and 6 failing tests > on Windows builders: > > - `Clang :: Driver/csky-toolchain.c` > - `Clang :: Driver/env.c` > - `Clang :: Driver/f

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156363#4545215 , @dyung wrote: > If you cannot reproduce this issue, I can take my buildbot offline and try to > reproduce it to pinpoint which command is causing the problem, but I won’t be > able to do so until Monday. Th

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156363#4546818 , @dyung wrote: > In D156363#4546171 , @dyung wrote: > >> In D156363#4545474 , @MaskRay >> wrote: >> >>> In D156363#4545215

[PATCH] D156286: [docs] Bump minimum GCC version to 7.4

2023-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 545768. MaskRay retitled this revision from "[docs] Bump minimum GCC version to 7.5" to "[docs] Bump minimum GCC version to 7.4". MaskRay edited the summary of this revision. MaskRay added a comment. 7.5 => 7.4 Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D156286: [docs] Bump minimum GCC version to 7.4

2023-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 545769. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a subscriber: bd1976llvm. reword description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156286/new/ https://reviews.

[PATCH] D156286: [docs] Bump minimum GCC version to 7.4

2023-07-31 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 rG1e06b82bded6: [docs] Bump minimum GCC version to 7.4 (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D156588: feat: Add support for Rocky Linux to LLVM Distro

2023-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156588#4544152 , @tbaeder wrote: > @MaskRay Isn't this something we should be doing with config files now? I agree. This should use https://clang.llvm.org/docs/UsersManual.html#configuration-files . We should try to remove e

[PATCH] D156286: [docs] Bump minimum GCC version to 7.4

2023-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/docs/GettingStarted.rst:345 * Apple Clang 10.0 -* GCC 7.1 +* GCC 7.4 * Visual Studio 2019 16.7 PiotrZSL wrote: > What about Glibc version ? > I were using GCC 9.1 + glibc 2.13 + some old kernel to compile Clang 15

[PATCH] D156286: [docs] Bump minimum GCC version to 7.4

2023-07-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/docs/GettingStarted.rst:284-298 `python `_ >=3.6 Automated test suite\ :sup:`2` `zlib `_ >=1.2.3.4 Compression library

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I glanced at the patch. The code seems reasonable. Comment at: clang/test/lit.cfg.py:383 -# The llvm-nm tool supports an environment variable "OBJECT_MODE" on AIX OS, which +# Some tool support an environment variable "OBJECT_MODE" on AIX OS, which

[PATCH] D156771: [clang][hexagon] Handle library path arguments earlier

2023-08-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. (After D156363 , newer tests can use `-### -Werror` instead of `-fdriver-only -v -Werror` :) ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156771/new/ https://reviews.llvm.org/D156771 _

[PATCH] D156886: [CUDA][HIP] Reorganize options for documentation

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:155 +def offload_Group : OptionGroup<"">, Group, + DocName<"Common Offloading flags">; + The existing `flags` uses are misnomer (`Fl

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:74 + << " -U- Use actual timestamps and uids/gids\n" + << " -X{32|64|32_64|any} - Specifies which archive symbol tables " + "should be generated if they do not

[PATCH] D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think `assert((A == B || (A->getOverloadedOperator() == OO_EqualEqual && B->getOverloadedOperator() == OO_EqualEqual)) && ...);` would look better , but the current form is fine as well. > You will see 2 failures in > llvm/llvm-project/clang/test/CodeGen:available-ex

[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D156363#4554812 , @jhuber6 wrote: > In D156363#4554790 , @ro wrote: > >> In D156363#4553043 , @ro wrote: >> >>> It seems the latest commit of t

[PATCH] D156930: [Clang] Fix Offloading related tests after D156363

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! I guess `--rocm-path=` can be used in some places, but `-nogpulib -nogpuinc` is good as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D156861: [Driver] Remove references to Solaris 12

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. While you are modifying the lines `static const char ...[]` should look better than `static const char *const SolarisX86Triples[]` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D156925: [Driver] Don't try to spell check unsupported options

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Looks great! We've had `def _ : Joined<"--">` since commit 46fffee081b583a617fa94397b0c758bdf3a4a80 (2009) when TableGen based options were introduced. Due to it, the error messages are sli

[PATCH] D156962: [Driver] Mark m_x86_Features_Group options as TargetSpecific

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: pengfei, skan, RKSimon. Herald added a subscriber: kristof.beyls. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. so that they lead to an error whe

[PATCH] D125788: [flang][driver] Rename `flang-new` as `flang`

2023-08-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added a subscriber: jplehr. If you continue this work, consider landing this rename in multiple phases, e.g. - Use lit substitutions instead of `flang-new` and other preparatory stuff so that the next step has very little change - change flang-new to flang and add

[PATCH] D157013: [Driver] Allow for sparcv8plus subdir with Solaris/SPARC GCC

2023-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/lit.local.cfg:23 ".yaml", +".test", ] Instead of adding a new extension, you can just name your test `.c`? Re

[PATCH] D157013: [Driver] Allow for sparcv8plus subdir with Solaris/SPARC GCC

2023-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/lit.local.cfg:23 ".yaml", +".test", ] ro wrote: > MaskRay wrote: > > Instead of adding a new extension, you can just name your test `.c`? > I could, but went for `.test` instead because the `

[PATCH] D157028: [llvm] Extract common `OptTable` bits into macros

2023-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'll be away for a few days but I took a quick glance. This change looks reasonable. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157028/new/ https://reviews.llvm.org/D157028 _

[PATCH] D156962: [Driver] Mark m_x86_Features_Group options as TargetSpecific

2023-08-03 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 rG5fd5f8027fa1: [Driver] Mark m_x86_Features_Group options as TargetSpecific (authored by MaskRay). Changed prior to commit: https://reviews.llvm.or

[PATCH] D157028: [llvm] Extract common `OptTable` bits into macros

2023-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. In D157028#4558724 , @jansvoboda11 wrote: > Here's an example of a patch that changes the `OPTION` macro: D157029 >

[PATCH] D157028: [llvm] Extract common `OptTable` bits into macros

2023-08-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Driver.h:28 OPT_INVALID = 0, -#define OPTION(_1, _2, ID, _4, _5, _6, _7, _8, _9, _10, _11, _12) OPT_##ID, +#define OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__), #include "Options.inc" lld/wasm lld/COFF lld/MachO

[PATCH] D157029: [llvm] Construct option's prefixed name at compile-time

2023-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This increases the size of `Info` (static data size and static relocations). In return, some dynamic relocations are saved. Is this a net win? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157029/new/ https://reviews.llvm

[PATCH] D157275: [Driver] Select newest GCC installation on Solaris

2023-08-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2193 // Skip other prefixes once a GCC installation is found. -if (Version > VersionZero) +// Solaris GCC installations live in separate Prefixes per Version +// (/usr/gcc/) that arriv

[PATCH] D157410: [Flang] Enable Rpass flag

2023-08-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:521 + // -R[no-]group[=regexp] and -R[no-]everything flags + Args.AddAllArgs(CmdArgs, options::OPT_R_Group); These are options, not flags (boolean). Repository: rG LLVM Githu

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Some test suggestions Comment at: clang/lib/Basic/Targets/LoongArch.cpp:203 + StringRef ArchName = getCPU(); + Builder.defineMacro("__loongarch_arch", Twine("\"") + ArchName + Twine("\"")); + Use the `

[PATCH] D156866: [Clang][LoongArch] Use the ClangBuiltin class to automatically generate support for CBE and CFE

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/LoongArch/intrinsic-la32-error.c:2 // RUN: %clang_cc1 -triple loongarch32 -emit-llvm -S -verify %s -o /dev/null +// RUN: not %clang_cc1 -triple loongarch32 -DFEATURE_CHECK -emit-llvm %s 2>&1 \ +// RUN: | FileCheck %

[PATCH] D157029: [llvm] Construct option's prefixed name at compile-time

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LG! LLVMOption has users in llvm/ clang/ lldb/ lld/ clang-tools-extra/ flang/. You'll need to check that all the affected users are migrated... Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D157054: [clang] NFC: Use compile-time option spelling when generating command line

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157054/new/ https://reviews.llvm.org/D157054 __

[PATCH] D157520: [Driver] Replace a link to openradar with a comment. NFC

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. https://openradar.appspot.com/7198997 says `Date Originated:04-Sep-2009 06:00 PM`. Is the very old linker bug still relevant? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157520/new/ https://reviews.llvm.org/D157520

[PATCH] D157445: [CodeGen][UBSan] getUBSanFunctionTypeHash does not handle the attributed function case correctly, leading to an assertion failure. This patch desugars the QualType if it is of Attribu

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The title is very long. Can you shorten it and put additional description to the body of the commit message (aka summary)? What does the test `ubsan-function-attributed.c` do? It lacks comments to help reader understand the issue. Repository: rG LLVM Github Monorepo

[PATCH] D157445: [CodeGen][UBSan] Add support for handling attributed functions in getUBSanFunctionTypeHash.

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/ubsan-function-attributed.c:4 +//Make sure compiler does not crash inside getUBSanFunctionTypeHash while compiling this +long __attribute__((ms_abi)) f() {} https://maskray.me/blog/2021-08-08-toolchai

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D155290#4572965 , @qiongsiwu1 wrote: > Ping for review. > > If there are no comments on whether we should add `-lpthread` for platforms > other than AIX, I will land this patch soon, and let the official buildbots > check fo

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D155540#4574613 , @lei wrote: > I was thinking to commit this patch to minimize the dependencies if there are > no objections. @MaskRay @nemanjai any preferences? LGTM. Please commit it. Repository: rG LLVM Github Monorep

[PATCH] D130531: [IR] Use Min behavior for module flag "PIC Level"

2023-09-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D130531#4644687 , @aeubanks wrote: > I'm not understanding why this doesn't also apply to "PIE Level", doesn't it > also follow the same reasoning? pic -> PIC is the same as pie -> PIE > > e.g. if you merge a small PIC and lar

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-09-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. FWIW: adding parentheses for expressions, such as `overflow = (4608 * 1024 * 1024) ? 4608 * 1024 * 1024 : 0;`, and `results.reason = (actions & _UA_SEARCH_PHASE) ? ... : ...`, looks unnatural and is too noisy to me. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

2023-09-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D152279#4638173 , @asb wrote: > In D152279#4612099 , @craig.topper > wrote: > >> In D152279#4612087 , @MaskRay >> wrote: >> >>> I am still in

[PATCH] D154388: Don't pass -ibuiltininc, which is used only by the driver, to CC1

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1309 +} else if (A->getOption().matches(options::OPT_ibuiltininc)) { + // This is used only by the driver. No

[PATCH] D154397: [Driver] Default to -ftls-model=initial-exec on SerenityOS

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I don't think this belongs to the upstream, either. Note: musl's TLS implementation is very clean and may be a good reference. https://maskray.me/blog/2021-02-14-all-about-thread-local-storage > glibc ld.so reserves some space in static TLS blocks and allows dlopen on

[PATCH] D154396: [clang] Add support for SerenityOS

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Upstreaming support requires rigid testing, otherwise it's fairly easy for other contributors to break your code while refactoring. https://maskray.me/blog/2021-08-08-toolchain-testing "I don't know whether a test is needed" `clang/test/Driver` has many tests that could

[PATCH] D154396: [clang] Add support for SerenityOS

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:85 + auto linkerIs = [Exec](const char *name) { +return llvm::sys::path::filename(Exec).equals_insensitive(name) || + llvm::sys::path::stem(Exec).equals_insensitive(name); -

[PATCH] D145227: [LLVM][OHOS] Clang toolchain and targets

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a subscriber: wangpc. Comment at: clang/lib/Driver/ToolChains/OHOS.h:38 + bool isPICDefaultForced() const override { return false; } + bool useRelaxRelocations() const override { return false; } + UnwindLibType GetUnwindLibType(const

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153835/new/ https://reviews.llvm.org/D153835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Seems reasonable. I assume that there isn't a way to add a portable test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154531/new/ https://reviews.llvm.org/D154531 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D153600: Implement -frecord-command-line for XCOFF

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/MC/MCAsmStreamer.cpp:972 +void MCAsmStreamer::emitXCOFFCInfoSym(StringRef Name, StringRef Metadata) { + const char *InfoDirective = "\t.info "; + const char *Separator = ", "; Repository: rG LLVM Github M

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:153 + const XRaySledEntry &Sled) XRAY_NEVER_INSTRUMENT { + // FIXME: In the future we'd need to distinguish between non-tail exits and + // tail exits for better infor

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:23 +enum PatchOpcodes : uint32_t { + PO_ADDID = 0x02c0, // addi.d rd, rj, imm + PO_SD = 0x29c0, // st.d rd, base, offset I think the `PO_` style actually harms rea

<    21   22   23   24   25   26   27   28   29   30   >