[PATCH] D109977: LLVM Driver Multicall tool

2022-07-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D109977#3662859 , @mgorny wrote: > Ok, I think the key to reproducing it is `-DLLVM_LINK_LLVM_DYLIB=ON`. We pass > that while building LLVM, so it gets passed on to clang but I suppose passing > it to clang build might be suf

[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 marked 3 inline comments as done. MaskRay added a comment. Thanks:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130065/new/ https://reviews.llvm.org/D130065 ___ cfe-commits mailing list cfe-com

[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
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG23ba688f02ea: [X86] Use Min behavior for cf-protection-{return,branch}/ibt-seal module flags (authored by MaskRay). Repository: rG LLVM Github Mon

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: danielkiss, pcc. Herald added subscribers: StephenFan, hiraditya, kristof.beyls. Herald added a project: All. MaskRay requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, cfe-commits, s

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

2022-07-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am unsure about the `llvm/lib/LTO/LTOCodeGenerator.cpp` logic. Can't your downstream project set `Config.Options.DataSections = true;` instead? Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:572 CmdArgs.push_back("-plugin-opt=-function-s

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 446053. MaskRay added a comment. remove a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130145/new/ https://reviews.llvm.org/D130145 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGen/aarch

[PATCH] D129401: [libLTO] Set data-sections by default in libLTO.

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Mostly looks good, with a nit in the test and some suggestion to the summary. In D129401#3662857 , @quinnp wrote: >> If this is for the legacy LTO interface, please state so. `lld/*/LTO.cpp` >> sets `c.Options.DataSections = tr

[PATCH] D67025: Add .inl as valid C++ header type

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I agree that this is not suitable in clang, but can be in clangd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67025/new/ https://reviews.llvm.org/D67025 ___ cfe-commits mailing

[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: compnerd, jrtc27, kito.cheng. Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jone

[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 446239. MaskRay added a comment. incompatible => unsupported since it is implementable (but difficult). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130190/new/ https://reviews.llvm.org/D130190 Files: clan

[PATCH] D129401: [libLTO] Set data-sections by default in libLTO.

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/forwarding-sections-liblto.c:2 +// RUN: touch %t.o +// RUN: %clang %t.o -### -flto 2>&1 | FileCheck %s +// RUN: %clang %t.o -### -flto 2>&1 -ffunction-sections -fdata-sections | \ Using a default triple

[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:10 #include "RISCV.h" +#include "../Clang.h" #include "ToolChains/CommonArgs.h" compnerd wrote: > This feels like a layering violation. I suppose that as long as modular > b

[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:146 +Arg *A; +if (getDebugFissionKind(D, Args, A) != DwarfFissionKind::None) + D.Diag(clang::diag::err_drv_riscv_unsupported_with_linker_re

[PATCH] D130161: Added command-line options to exclude functions from function instrumentation output.

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. See https://clang.llvm.org/docs/SanitizerSpecialCaseList.html , -fsanitize-ignorelist and `*san_ignorelist.txt` in the Clang resource directory. If you can state your motivation, I am happy to implement it as I just modified related code for sanitizers. Repository: r

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

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D129009#3665664 , @SchrodingerZhu wrote: > Hi, is there anything else I should do for this patch? There is no. I am waiting a bit to collect more response. I'll do some testing and push this. Thanks for your contribution.

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

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 446277. MaskRay added a comment. Add blank lines remove trailing whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129009/new/ https://reviews.llvm.org/D129009 Files: llvm/include/llvm/IR/GlobalIFunc.

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

2022-07-20 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 rG304027206c88: [ThinLTO] Support aliased GlobalIFunc (authored by SchrodingerZhu, committed by MaskRay). Changed prior to commit: https://reviews.l

[PATCH] D130138: [modules] Replace `-Wauto-import` with `-Rmodule-include-translation`.

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D130138#3664913 , @iains wrote: > makes sense to me... > > I guess the name looks long at first, but it's specific (I find that > easy-to-remember flag names are more important than short-to-type ones, but > maybe that's just

[PATCH] D130078: [flang][nfc] Rename `AddOtherOptions` as `ForwardOptions`

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `forwardOptions` will be better if you are renaming it anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130078/new/ https://reviews.llvm.org/D130078 ___ cfe-commits mailing

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

2022-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D129855#3662457 , @quinnp wrote: > In D129855#3657006 , @MaskRay wrote: > >> This is not right as using `ld.lld` as the default linker isn't the majority >> case. If you want to change

[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:146 +Arg *A; +if (getDebugFissionKind(D, Args, A) != DwarfFissionKind::None) + D.Diag(clang::diag::err_drv_riscv_unsupported_with_linker_relaxation) compnerd wrote:

[PATCH] D129401: [libLTO] Set data-sections by default in libLTO.

2022-07-21 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. There are some nits for tests. I'll step away and just LGTM. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:579 + else if (Args.hasArg(options::OPT_fno_data_sectio

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-21 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/D130322/new/ https://reviews.llvm.org/D130322

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/LoongArch.cpp:26 + // TODO: To be implemented in future. + return ArrayRef(); +} `return {}` Comment at: clang/test/Driver/frame-pointer.c:60 +// RUN: %clang -target loongar

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:480 +LibDir = std::string(getOSLibDir(Triple, Args)); +StringRef ABIName = tools::loongarch::getLoongArchABI(Args, Triple); +Loader = ("ld-linux-loongarch-" + ABIName + ".so.1").str(); --

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I notice that in gcc, -march/-mtune/-mcpu are handled in gcc/config/* and every port may have somewhat different behaviors. E.g. x86 and aarch64 are different (and I suspect x86 has the weird behavior). Have you checked that whether this matches GCC? We need some clang/

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2225 +StringRef Name = A->getValue(); + +std::string TuneCPU; delete blank line after a variable declaration Comment at: clang/lib/Driver/ToolChains/Clang.

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Testing and will push in one minute Comment at: clang/lib/CodeGen/CGObjCRuntime.h:37 namespace CodeGen { + class CGFunctionInfo; class CodeGenFunction; The style is to remove indentation. I'll fix it. Repository: rG LLVM Github

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-22 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 rG37502e042ff0: [clang][CodeGen] Only include ABIInfo.h where required (NFC) (authored by barannikov88, committed by MaskRay). Changed prior to commit

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

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am still seeing the zstdConfig.cmake zstd-config.cmake warning. @ckissane @phosek will you fix it? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128465/new/ https://reviews.llvm.org/D128465 _

[PATCH] D129891: [test-suite] Update the test suite for changes to -Wint-conversion

2022-07-22 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: StephenFan. Thanks! This is similar to D123241 Repository: rT test-suite CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-22 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/Arch/Sparc.cpp:121 +StringRef CPUName = A->getValue(); + +if (CPUName == "native") { delete blank line

[PATCH] D116070: [X86] Enable ibt-seal optimization when LTO is used in Kernel

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added subscribers: jsji, StephenFan. Herald added a project: All. The module flags metadata usage "Override" was wrong. I fixed it by using "Min". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116070/new/ https://rev

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4415-4430 -// Upgrade branch protection and return address signing module flags. The -// module flag behavior for these fields were Error and now they are Min.

[PATCH] D130078: [flang][nfc] Rename `AddOtherOptions` as `ForwardOptions`

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D130078#3669072 , @awarzynski wrote: > In D130078#3667188 , @MaskRay wrote: > >> `forwardOptions` will be better if you are renaming it anyway. > > I'd rather create a separate patch a

[PATCH] D119296: KCFI sanitizer

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. (Will read new updates.) Note that release/15.x is branching soon (https://discourse.llvm.org/t/llvm-15-0-0-release-schedule/63495): 2022-07-26. It seems that we can miss the branch to have more time mature the feature and have it for 16.0. Repository: rG LLVM Githu

[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation

2022-07-22 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 rG80a4e6fd31a0: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation (authored by MaskRay). Changed prior to commit: https://reviews.llvm.

[PATCH] D130063: [Driver] Enable sanitizers on FreeBSD AArch64

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Herald added a subscriber: StephenFan. > [Driver] Enable sanitizers on FreeBSD AArch64 Be specific what sanitizers are enabled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130063/new/ http

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-07-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/LoongArch.h:24 + +class LoongArchTargetInfo : public TargetInfo { +protected: LLVM_LIBRARY_VISIBILITY Comment at: clang/lib/Basic/Targets/LoongArch.h:35 +SuitableAlign = 128

[PATCH] D130063: [Driver] Enable sanitizers on FreeBSD AArch64

2022-07-24 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 rG92df59c83d0d: [Driver] Enable some sanitizers on FreeBSD AArch64 (authored by andrew, committed by MaskRay). Repository: rG LLVM Github Monorepo

[PATCH] D125272: [clang] Add -fcheck-new support

2022-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Herald added a subscriber: StephenFan. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4117 + if (const Arg *A = Args.getLastArg(OPT_fcheck_new)) +

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

2022-07-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/tools/llvm-objcopy/ObjcopyOptions.cpp:1015 + } else { +if (Config.DecompressDebugSections && !compression::zstd::isAvailable()) + return createStringError( For --decompress-debug-sections, the zstd error s

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4415-4430 -// Upgrade branch protection and return address signing module flags. The -// module flag behavior for these fields were Error and now they are Min.

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 447387. MaskRay edited the summary of this revision. MaskRay added a comment. Keep AutoUpgrade.cpp code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130145/new/ https://reviews.llvm.org/D130145 Files: clang

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

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/include/llvm/Support/Compression.h:48 + +constexpr int NoCompression = -5; +constexpr int BestSpeedCompression = 1; I missed the values here. Why is -5 picked for NoCompression? What does it mean? zstd.h says ZSTD_

[PATCH] D130493: Disable stack-sizes section by default for PS4.

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5883 if (Args.hasFlag(options::OPT_fstack_size_section, - options::OPT_fno_stack_size_section, RawTriple.isPS4())) + options::OPT_fno_stack_size_section, false)

[PATCH] D130516: [Support] compression classes

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for experimenting the refactoring. My gut feeling is that - for inheritance `llvm/lib/Support/Compression.cpp` introduces quite a bit of complexity. - BestSpeedCompression/DefaultCompression/BestSizeCompression may be kinda weird. Not all algorithms may need all

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

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. So nobody has managed to fix all the in-tree usage. I think having this for the upcoming release/15.x will be nice... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124063/new/ https://reviews.llvm.org/D124063

[PATCH] D130526: [Driver][PowerPC] Support -mtune=

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: PowerPC, nemanjai, jsji. Herald added subscribers: luke957, StephenFan, s.egerton, shchenz, simoncook, kbarton. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber:

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

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: davide, tejohnson. Herald added subscribers: StephenFan, okura, kuter, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a reviewer: sstefan1. Herald added proje

[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

2022-07-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2226 + static const char *const LoongArch64LibDirs[] = {"/lib64", "/lib"}; + static const char *const LoongArch64Triples[] = { xry111 wrote: > SixWeining wrote: > > xry111 wrote: >

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think the file is linked into `libclang.so`. The resource directory is relative to`libclang.so` but may not be relative to the main executable... So getMainExecutable will be incorrect. Comment at: clang/tools/libclang/CIndexer.cpp:142 +// error

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5984 + if (Args.hasFlag(options::OPT_fcheck_new, options::OPT_fno_check_new, false)) +CmdArgs.push_back("-fcheck-new"); See `addOptInFlag` in this file. Com

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-05-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This cannot be committed as is. In particular, @rsmith's "We do not want to create or encourage the creation of language dialects and non-portable code," concern on https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-option/55143/2 (shared by

[PATCH] D122747: [NFC][ARM] Tests for Cortex-A57 and Cortex-A72 Fused AES Erratum

2022-05-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The test file has 4000+ lines. Any chance making it smaller? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122747/new/ https://reviews.llvm.org/D122747 ___ cfe-commits mailing li

[PATCH] D125491: [RISCV] Add extra space into error message about unsupported extension version.

2022-05-12 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/riscv-arch.c:428 // RV32-EXPERIMENTAL-BADVERS: error: invalid arch name 'rv32izbt0p1' // RV32-EXPERIMENTAL-BADVERS: unsupported version

[PATCH] D125499: Enabling the detection of devtoolset-11 toolchain.

2022-05-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2156 Prefixes.push_back("/opt/rh/devtoolset-10/root/usr"); Prefixes.push_back("/opt/rh/devtoolset-9/root/usr"); Prefixes.push_back("/opt/rh/devtoolset-8/root/usr"); The

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

2022-05-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. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106888/new/ https://reviews.llvm.org/D106888 ___ cfe-commits mailing list cfe-commit

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

2022-05-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'll wait a bit before pushing to check whether that further opinions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106888/new/ https://reviews.llvm.org/D106888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Is there a specification or reference implementation stating that -E is used? > Option<["--", "/", "-"], "E", Do you need the prefix `--`? You may define something like `CLFlag`. I have missed previous patches, but if `/` options are not necessary, removing them will b

[PATCH] D106888: [LowerTypeTests][clang] Implement cfi-icall and allow -fsanitize=cfi-icall for RISCV

2022-05-14 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 rG59afc4038b10: [LowerTypeTests][clang] Implement and allow -fsanitize=cfi-icall for RISCV (authored by twd2, committed by MaskRay). Repository: rG

[PATCH] D125624: [gold] Remove an external dependency to GNU binutils' header file

2022-05-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I haven't checked but for `ninja check-llvm-tools-gold`, we still hope that the tests are disabled if the system does not provide gold. There may need a toggle for the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D122256: [clang][ABI] New C++20 module mangling scheme

2022-05-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The differential has the same intention/subject as D118352 . In such a case reusing the preexisting differential would have been better. I have left more comments on https://reviews.llvm.org/D125825#3522911 Note: a revert was committed

[PATCH] D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes

2022-05-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. It may be time to add unittests to `clang/unittests/Driver/ToolChainTest.cpp` for /opt/rh detection. You may use `TEST(ToolChainTest, VFSGCCInstallation)` as an example creating a pseudo file hierarchy in memory. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes

2022-05-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In addition, if every new GCC release requires addition to /opt/rh/gcc-toolset-$major (if I understand correctly), we probably want to switch to `llvm::vfs::directory_iterator` iteration and using the largest version. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes

2022-05-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2164 + StringRef ToolsetDir = llvm::sys::path::filename(LI->path()); + + if (!ToolsetDir.startswith("gcc-toolset-") && delete blank line Comment at: clang/

[PATCH] D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes

2022-05-19 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: StephenFan. Thanks! Comment at: clang/unittests/Driver/ToolChainTest.cpp:618 + + // Check (newer) GCC toolset installation + {

[PATCH] D125847: LTO: Decide upfront whether to use opaque/non-opaque pointer types

2022-05-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Options.td:633 HelpText<"Alias for --lto-obj-path=">; +def: J<"plugin-opt=-opaque-pointers">, + Alias, The convention is `=opaque-pointers` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D124751#3513513 , @python3kgae wrote: > In D124751#3513283 , @MaskRay wrote: > >> Is there a specification or reference implementation stating that -E is used? >> >>> Option<["--", "/"

[PATCH] D125604: [FileCheck] Catch missspelled directives.

2022-05-21 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: bzcheeseman. LGTM. Thanks for pinging the relevant folks on individual tests. You can push the fixes yourself before landing this patch. Repository: rG LLVM Git

[PATCH] D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker

2022-05-23 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. It's better to avoid `JoinedAndSeparate` for new options. It is for `--xxx val` and `--xxxval` but not intended for the option this patch will

[PATCH] D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker

2022-05-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. IIRC there is no built-in way supporting multiple (but fixed number of) values for an option (e.g. `-Xoffload-linker- `). In D105330 (llvm-nm option refactoring) I used a hack to support `-s __DATA __data`. The multiple-value support f

[PATCH] D126226: [OpenMP] Add `-Xoffload-linker` to forward input to the device linker

2022-05-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D126226#3532423 , @tra wrote: > In D126226#3532257 , @MaskRay wrote: > >> It's better to avoid `JoinedAndSeparate` for new options. It is for `--xxx >> val` and `--xxxval` but not inte

[PATCH] D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes

2022-05-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Because of `TargetTriple.getOS() == llvm::Triple::Linux`, you need to guard the unittest under a similar check. > Harbormaster completed remote builds in `B165047: Diff 430277.` You can get Windows bot results in the link. Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D108905: [ItaniumCXXABI] Make __cxa_end_catch calls unconditionally nounwind

2023-10-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D108905#4654410 , @smeenai wrote: > In D108905#4654403 , @ChuanqiXu > wrote: > >> In D108905#4654393 , @smeenai >> wrote: >> >>> In D108905#2

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-10-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557798. MaskRay retitled this revision from "[ItaniumCXXABI] Make __cxa_end_catch calls unconditionally nounwind" to "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow". MaskRay edited the summary o

[PATCH] D100509: Support GCC's -fstack-usage flag

2023-10-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a subscriber: ormris. Herald added a project: All. Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1208 + + *StackUsageStream << MF.getFunction().getParent()->getName(); + if (const DISubprogram *DSP = MF.getFunction().getSubpr

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-10-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D108905#4654561 , @smeenai wrote: > This looks great to me, thanks. @rjmccall should sign off on it though. @rjmccall Are you happy with this opt-in option? In D108905#4654626 , @Chua

[PATCH] D106371: [AIX] Generate large code model relocations when mcmodel=medium on AIX

2023-10-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a project: All. Comment at: clang/test/Driver/mcmodel.c:15 // LARGE: "-mcmodel=large" +// AIX-MCMEDIUM-OVERRIDE: "-mcmodel=large" Is it intentional that -mcmodel=medium is changed to large for 32-bit systems? Is thi

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > module-javascript. Module javascript is not compatible with non-module java > script as it uses the "export" and "import" keywords which are only legal in > module-javascript. java script -> JavaScript module-javascript -> Module JavaScript? Repository: rC Clang

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > This causes .mjs files to be treated as javascript. I think you meant .mjs was not recognized before but will be recognized as JavaScript with this change. Can you elaborate a bit why .mjs is so common that it justifies a clang-format change? Repository: rC Clang

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Reading some materials online... I think this should be named ECMAScript module (ECM), not JavaScript modules.. I can fix the description and commit for you. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66

[PATCH] D66584: [clang-format] Support .mjs module javascript extension in clang-format

2019-08-22 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369732: [clang-format] Recognize ECMAScript module .mjs as JavaScript (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66721: [analyzer] Analysis: Prevent bitwise operation false positives

2019-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:308 +//===--===// +// Unsinged analyzer options. +//===--

[PATCH] D66783: [clang-doc] Use llvm::createStringError and canonicalize error messages

2019-08-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: DiegoAstiazaran, juliehockett, jakehehrlich. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay updated this revision to Diff 217310. MaskRay added a comment. Herald added subscribers: kadircet, arphaman. Fix a few

[PATCH] D66783: [clang-doc] Use llvm::createStringError and canonicalize error messages

2019-08-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 217310. MaskRay added a comment. Herald added subscribers: kadircet, arphaman. Fix a few other places Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66783/new/ https://reviews.llvm.org/D66783 Files: clang-doc/

[PATCH] D66783: [clang-doc] Use llvm::createStringError and canonicalize error messages

2019-08-27 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370155: [clang-doc] Use llvm::createStringError and canonicalize error messages (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: r

[PATCH] D66879: [Index] Added a ShouldSkipFunctionBody callback to libIndex, and refactored clients to use it instead of inventing their own solution

2019-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/include/clang/Index/IndexingAction.h:58 +const IndexingOptions &Opts, std::shared_ptr PP, +std::function ShouldSkipFunctionBody); + I know ShouldSkipFunctionBody is important for multi-threaded indexing

[PATCH] D67031: [Clang][Bundler] Error reporting improvements

2019-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:906 +Msg << ", unknown target triple '" << Triple << "'"; + reportError(createStringError(errc::invalid_argument, Msg.str() + ".")); } I think t

[PATCH] D50294: [Driver] Use -gdwarf-3 by default for FreeBSD

2019-09-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay abandoned this revision. MaskRay added a comment. Abandon due to D66760 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50294/new/ https://reviews.llvm.org/D50294 ___ cfe-commi

[PATCH] D67200: Add -static-openmp driver option

2019-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Instead of more `-static-foobar`, maybe we need `-static=foobar,stdlib,rtlib` instead? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67200/new/ https://reviews.llvm.org/D67200 ___

[PATCH] D53238: [Driver] Add -static= to unify -static-{libgcc,libstdc++}

2019-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 219025. MaskRay retitled this revision from "[Driver] Add -static-{rtlib,stdlib} and make -static-{libgcc,libstdc++} their aliases" to "[Driver] Add -static= to unify -static-{libgcc,libstdc++}". MaskRay edited the summary of this revision. MaskRay added revi

[PATCH] D53238: [Driver] Add -static= to unify -static-{libgcc,libstdc++}

2019-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D53238#1660259 , @pirama wrote: > Does this regress from existing behavior for unused argument warnings? > Currently, `-static-libstdc++ -nostdlib` issues an unused argument warning > for `-static-libstdc++`, while AFAICT `-s

[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl

2019-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: hans. MaskRay added a comment. @hans Can this be put on your list of things for 9.0.1? I searched for `[meta] 9.0.1` on bugs.llvm.org but can't find a release blocker bug so I have to bother you directly... Repository: rL LLVM CHANGES SINCE LAST ACTION https://

[PATCH] D72056: [RISCV] Generate PIC address sequence for medany -fno-pic

2020-01-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. Herald added subscribers: llvm-commits, cfe-commits, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD,

[PATCH] D72056: [RISCV] Generate PIC address sequence for medany -fno-pic

2020-01-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D72056#1800524 , @jrtc27 wrote: > I am still of the view that we should support rewriting the instruction > stream in the linker when necessary like BFD does. We need to do this to be > able to link in GCC-compiled code, inclu

[PATCH] D72056: [RISCV] Generate PIC address sequence for medany -fno-pic

2020-01-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added a subscriber: bsdjhb. MaskRay added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:680 + if (MF->getTarget().isPositionIndependent() || + MF->getTarget().getCodeModel() != CodeModel::Smal

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I really like the new feature. Thanks for making the efforts! However, I am afraid I don't like some of the fixes here. You can replace `const auto` with `const auto &` and call that a fix... IMHO if the type is not obvious, `const ConcreteType &` will be better. In ad

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D71857#1804307 , @Mordante wrote: > In D71857#1800663 , @MaskRay wrote: > > > I think there is a false positive. > > > > https://github.com/llvm/llvm-project/tree/master/lld/ELF/Relocatio

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dberris, kristof.beyls, nickdesaulniers, rnk, rsmith, void. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay added a parent revision: D72220: [X86] Support function attribute "patchable-function-entry". MaskRay

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