[PATCH] D116753: [Driver] Default to -fno-math-errno for musl too

2022-02-04 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG38449c98f3d3: [Driver] Default to -fno-math-errno for musl (authored by alxu, committed by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116753/new

[PATCH] D119071: [Driver][OpenBSD] -r: imply -nostdlib like GCC

2022-02-07 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/D119071/new/ https://reviews.llvm.org/D119071 __

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118804#3304261 , @urnathan wrote: > While C2X has blessed such smaller alignments, the x86_64 ABI (in > particular), has not. However, using that ABI to justify 'It. Is. 16. > Bytes.', is really an exercise in reality denia

[PATCH] D119257: Revert "Re-land [LLD] Remove global state in lldCommon"

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. Thanks to @aganea for working on this. I agree that lld/ELF is not ready for library usage. So far the arguments have always been "the library usage is easy since lld headers happe

[PATCH] D119257: Revert "Re-land [LLD] Remove global state in lldCommon"

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D119257#3306151 , @krzysz00 wrote: > Having checked with other folks more familiar with the context of our > project, it looks like we might actually be fine using lld as a subprocess, > since we'll always be sitting on top o

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Job.cpp:304 +void Command::setRedirectFiles(std::vector> Redirects) { + RedirectFiles = Redirects; Comment at: clang/lib/Driver/Job.cpp:370 + ma

[PATCH] D119309: [Driver][test] Clean up some AIX tests

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: DiggerLin, hubert.reinterpretcast, jasonliu, stevewan, Xiangling_L. Herald added a reviewer: ctetreau. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - For `-###`, `-o %t.o`

[PATCH] D119309: [Driver][test] Clean up some AIX tests

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 407038. MaskRay edited the summary of this revision. MaskRay added a comment. update more Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119309/new/ https://reviews.llvm.org/D119309 Files: clang/test/Driver/a

[PATCH] D117809: [clang] Add an extract-api driver option

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for working on such tools but the patch order is not right. You should implement the functionality first, and in the last, add the driver option. The driver option is user-facing and the availability makes users think the functionality is ready when it actually is

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118948#3295589 , @hctim wrote: > In D118948#3295321 , @MaskRay wrote: > >> I haven't investigated the use case yet, just commented a few things. Please >> split the patch into 3: >> >

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Driver.cpp:690 +if (config->memtagStack || config->memtagHeap) + error("When using --memtag-stack or --memtag-heap, a --memtag-mode value " +"is required."); lld uses the diagnostic format s

[PATCH] D118021: [Driver] Use libatomic for 32-bit SPARC atomics support

2022-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This needs some tests, otherwise there is a risk that others may break your changes when refactoring driver code. The style I favor most is `test/Driver/linux-cross.cpp`. freebsd.c is not too bad. linux-ld.c is somewhat messy but can give you some idea what to test. I'l

[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118070#3308304 , @pkasting wrote: > MaskRay: Friendly ping. I think I still feel that having this in LLVMSupport is strange, but am happy if the two other folks I added are happy... Repository: rG LLVM Github Monorepo C

[PATCH] D119383: [clang][CMake] Add a warning about the Standalone build being deprecated

2022-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aaron.ballman, mstorsjo, rjmccall, rsmith. Herald added a subscriber: mgorny. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For me, `cmake -Hclang -B/path/to/build` currently

[PATCH] D119383: [clang][CMake] Add a warning about the Standalone build being deprecated

2022-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/CMakeLists.txt:16 if(CLANG_BUILT_STANDALONE) set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") set(CMAKE_CXX_STANDARD_REQUIRED YES) For the main branch, we can delete this block. Reposit

[PATCH] D119351: Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS

2022-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Thanks for improving the documentation. I occasionally see folks (and two today!) puzzled by LLVM_ENABLE_RUNTIMES and this patch should help them. Personally I use the `-S -B` style (actually `-H`, but now I see that `-S` is documented I

[PATCH] D119383: [clang][CMake] Add a warning about the Standalone build being deprecated

2022-02-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D119383#3309796 , @tstellar wrote: > I would like to keep this supported upstream as this is how we build clang in > Fedora. If some people find the stand-alone builds burdensome, then I think > it would be best to start a t

[PATCH] D118021: [Driver] Use libatomic for 32-bit SPARC atomics support

2022-02-10 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/solaris-ld.c:20 // CHECK-LD-SPARC32-SAME: "-L[[SYSROOT]]/usr/lib" +// CHECK-LD-SPARC32-SAME: "-zignore" +// CHECK-LD-SPARC32-SAME: "-lato

[PATCH] D106888: [RISC-V] Implement jump tables for CFI-icall

2022-02-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Needs a test in llvm/test/Transforms/LowerTypeTests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106888/new/ https://reviews.llvm.org/D106888 ___ cfe-commits mailing list cfe-co

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-02-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. It may not be worth changing now, but I want to mention: it's more conventional to have a `BoolOption` which adds `-[no-]noundef-analysis`. Since both positive and negative forms exist. When we make the default switch, existing users don't need to change the option. Aft

[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

2022-02-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D110663#3298391 , @MaskRay wrote: > Ping @phosek Ping @phosek Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110663/new/ https://reviews.llvm.org/D110663 __

[PATCH] D119655: [Driver][NetBSD] -r: imply -nostdlib like GCC

2022-02-13 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 D119655#3318003 , @joerg wrote: > I'm ambivalent about this change. To me, it falls into the category of "stop > passing random ld options to the

[PATCH] D119656: [Driver][DragonFly] -r: imply -nostdlib like GCC

2022-02-14 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119656/new/ https://reviews.llvm.org/D119656 _

[PATCH] D118700: Add support to --gcc-toolchain flag for GCC compiled with --enable-version-specific-runtime-libs.

2022-02-14 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. The library path (`lib/gcc/$triple/$libdir`) still looks weird and I think I don't understand the GCC rationale well. If you still think it's the right thing the do, let's do it. For driver

[PATCH] D113738: [LTO] Allow passing -Os/-Oz as the optimization level

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. D72404 has some comments why the -Os/-Oz levels are discouraged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D119612: [clang] Pass more flags to ld64.lld

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:272 - // ld64 version 262 and above run the deduplicate pass by default. - if (Version >= VersionTuple(262) && shouldLinkerNotDedup(C.getJobs().empty(), Args)) + // ld64 version 262 and above

[PATCH] D119612: [clang] Pass more flags to ld64.lld

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/darwin-ld-dedup.c:4 +// -no_deduplicate is only present from ld64 version 262 and later, or lld. +// RUN: %clang -target x86_64-apple-darwin10 -### -fuse-ld= %s \ // RUN: -mlinker-version=261 -O0 2>&1 | FileCheck -ch

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D105169#3321237 , @hyeongyukim wrote: > In D105169#3319773 , @dblaikie > wrote: > >> In D105169#3315009 , @MaskRay >> wrote: >> >>> It may n

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

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `GetTls` is about the static TLS block size. It consists of the main executable's TLS, and initially loaded shared objects' TLS, `struct pthread`, and padding. Solaris should be able to just use the code path like Linux musl: #elif SANITIZER_FREEBSD || SANITIZER_LINUX

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

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The Clang driver change should be in a separate patch with clang/test/Driver tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91605/new/ https://reviews.llvm.org/D91605 ___

[PATCH] D119655: [Driver][NetBSD] -r: imply -nostdlib like GCC

2022-02-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D119655#3318586 , @joerg wrote: > Well, it doesn't work with GCC either, that's why I don't care much about > this change. It just attempts to legalize a user bug (using a linker option > directly as a compiler flag). But I d

[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

2022-02-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping @phosek Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110663/new/ https://reviews.llvm.org/D110663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

2022-02-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D110663#3324598 , @sylvestre.ledru wrote: > Could you please stop with the pings? and chat directly ? (It seems that you > are colleagues?!) > > I would like to follow what is happening here but not get flooded. (I don't min

[PATCH] D119918: [CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLE

2022-02-15 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. Herald added a subscriber: JDevlieghere. Looks great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119918/new/ https://reviews.llvm.org/D1199

[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

2022-02-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 409171. MaskRay edited the summary of this revision. MaskRay added a comment. Detect both unnormalized and normalized paths for compatibility. hack when default -DLLVM_DEFAULT_TARGET_TRIPLE is x86_64-unknown-linux-gnu on Debian. -DLLVM_TARGETS_TO_BUILD=X86

[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

2022-02-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D110663#3324970 , @phosek wrote: > In D110663#3271084 , @MaskRay wrote: > >> No worries! Thanks for the reply. >> >> I use Debian and want it to work well and support the >> `-DLLVM_EN

[PATCH] D119612: [clang] Pass more flags to ld64.lld

2022-02-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:272 - // ld64 version 262 and above run the deduplicate pass by default. - if (Version >= VersionTuple(262) && shouldLinkerNotDedup(C.getJobs().empty(), Args)) + // ld64 version 262 and above

[PATCH] D119309: [Driver][test] Clean up some AIX tests

2022-02-17 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/D119309/new/ https://reviews.llvm.org/D119309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D119829: [Driver] Support Solaris/amd64 GetTls

2022-02-17 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/solaris-ld-sanitizer.c:1 +// General tests that the ld -z relax=transtls workaround is only applied +// on Solaris/amd64. Note that we use

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 424374. MaskRay added a comment. I still do not see the argument about C API, but I just drop that changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124063/new/ https://reviews.llvm.org/D124063 Files: c

[PATCH] D124199: [randstruct] Check final randomized layout ordering

2022-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D124199#3466653 , @void wrote: > Maskray? I think this is likely the failure I saw when I tried fix forward in 46b2a463bdef1bd1d80abee869b09f95ca5a4fc2 .

[PATCH] D123874: [Clang][IA] support -generate-unused-section-symbols={yes|no}

2022-04-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. In D123874#3454723 , @MaskRay wrote: >> Add support to clang (-Wa,-generate-unused-section-symbols={yes|no}) and >> llvm-mc. > > > >> This

[PATCH] D121078: Replace links to archived mailing lists by links to Discourse forums

2022-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay closed this revision. MaskRay added a comment. a749e3295df4aee18a0ad723875a6501f30ac744 pushed by Aaron does not have a `Differential Revision:` line. Manual closing. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D124356: [Driver][Solaris] -r: imply -nostdlib like GCC

2022-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/solaris-ld.c:115 +// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-RELOCATABLE +// CHECK-RELOCATABLE: "-r" +// CHECK-RELOCATABLE-NOT: "-l It's worth testing that there are some `"-L` Repository:

[PATCH] D124356: [Driver][Solaris] -r: imply -nostdlib like GCC

2022-04-25 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. LGTM. Comment at: clang/lib/Driver/ToolChains/Solaris.cpp:168 } - CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crtn.o"))); This a

[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] D124594: [LegacyPM] Remove DataFlowSanitizerLegacyPass

2022-04-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: Sanitizers, browneee, vitalybuka. Herald added subscribers: StephenFan, hiraditya. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a proje

[PATCH] D124594: [LegacyPM] Remove DataFlowSanitizerLegacyPass

2022-04-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D124594#3479195 , @browneee wrote: > I know this is currently used in at least one other place: > https://github.com/tensorflow/tensorflow/blob/dde12a690476650573a0ef3f8f681271a2016224/tensorflow/compiler/xla/service/cpu/compil

[PATCH] D121175: [clang] Add -Wstart-no-unknown-warning-option/-Wend-no-unknown-warning-option.

2022-04-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Probably no from my view, as I got another internal feedback that "this seems rather crufty". It seems that it is the build system maintainer's responsibility. If you add `-Wno-unknown-warning-option` temporarily, after a new clang is rolled, you may remove `-Wno-unknow

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Happy if Aaron is happy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123544/new/ https://reviews.llvm.org/D123544 ___ cfe-commits mailing list c

[PATCH] D123200: [compiler-rt][builtins] Add several helper functions for AVR

2022-04-30 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/cmake/Modules/CompilerRTUtils.cmake:171 check_symbol_exists(__ve__ "" __VE) + check_symbol_exists(__AVR__ "" __AVR) if(__ARM) ---

[PATCH] D124729: [Driver][Ananas] -r: imply -nostdlib like GCC

2022-05-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/ananas.c:20 +// -r suppresses default -l and crt*.o like -nostdlib. +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o \ +// RUN: --target=x86_64-unknown-ananas -r 2>&1 \ Delete -no-canonical-pr

[PATCH] D124729: [Driver][Ananas] -r: imply -nostdlib like GCC

2022-05-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/ananas.c:20 +// -r suppresses default -l and crt*.o like -nostdlib. +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o \ +// RUN: --target=x86_64-unknown-ananas -r 2>&1 \ brad wrote: > MaskRay w

[PATCH] D122424: [clang] [Driver] Add clang's relative `../lib` path only when in build tree

2022-05-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay commandeered this revision. MaskRay edited reviewers, added: mgorny; removed: MaskRay. MaskRay added a comment. Obsoleted by D122444 (Hope I am not mistaken) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122424/new/ https://reviews.llvm.org/D12

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts and

2022-05-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:196 +const char *CreateExportListExec = Args.MakeArgString( +llvm::sys::path::parent_path(ToolChain.getDriver().ClangExecutable) + +"/llvm-nm"); Use sys::path::appe

[PATCH] D123612: [Driver] Support linking to compiler-rt on AVR

2022-05-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:430 + // libgcc distributed with avr-gcc always named 'libgcc.a' even on windows. + return (Twine("libclang_rt.") + Component + Arch + ".a").str(); +} benshi001 wrote: > This method

[PATCH] D129009: [LTO] Fix LTO for aliased IFuncs

2022-07-10 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. As https://github.com/llvm/llvm-project/issues/56290 indicates, when an ifunc is aliased in LTO, clang will attempt to create an alias summary; however, as ifunc is not included in the mod

[PATCH] D128465: [llvm] cmake config groundwork to have ZSTD in LLVM

2022-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. As I mentioned, the proper approach is to add zstd functionality along with the CMake change, instead of adding CMake to all llvm-project components without a way to test them. Comment at: lld/test/lit.site.cfg.py.in:21 config.have_zlib = @LLVM_ENABL

[PATCH] D128048: Add a new clang option "-ftime-trace="

2022-07-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:2831 MarshallingInfoInt, "500u">; +def ftime_trace_path : Joined<["-"], "ftime-trace=">, Group, + HelpText<"Turn on time profiler. Generates JSON file based on output filename. " ---

[PATCH] D129572: [X86] initial -mfunction-return=thunk-extern support

2022-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D129572#3646044 , @erichkeane wrote: > In D129572#3646004 , > @nickdesaulniers wrote: > >> https://godbolt.org/z/rf16T83Kj >> >> IMO, the standards bodies focusing on standardizing at

[PATCH] D128465: [llvm] cmake config groundwork to have ZSTD in LLVM and add ZSTD compression namespace

2022-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D128465#3646203 , @ckissane wrote: > In D128465#3642997 , @MaskRay wrote: > >> As I mentioned, the proper approach is to add zstd functionality along with >> the CMake change, instead

[PATCH] D128465: [llvm] cmake config groundwork to have ZSTD in LLVM and add ZSTD compression namespace

2022-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D128465#3646561 , @ckissane wrote: > In D128465#3646258 , @MaskRay wrote: > >> In D128465#3646203 , @ckissane >> wrote: >> >>> In D128465#3642

[PATCH] D119296: KCFI sanitizer

2022-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Mostly looks good. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2296 + // functions, which means it's safe to skip unusual names. Subset of + // MCAsmInfo::isAcceptableChar() and MCAsmInfoXCOFF::isAcceptableChar(). + for (const char &C : Name) { -

[PATCH] D129654: [Clang][Driver] Fix include paths for `--sysroot /` on OpenBSD/FreeBSD

2022-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Linux tests organization isn't great. --sysroot tests both include and library search paths, so ideally we use one RUN line to test both. The name of linux-header-search.cpp focus on just include search path. For FreeBSD/OpenBSD, if you want to start in a clean state, c

[PATCH] D128465: [llvm] cmake config groundwork to have ZSTD in LLVM and add ZSTD compression namespace

2022-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The patch looks mostly good but please fix the subject and the summary. Note: if you fix the local commit message, you can use ` arc diff --head=HEAD 'HEAD^' --verbatim` to update the subject and the summary. Comment at: llvm/lib/Support/Compression.c

[PATCH] D119296: KCFI sanitizer

2022-07-13 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. Worth waiting a bit and checking whether @pcc has more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119296/new/ https://reviews.llv

[PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

2022-07-13 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: llvm/include/llvm/Support/Compression.h:54 + +void compress(StringRef InputBuffer, SmallVectorImpl &CompressedBuffer, + int Level = DefaultComp

[PATCH] D129714: [Driver] Don't passs --dynamic-linker in -r mode

2022-07-13 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! This is trivially correct but consider giving folks one day to respond. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129714/new/ http

[PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

2022-07-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Why was this reverted? Please make extensive tests especially for something dealing with the build system. When reverting a commit, briefly describe what happened. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128465/new/

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sound good to land the current form (we have sufficient tests for Sema and -fsanitize=array-bounds now) and have `=3` as a separate discussion. Comment at: clang/test/CodeGen/bounds-checking-fam.c:8 +// one-element array as the last emember of a struct

[PATCH] D121141: [Clang] Add `-funstable` flag to enable unstable and experimental features: follow-up fixes

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: urnathan. MaskRay added a comment. LGTM. It may be related, @urnathan wants to add `-std=c++{current,future}` to GCC and may have opinions on the option name. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5840 - if (Args.hasArg(options::OPT_

[PATCH] D129709: [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns

2022-07-14 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. > https://github.com/llvm/llvm-project/issues/56514 > > Fixes #56514 Just use `Fixes https://github.com/llvm/llvm-project/issues/56514` or `Fixes #56514`. GitHub can close the issue automati

[PATCH] D129709: [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/IR/Function.cpp:357 } + if (M->getModuleFlag("fn_return_thunk_extern")) +B.addAttribute(Attribute::FnRetThunkExtern); How about "function_return_thunk_extern"? fn doesn't abbreviate much. Having the `fu

[PATCH] D129714: [Driver] Don't passs --dynamic-linker in -r mode

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `-r -pie` feels like an error to me. `gcc -dumpspecs` uses `%{static|shared|r:;!no-pie:-pie}`, which means `-r` overrides `-pie`. Either match the behavior if report an error. If reporting an error adds too much complexity, just match the behavior. We just shouldn't let

[PATCH] D129772: [clang] Document -femit-compact-unwind flag in the User’s Manual

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/UsersManual.rst:848 + + When to emit DWARF unwind (EH frame) info. This is a Mach-O-specific flag. + I think flag applies to these boolean options. This is an option, not a flag. Repository: rG LLVM Gith

[PATCH] D129789: [test][CodeGen] Don't miss lifetime markers in lifetime tests

2022-07-14 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. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129789/new/ https://reviews.llvm.org/D129789

[PATCH] D129709: [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/test/CodeGen/attr-function-return.c:9 // RUN: --check-prefixes=CHECK,CHECK-EXTERN +// RUN: %clang_cc1 -std=gnu2x -triple x86_64-linux-gnu %s -emit-llvm -o - \ +// RUN: -mfunction-return=thunk-exte

[PATCH] D129709: [clang][CodeGen] add fn_ret_thunk_extern to synthetic fns

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/attr-function-return.c:9 // RUN: --check-prefixes=CHECK,CHECK-EXTERN +// RUN: %clang_cc1 -std=gnu2x -triple x86_64-linux-gnu %s -emit-llvm -o - \ +// RUN: -mfunction-return=thunk-extern -fprofile-arcs \

[PATCH] D121141: [Clang] Add `-funstable` flag to enable unstable and experimental features: follow-up fixes

2022-07-14 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. Herald added a subscriber: StephenFan. Comment at: clang/include/clang/Driver/Options.td:1186 -defm unstable : BoolFOption<"unstable", - LangOpts<"Unstable">, Defaul

[PATCH] D129594: [InstrProf] Add options to profile function groups

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129594/new/ https://reviews.llvm.org/D129594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: Sanitizers, hctim, kstoimenov, vitalybuka. Herald added a subscriber: StephenFan. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits.

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D129832#3654040 , @vitalybuka wrote: > problem with included files that we don't know which non-inlined version of > the function will endup in the binary > so using this option, user may unintentionally disable instrumentat

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 444882. MaskRay added a comment. Warn mainsrc for C++ vague linkage functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129832/new/ https://reviews.llvm.org/D129832 Files: clang/docs/SanitizerSpecialCase

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D129832#3654076 , @vitalybuka wrote: >> mainsrc may still be useful, e.g. if a wildcard is used to ensure the >> prevailing one is ignored. > > Not sure I understand, how can we make that? Usually it's hard to control > what

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: clang/docs/SanitizerSpecialCaseList.rst:108 +caution. It may still be useful, e.g. when patterns are picked in a way to +ensure the prevailing one is ignored. + Added: ``(There i

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 444892. MaskRay added a comment. update doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129832/new/ https://reviews.llvm.org/D129832 Files: clang/docs/SanitizerSpecialCaseList.rst clang/include/clang/Bas

[PATCH] D129832: [sanitizer] Add "mainsrc" prefix to sanitizer special case list

2022-07-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D129832#3654436 , @vitalybuka wrote: > The patch is LGTM, but please consider to keep an ignorelist limited. Thanks! In D129832#3655393 , @kstoimenov wrote: > I think the name 'm

[PATCH] D129832: [sanitizer] Add "mainfile" prefix to sanitizer special case list

2022-07-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 445051. MaskRay retitled this revision from "[sanitizer] Add "mainsrc" prefix to sanitizer special case list" to "[sanitizer] Add "mainfile" prefix to sanitizer special case list". MaskRay edited the summary of this revision. MaskRay added a comment. mainsrc

[PATCH] D129832: [sanitizer] Add "mainfile" prefix to sanitizer special case list

2022-07-15 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 rG0d5a62faca59: [sanitizer] Add "mainfile" prefix to sanitizer special case list (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D129885: [CUDA] Make the new driver properly ignore non-CUDA inputs

2022-07-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/cuda-phases.cu:270 + +// RUN: %clang -### -target powerpc64le-ibm-linux-gnu -ccc-print-phases --offload-new-driver \ +// RUN: --offload-arch=sm_52 --offload-arch=sm_70 %s %S/Inputs/empty.cpp 2>&1 | FileCheck --check-p

[PATCH] D121141: [Clang] Add `-fexperimental-library` flag to enable unstable and experimental features: follow-up fixes

2022-07-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1186 -defm unstable : BoolFOption<"unstable", - LangOpts<"Unstable">, DefaultFalse, - PosFlag, +defm experimental_library : BoolFOption<"experimental-library", + LangOpts<"ExperimentalLibrary">,

[PATCH] D129855: [clang][PowerPC] Set lld as clang's default linker for PowerPC Linux

2022-07-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This is not right as using `ld.lld` as the default linker isn't the majority case. If you want to change the default for your distribution, set `-DCLANG_DEFAULT_LINKER=lld` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129

[PATCH] D128465: [OLD] [llvm] add zstd to `llvm::compression` namespace

2022-07-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Instead of marking a differential `[OLD] ` (which may confuse readers whether this is to be abandoned), you can mark a differential `Request Reviews`/`Request Changes`. Then it will not be in the green state. I clicked "Reopen" to make it clear the patch hasn't relanded

[PATCH] D128667: [WIP] Add Zstd ELF support

2022-07-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. There is kinda consensus that the proper way is to introduce `ELFCOMPRESS_ZSTD` as my proposal https://groups.google.com/g/generic-abi/c/satyPkuMisk did. This is currently blocked by an agreement from Cary Coutant that this value will be added to the generic ABI. https:/

[PATCH] D128465: [OLD] [llvm] add zstd to `llvm::compression` namespace

2022-07-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D128465#3660733 , @ckissane wrote: > In D128465#3660714 , @MaskRay wrote: > >> Instead of marking a differential `[OLD] ` (which may confuse readers >> whether this is to be abandoned)

[PATCH] D109977: LLVM Driver Multicall tool

2022-07-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D109977#3660734 , @mgorny wrote: > In D109977#3660006 , @abrachet > wrote: > >> In D109977#3652467 , @mgorny wrote: >> >>> Though I can reprod

[PATCH] D129401: [libLTO] Set data-sections by default in libLTO for ELF and XCOFF.

2022-07-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:579 + if (Args.hasArg(options::OPT_fno_data_sections)) +CmdArgs.push_back("-plugin-opt=-data-sections=0"); This should be combined with the previous `if` Repository:

[PATCH] D129401: [libLTO] Set data-sections by default in libLTO for ELF and XCOFF.

2022-07-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. Herald added a subscriber: StephenFan. If this is for the legacy LTO interface, please state so. `lld/*/LTO.cpp` sets `c.Options.DataSections = true;` to enable data sections by de

[PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

2022-07-18 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. Does this address the macOS build failure? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128465/new/ https://reviews.llvm.org/D128465 ___

[PATCH] D130065: [X86] Use Min behavior for cf-protection-{return,branch}/ibt-seal module flags

2022-07-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: craig.topper, joaomoreira, pengfei, xiangzhangllvm. Herald added subscribers: jsji, StephenFan. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The

<    6   7   8   9   10   11   12   13   14   15   >