[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-11-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D138846#4657246 , @hans wrote: >> I just saw @glandium's earlier comment: >> >>> Code built with older versions of LLVM (e.g. rust) and running with the >>> updated runtime crash at startup with this change. >> >> This is the

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

2023-11-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:25 + +static bool getPIE(const ArgList , const ToolChain ) { + if (Args.hasArg(options::OPT_static, options::OPT_shared, I've simplified `Gnu.cpp` a bit for handling different

[PATCH] D150930: [Driver] Accept and ignore -fno-lifetime-dse argument

2023-11-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D150930#4656909 , @brunodf wrote: > Hi, > > I found this review request and I just want to comment that I find it strange > that it was rejected. > > @MaskRay I understand that using a compile_commands.json configured for gcc

[PATCH] D154774: [Sema] Respect instantiated-from template's VisibilityAttr for two implicit/explicit instantiation cases

2023-11-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/AST/Decl.cpp:380 +->getTemplatedDecl() +->hasAttr(); } rjmccall wrote: > Okay, this change seems wrong. A

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-11-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:607 +// compiler has broken. +assert((!StartLoc || StartLoc->isValid()) && "Start location is not valid"); +assert((!EndLoc || EndLoc->isValid()) && "End location is not valid");

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

2023-11-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.h:61 + bool isPICDefault() const override { return true; } + bool isPIEDefault(const llvm::opt::ArgList &) const override { return true; } + bool isPICDefaultForced() const override { return

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

2023-11-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/serenity.cpp:20 +// SERENITY_X86_64: "{{(.*[^-.0-9A-Z_a-z])?}}ld.lld" +// SERENITY_X86_64: "-pie" +// SERENITY_X86_64: "-dynamic-linker" "/usr/lib/Loader.so" "--eh-frame-hdr" Prefer `-SAME:` whenever

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

2023-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:76 + if (!IsStatic || IsStaticPIE) +CmdArgs.push_back("--eh-frame-hdr"); + ADKaster wrote: > MaskRay wrote: > > This is not tested > Hm. this also seems like incorrect

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-05 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc0a73918bfdd: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all… (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D108905?vs=557976=558008#toc Repository:

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

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:164 +if (crtend_path.empty()) { + const char *crtend = (IsShared || IsPIE) ? "crtendS.o" : "crtend.o"; + crtend_path = TC.GetFilePath(crtend); crt* files are not

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

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/serenity.cpp:2 +// UNSUPPORTED: system-windows + +/// Test a cross compiler. https://github.com/MaskRay/Config/wiki/LLVM#clanglibdriver The test fails in a `-DCLANG_DEFAULT_RTLIB=compiler-rt

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

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:31 + Arg *Last = Args.getLastArg(options::OPT_pie, options::OPT_no_pie, + options::OPT_nopie); + return Last ? Last->getOption().matches(options::OPT_pie) : true;

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557976. MaskRay marked an inline comment as done. MaskRay added a comment. remove unused err_ arguments. fix and test `throw new B` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108905/new/

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557975. MaskRay marked an inline comment as done. MaskRay retitled this revision from "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow" to "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to

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

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D108905#4655694 , @ChuanqiXu wrote: > Oh, I am not saying the legacy and old comment. I mean you need to touch > ReleaseNotes.rst and UserManual.rst since we add a new flag. Also we need > either add a TODO/FIXME saying we

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

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557968. MaskRay marked an inline comment as done. MaskRay edited the summary of this revision. MaskRay added a comment. Update clang/docs/UsersManual.rst and clang/docs/ReleaseNotes.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-10-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4435-4448 struct CallEndCatch final : EHScopeStack::Cleanup { CallEndCatch(bool MightThrow) : MightThrow(MightThrow) {} bool MightThrow;

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

2023-10-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'll land this patch next week if there is no objection. This seems very useful to a few parties and the current behavior is opt-in. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108905/new/

[PATCH] D91442: [clang][Driver] Handle risvc in Baremetal.cpp.

2023-10-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added subscribers: wangpc, luke, sunshaoce, arichardson. Herald added a project: All. Comment at: clang/lib/Driver/ToolChains/RISCVToolchain.cpp:40 + const llvm::opt::ArgList ) { + if

[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

[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 ,

[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 =

[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

[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

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

2023-10-10 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

[PATCH] D159541: [UEFI] X86_64 UEFI Clang Driver

2023-09-30 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. Comment at: clang/lib/Driver/ToolChains/UEFI.cpp:68 + // "Terminal Service Aware" flag is not needed for UEFI applications. +

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

2023-09-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:340 + HasRocThrustLibrary = !HIPRocThrustPathArg.empty() && +D.getVFS().exists(HIPRocThrustPathArg + "/thrust"); + HIPRocPrimPathArg = AlexVlx wrote: >

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

2023-09-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1281 +"rocThrust path, required by the HIP Standard Parallel Algorithm " +"Acceleration library, used to implicitly include the rocThrust library.">; +def

[PATCH] D145214: [TSAN] add support for riscv64

2023-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Other than -Wframe-larger-than=656 and `const uptr indicator = 0x0f00ull;` changes, others looks good to me. I agree that this should be reviewed by @dvyukov :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D145214: [TSAN] add support for riscv64

2023-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/tsan/rtl/tsan_platform.h:971 }; -const uptr indicator = 0x0e00ull; +const uptr indicator = 0x0f00ull; const uptr ind_lsb = 1ull << LeastSignificantSetBitIndex(indicator);

[PATCH] D158641: [AArch64] Fix FMV ifunc resolver usage on old Android APIs. Rename internal compiler-rt FMV functions.

2023-09-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. The Clang Driver/CodeGen and compiler-rt changes look good to me. Of course please wait for an Android reviewer :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/HIPSupport.rst:266 + +- ``-hipstdpar`` / ``--hipstdpar`` enables algorithm offload, which depending on + phase, has the following effects: Newer long options that don't use the common prefix like `-f` are

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

2023-09-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6569 + + if (Args.hasArg(options::OPT_hipstdpar_interpose_alloc)) +CmdArgs.push_back("-hipstdpar-interpose-alloc"); This can use AddLastArg. CHANGES SINCE LAST ACTION

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

2023-09-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1261 HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">; +def hipstdpar : Flag<["-", "--"], "hipstdpar">, + Visibility<[ClangOption,

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: llvm/unittests/IR/DataLayoutTest.cpp:108 +TEST(DataLayoutTest, TargetTripleManglingComponent) { + Triple TT = Triple("x86_64-unknown-uefi"); UEFI may be a better name in case we test

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. DataLayout needs a unittest in llvm/unittests/IR/DataLayoutTest.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152206/new/ https://reviews.llvm.org/D152206

[PATCH] D69763: [Clang][Test]: Remaining "lld-link2" -> "lld-link"

2023-09-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > So this is truly a test of the ld.otherlinker feature pattern, not some > special case driver feature. I guess we should leave the test alone. > Closing, we left the test alone, it still uses -fuse-ld=lld-link2. Perhaps in > the future we should reconsider this, but

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

2023-09-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D147844#4646633 , @MaskRay wrote: > FWIW: adding parentheses for expressions, such as `overflow = (4608 * 1024 * > 1024) ? 4608 * 1024 * 1024 : 0;`, and `results.reason = (actions & > _UA_SEARCH_PHASE) ? ... : ...`, looks

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

2023-09-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. nits Comment at: clang/docs/ReleaseNotes.rst:295 + target-specific runtime and standard libraries in directories named after the + target (e.g. if you're building with ``-target aarch64-none-linux-android21``, +

[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

[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

[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

[PATCH] D158963: [CodeGen] Function multi-versioning: don't set comdat for internal linkage resolvers

2023-09-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/ReleaseNotes.rst:208 (`#61334 `_) +- For function multi-versioning using the ``target`` or ``target_clones`` + attributes, remove comdat for internal linkage functions.

[PATCH] D159373: [clang][auto-init] Remove -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang

2023-09-01 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/D159373/new/ https://reviews.llvm.org/D159373

[PATCH] D85309: [Driver] Support GNU ld on Solaris

2023-09-01 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:55 + StringRef UseLinker = A ? A->getValue() : CLANG_DEFAULT_LINKER; + // FIXME: What about -fuse-ld=? +

[PATCH] D159335: [Object] Change OffloadBinary::write to return SmallString<0>

2023-09-01 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf93c271d4cc1: [Object] Change OffloadBinary::write to return SmallString0 (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159335/new/

[PATCH] D159352: [Driver] Don't default to DWARF 2 on Solaris

2023-09-01 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! Comment at: clang/test/CodeGen/dwarf-version.c:7 // RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5

[PATCH] D158688: [Driver,ARM,AArch64] Ignore -mbranch-protection= diagnostics for assembler input

2023-09-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay abandoned this revision. MaskRay added a comment. Obsoleted by D159173 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158688/new/ https://reviews.llvm.org/D158688

[PATCH] D159173: [Driver] Report warnings for unclaimed TargetSpecific options for assembler input

2023-09-01 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 rGe9d454d1c195: [Driver] Report warnings for unclaimed TargetSpecific options for assembler… (authored by MaskRay). Repository: rG LLVM Github

[PATCH] D159173: [Driver] Report warnings for unclaimed TargetSpecific options for assembler input

2023-09-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thank you. I am testing more thoroughly. We need this to catch up 17.0.0rc4... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159173/new/ https://reviews.llvm.org/D159173 ___

[PATCH] D159335: [Object] Change OffloadBinary::write to return SmallString<0>

2023-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 555258. MaskRay added a comment. update clang-offload-packager Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159335/new/ https://reviews.llvm.org/D159335 Files:

[PATCH] D159335: [Object] Change OffloadBinary::write to return SmallString<0>

2023-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: jhuber6, JonChesterfield. 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-commits. SmallString<0>

[PATCH] D85309: [Driver] Support GNU ld on Solaris

2023-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/hip-link-bundle-archive.hip:59 // RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ -// RUN: --target=x86_64-pc-windows-msvc \ +// RUN: --target=x86_64-pc-windows-msvc -fuse-ld= \ // RUN:

[PATCH] D130777: Enable embedded lto for XCOFF.

2023-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This needs rebase after fatLTO support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130777/new/ https://reviews.llvm.org/D130777 ___ cfe-commits mailing list

[PATCH] D143305: [clang] Fix -Xarch_ for -mllvm and alike

2023-08-31 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: jplehr. I assume that this is unneeded after :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143305/new/ https://reviews.llvm.org/D143305

[PATCH] D154014: [SpecialCaseList] Use Globs instead of Regex

2023-08-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > This is a breaking change since some SCLs might use .* or (abc|def) which are > supported regexes but not valid globs. Since we have just cut clang 16.x this > is a good time to make this change. This should be updated, too. 16.x => 17.x Repository: rG LLVM

[PATCH] D154014: [SpecialCaseList] Use Globs instead of Regex

2023-08-31 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. > [SpecialCaseList] Use Globs instead of Regex Since Glob is enabled under a non-default header `#!special-case-list-v2`, this subject should be changed. Repository: rG LLVM Github

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Sanitizers.cpp:130 +if (A->getOption().matches(clang::driver::options::OPT_mexecute_only) && +llvm::ARM::supportedExecuteOnly(Triple)) { + return true; MaskRay wrote: > I don't think we

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

2023-08-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: clang/include/clang/Driver/Options.td:4586 +def print_supported_extensions : Flag<["-", "--"], "print-supported-extensions">, + Group, Flags<[CC1Option,

[PATCH] D85309: [Driver] Support GNU ld on Solaris

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:305 +bool tools::isLinkerGnuLd(const ToolChain , const ArgList ) { + // Only used if targetting Solaris. I suppose that this should be in a Solaris specific file to indicate

[PATCH] D159054: [Driver] Removal of C_INCLUDE_DIRS feature

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D159054#4628278 , @probinson wrote: > In D159054#4626772 , @brad wrote: > >> Just FYI I am not in a rush to commit this. I am posting this more so as a >> means of prodding for

[PATCH] D152495: [Clang][SemaCXX] Add unused warning for variables declared in condition expressions

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D152495#4628903 , @smeenai wrote: > In D152495#4628877 , @hans wrote: > >> In D152495#4628870 , @goncharov >> wrote: >> >>> due to this

[PATCH] D158963: [CodeGen] Function multi-versioning: don't set comdat for internal linkage resolvers

2023-08-30 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 rG651b2fbc1c7e: [CodeGen] Function multi-versioning: dont set comdat for internal linkage… (authored by MaskRay). Repository: rG LLVM Github

[PATCH] D158963: [CodeGen] Function multi-versioning: don't set comdat for internal linkage resolvers

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 554756. MaskRay edited the summary of this revision. MaskRay added a comment. add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158963/new/ https://reviews.llvm.org/D158963 Files:

[PATCH] D158688: [Driver,ARM,AArch64] Ignore -mbranch-protection= diagnostics for assembler input

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D158688#4625839 , @MaskRay wrote: > In D158688#4624267 , @simon_tatham > wrote: > >> The change LGTM, and "agree with gcc" seems like a reasonable justification >> in this case. > >

[PATCH] D159173: [Driver] Report warnings for unlaimed TargetSpecific options for assembler input

2023-08-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: jansvoboda11, thesamesam, chill, peter.smith, simon_tatham, stuij. Herald added subscribers: kadircet, kristof.beyls. Herald added a reviewer: ctetreau. Herald added a project: All. MaskRay requested review of this revision. Herald added

[PATCH] D159016: [clang] Fix assertion failure using -MJ with -fsyntax-only

2023-08-29 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! Comment at: clang/test/Driver/compilation_database_fsyntax_only.c:1 +// RUN: mkdir -p %t.workdir && cd %t.workdir +// RUN: %clang -fsyntax-only %s -MJ - 2>&1

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

2023-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_trampoline_riscv32.S:54 + // Handler address will be null if it is not set + beq a2, x0, FunctionEntry_restore + This local symbol doesn't seem useful. We can just use numbers

[PATCH] D158376: [Driver] move DragonFly header search path management to the driver

2023-08-29 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! Comment at: clang/lib/Lex/InitHeaderSearch.cpp:331 - case llvm::Triple::DragonFly: -AddPath("/usr/include/c++/5.0", CXXSystem, false); -break;

[PATCH] D158376: [Driver] move DragonFly header search path management to the driver

2023-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Lex/InitHeaderSearch.cpp:331 - case llvm::Triple::DragonFly: -AddPath("/usr/include/c++/5.0", CXXSystem, false); -break; 5.0 becomes 8.0 after move? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-29 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! Comment at: clang/lib/Basic/Sanitizers.cpp:126 + // execute-only output (no data access to code sections). + if (const llvm::opt::Arg *A = +

[PATCH] D157813: [Driver][VE] Support VPU flag as a feature for VE

2023-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/VE.cpp:22 + std::vector ) { + // Defaults. + bool EnableVPU = true; kaz7 wrote: > MaskRay wrote: > > Delete the comment. The

[PATCH] D159137: [AIX] Fix Link Issue when `-fprofile-update=[atomic|prefer-atomic]` is in Effect

2023-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:440 + StringRef Val = A->getValue(); + if (Val == "atomic" || Val == "prefer-atomic") +CmdArgs.push_back("-latomic"); qiongsiwu1 wrote: > This check here is copied

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/SizedDeallocation.h:23 +namespace clang { +inline llvm::VersionTuple sizedDeallocMinVersion(llvm::Triple::OSType OS) { + switch (OS) { wangpc wrote: > MaskRay wrote: > > Does this need to be

[PATCH] D158688: [Driver,ARM,AArch64] Ignore -mbranch-protection= diagnostics for assembler input

2023-08-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D158688#4624267 , @simon_tatham wrote: > The change LGTM, and "agree with gcc" seems like a reasonable justification > in this case. Thank you both! > But I'm curious more generally about what options should / shouldn't be

[PATCH] D159054: [Driver] Removal of C_INCLUDE_DIRS feature

2023-08-28 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. Technically there is some risk but I think the blast radius, if present, is extremely small. `C_INCLUDE_DIRS` is not recognized by GCC. If I use

[PATCH] D158071: [clang] Remove rdar links; NFC

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158071/new/ https://reviews.llvm.org/D158071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D159010: [Driver,X86] Ignore -mfpmath= for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG081afa3d04a4: [Driver,X86] Ignore -mfpmath= for assembler input (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D159010?vs=554010=554037#toc Repository: rG LLVM Github

[PATCH] D159010: [Driver,X86] Ignore -mfpmath= for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Tested by parona on Libera Chat IRC. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159010/new/ https://reviews.llvm.org/D159010 ___ cfe-commits mailing list

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/include/clang/Basic/SizedDeallocation.h:23 +namespace clang { +inline llvm::VersionTuple sizedDeallocMinVersion(llvm::Triple::OSType OS) { + switch (OS) { Does this need to be in

[PATCH] D159010: [Driver,X86] Ignore -mfpmath= for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/X86.cpp:121 const ArgList , - std::vector ) { + std::vector , bool ForAS) { + if (ForAS) {

[PATCH] D159010: [Driver,X86] Ignore -mfpmath= for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: mgorny, thesamesam. Herald added subscribers: pengfei, kristof.beyls. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang.

[PATCH] D157813: [VE][Clang] Change to enable VPU flag by default

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > [VE][Clang] Change to enable VPU flag by default For components like llvm/, clang/, we usually use a more specific tag. I'd pick `[Driver]` over `[Clang]`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157813/new/

[PATCH] D157813: [VE][Clang] Change to enable VPU flag by default

2023-08-28 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/VE.cpp:22 + std::vector ) { + // Defaults. + bool EnableVPU = true; Delete

[PATCH] D158688: [Driver,ARM,AArch64] Ignore -mbranch-protection= diagnostics for assembler input

2023-08-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) This is probably a good candidate for `release/17.x` backporting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158688/new/ https://reviews.llvm.org/D158688 ___

[PATCH] D158955: [Driver] Improve legibility of ld -z options on Solaris

2023-08-27 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/D158955/new/ https://reviews.llvm.org/D158955

[PATCH] D158963: [CodeGen] Function multi-versioning: don't set comdat for internal linkage resolvers

2023-08-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: erichkeane, ilinpv, pengfei, RKSimon. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For function multi-versioning using the target and

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1379 +void init_cpu_features_resolver(unsigned long hwcap, const __ifunc_arg_t *arg) { + if (__aarch64_cpu_features.features) It seems that we don't need the `_constructor`

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:718 ; -FeaturesMask |= (1ULL << Feature); +FeatureMask[Feature / 32] |= 1U << (Feature % 32); } pengfei wrote: > Should we use vector for future expansion,

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 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 rG27da15381cbe: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4} (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 553698. MaskRay edited the summary of this revision. MaskRay added a comment. rebase after precommitting `target("x86-64") and cpu_specific(x86_64) attributes` tests add `__builtin_cpu_supports x86-64-v5` test Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D158920: Delete CloudABI support

2023-08-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. Thanks for the cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158920/new/ https://reviews.llvm.org/D158920

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:326 def err_unsupported_abi_for_opt : Error<"'%0' can only be used with the '%1' ABI">; +def err_unsupported_opt_for_execute_only_target +: Error<"unsupported option '%0' for the

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 553524. MaskRay marked 2 inline comments as done. MaskRay added a comment. add assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158811/new/ https://reviews.llvm.org/D158811 Files:

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

2023-08-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 rG5624e86ae0fb: [tsan] Respect !nosanitize metadata and remove gcov special case (authored by MaskRay). Repository: rG LLVM Github Monorepo

[PATCH] D158811: [X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: FreddyYe, pengfei, RKSimon, skan, erichkeane. Herald added a subscriber: hiraditya. Herald added a reviewer: ctetreau. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2958 default: return getTriple().getVendor() != llvm::Triple::Myriad; } MaskRay wrote: > brad wrote: > > You might as well remove this. > Will do! There is some Myriad

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-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. MaskRay marked an inline comment as done. Closed by commit rGaa9d7d1cd0af: [Driver] Remove Myriad.cpp (authored by MaskRay). Herald added a project: LLVM. Herald added

[PATCH] D158706: [Driver] Remove Myriad.cpp

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2958 default: return getTriple().getVendor() != llvm::Triple::Myriad; } brad wrote: > You might as well remove this. Will do!

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1382 +return; +#if defined(__ANDROID__) + // ifunc resolvers don't have hwcaps in arguments on Android API lower enh wrote: > ilinpv wrote: > > MaskRay wrote: > > > I am

  1   2   3   4   5   6   7   8   9   10   >