[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-05 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8afd831b456a: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering… (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149579: [X86][MC] Fix parsing Intel syntax indirect branch with symbol only

2023-05-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/MC/X86/intel-syntax-branch.s:61-67 + // FIXME: MASM does not accept this syntax and GAS assembles this as a direct + //call/jump instead of indirect. Consider making this syntax an error? + call [offset fn_ref] +

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 519744. MaskRay marked an inline comment as done. MaskRay added a comment. fix a typo in a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149920/new/ https://reviews.llvm.org/D149920 Files:

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 519734. MaskRay retitled this revision from "ms inline asm: recognize "jmp" as TargetLowering::C_Address" to "ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address". MaskRay edited the summary of this revision. MaskRay added a

[PATCH] D149695: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr)

2023-05-04 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG053bf8640aa8: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr) (authored by MaskRay). Repository: rG LLVM Github

[PATCH] D146054: [RISCV] Add --print-supported-extensions and -march=help support

2023-05-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `-march=` `-mcpu=` `-mtune=` are from GCC and they traditionally have many opinions on the features. If GCC is going to have `-march=help`, I think adding `-march=help` to Clang to match is fine. But I'd really like to avoid aliases for non-compatibility reasons. They

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-05-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D149193#4316293 , @dblaikie wrote: > I guess my main question is: What's the motivation for implementing this? Do > you have a need/use for this? (it doesn't seem to be motivated by GCC > compatibility - as discussed, looks

[PATCH] D149695: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr)

2023-05-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D149695#4315194 , @hans wrote: >> The AOK_SizeDirective part from 5b37c181291210bedfbb7a6af5d51229f3652ef0 >> (2014-08) seems unneeded nowadays (the root cause has likely been fixed >> elsewhere). > > Would it be possible to

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

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

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

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

[PATCH] D149695: MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr)

2023-05-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: alvinhochun, epastor, hans, thakis, ayzhao. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits,

[PATCH] D148767: Restore CodeGen/LowLevelType

2023-05-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > This is rework of; > > D30046 (LLT) Add some information why this is restored? Assume that people may not read the depended patches (`Depends on D145937, D146352, and D148768.`). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-05-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I have read prior discussions and https://discourse.llvm.org/t/rfc-improving-clangs-middle-and-back-end-diagnostics/69261 . The current approach seems reasonable. The summary should incorporate more information. `inlined.from` isn't mentioned at all.

[PATCH] D141451: [clang] report inlining decisions with -Wattribute-{warning|error}

2023-05-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:863 + InliningDecisions.push_back(D.getCaller().str()); + for (size_t i = 0, e = InliningDecisions.size(); i != e; ++i) { +std::string S = llvm::demangle(InliningDecisions[i]);

[PATCH] D149104: [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-05-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: llvm/docs/ReleaseNotes.rst:289 +* ``llvm::demangle`` now takes a ``std::string_view`` rather than a + ``const std::string&``. Be careful

[PATCH] D148944: [clang][Driver] Fix crash with unsupported architectures in MinGW and CrossWindows.

2023-05-01 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGecad12100927: [clang][Driver] Fix crash with unsupported architectures in MinGW and… (authored by k-mana, committed by MaskRay). Changed prior to commit:

[PATCH] D148944: [clang][Driver] Fix crash with unsupported architectures in MinGW and CrossWindows.

2023-05-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Looks great! Comment at: clang/test/Driver/unsupported-target-arch.c:33 +// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-CROSSWINDOWS %s +// CHECK-NOARCH-CROSSWINDOWS: error: unknown target triple

[PATCH] D146269: MIPS: allow o32 abi with 64bit CPU and 64 abi with 32bit triple

2023-04-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/mips-cpu64abi32.c:1 +// Check handling the CPU is 64bit while ABI is O32. +// when build for MIPS platforms. Use `///` for non-CHECK non-RUN comments. Comment at:

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

2023-04-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:7 +// CHECK-NEXT: entry: +// CHECK-NEXT:[[CALL:%.*]] = call noalias noundef ptr @_Znwm(i64 noundef 4) #[[ATTR2:[0-9]+]] +// CHECK-NEXT:ret ptr [[CALL]] ` #[[ATTR2:[0-9]+]]`

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

2023-04-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -fcheck-new -triple x86_64-linux-gnu -S -disable-O0-optnone \ +// RUN: -emit-llvm -o - %s | opt

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. In D149193#4302337 , @scott.linder wrote: > In D149193#4300885 , @MaskRay wrote: > >> I think the patch as-is implements all the useful parts of

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

2023-04-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -fcheck-new -triple x86_64-linux-gnu -S -disable-O0-optnone \ +// RUN: -emit-llvm -o - %s | opt

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. I think the patch as-is implements all the useful parts of GCC's complex rules and in the absence of `-dumpbase` (we deliberately don't implement), the rule almost exactly matches GCC unless we do `gcc -g -gsplit-dwarf d/a.c -o

[PATCH] D148757: [clang] Apply -fcoverage-prefix-map reverse order

2023-04-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:211 + + /// Prefix replacement map for coverage. + llvm::SmallVector, 0> CoveragePrefixMap; MaskRay wrote: > While adding a comment, clarify what coverage it is? There are

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D149193#4300501 , @phosek wrote: > Do we have any way to check if there are projects out there that use > `-dumpbase`? It shouldn't be too difficult to support it, but we should find > out first if it's needed. I spot

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3884 + nullptr, getOpts().getOption(options::OPT_dumpdir), + Args.MakeArgString(Args.getLastArgValue(options::OPT_o, "a") + "-")); + Arg->claim(); dblaikie wrote: >

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 517004. MaskRay retitled this revision from "[Driver] -gsplit-dwarf: derive .dwo names from -o for link actions" to "[Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking". MaskRay edited the summary of this revision. MaskRay added a comment.

[PATCH] D149193: [Driver] -gsplit-dwarf: derive .dwo names from -o for link actions

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 516980. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a subscriber: ormris. add notes and more test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149193/new/

[PATCH] D149193: [Driver] -gsplit-dwarf: derive .dwo names from -o for link actions

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D149193#4297043 , @scott.linder wrote: > I'm a bit confused after trying to work out the rules for the GCC version of > `-dumpdir` over at > https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-dumpdir but it > at

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

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4117 + if (const Arg *A = Args.getLastArg(OPT_fcheck_new)) +Opts.CheckNew = true; + heatd wrote: > MaskRay wrote: > > Use `CodeGenOpts<"CheckNew">` and avoid change to this

[PATCH] D148757: [clang] Apply -fcoverage-prefix-map reverse order

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Comment at: clang/include/clang/Basic/CodeGenOptions.h:211 + + /// Prefix replacement map for coverage. + llvm::SmallVector, 0> CoveragePrefixMap; While adding a comment, clarify what coverage it is? There are multiple coverage

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-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 rGdaad48d6b236: -fdebug-prefix-map=: make the last win when multiple prefixes match (authored by MaskRay). Repository: rG LLVM Github Monorepo

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

2023-04-25 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/D148665/new/ https://reviews.llvm.org/D148665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148975#4296625 , @scott.linder wrote: > LGTM, thank you! > > Does this warrant a release note, as it is changing the behavior in a > backwards-incompatible manner? I do think changing to match GCC is > worthwhile, even if

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 516924. MaskRay marked an inline comment as done. MaskRay added a comment. Update HelpText Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148975/new/ https://reviews.llvm.org/D148975 Files:

[PATCH] D149193: [Driver] -gsplit-dwarf: derive .dwo names from -o for link actions

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dblaikie, phosek, yaxunl. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When the final phase is linking, Clang currently places auxiliary files

[PATCH] D148094: [DRAFT][clang][CodeGen] Break up TargetInfo.cpp [6/6]

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This refactoring looks reasonable to me as well. In `clang/lib/Driver`, we have D30372 that splits some huge files into target-specific files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:209 - std::map DebugPrefixMap; + llvm::SmallVector, 0> DebugPrefixMap; std::map CoveragePrefixMap; scott.linder wrote: >

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 516863. MaskRay marked 3 inline comments as done. MaskRay added a comment. remove a DebugPrefixMap variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148975/new/ https://reviews.llvm.org/D148975 Files:

[PATCH] D149104: [Demangle] make llvm::demangle take std::string_view rather than const std::string

2023-04-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/Symbols.cpp:50 +std::string root = symName.str(); +return demangle(root); + } `return demangle(symName.str());` perhaps `return demangle(symName);` works as well? Repository: rG LLVM Github

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:209 - std::map DebugPrefixMap; + llvm::SmallVector, 0> DebugPrefixMap; std::map CoveragePrefixMap; scott.linder wrote: > What

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:972 + LangOpts<"ConvergentFunctions">, DefaultFalse, + NegFlag, + PosFlag>; Only one of the positive and negative options need to be a cc1 option. Comment at:

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148757#4289076 , @MaskRay wrote: > I'm creating a patch to change DebugPrefixMap to respect the command line > option order... Created D148975 to follow GCC's behavior (the last

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: debug-info, dankm, gulfem, phosek. Herald added subscribers: hiraditya, emaste. Herald added a project: All. MaskRay requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, cfe-commits,

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'm creating a patch to change DebugPrefixMap to respect the command line option order... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109591 to discuss GCC's behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148757#4285735 , @gulfem wrote: > I compared Clang and GCC behavior. > **1) Following user-specified prefix mapping order** > GCC uses a linked list to store the prefix mappings, so it applies the prefix > mappings based on

[PATCH] D148958: Size and element numbers are often swapped when calling calloc

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148958#4288782 , @vzakhari wrote: > In D148958#4288728 , @MaskRay wrote: > >> This is an unnecessary change. The arguments are interchangeable. >> In musl, there are at least 2 places

[PATCH] D148958: Size and element numbers are often swapped when calling calloc

2023-04-21 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. This is an unnecessary change. In musl, there are at least 2 places where the parameters could be swapped, but I not unsure this warrants a commit. Repository: rG LLVM Github

[PATCH] D148945: [clang] Remove workaround for old LLVM_ENABLE_PROJECTS=libcxx build

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Related: D122444 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148945/new/ https://reviews.llvm.org/D148945 ___ cfe-commits mailing list

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148851#4285583 , @shafik wrote: > Do you know why these started timing out? I saw this locally the other day > but could not figure out the root cause. D86170 provides some information

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1498 +if (MS.TargetTriple.getArch() == Triple::systemz) + MS.MsanMetadataAlloca = IRB.CreateAlloca(MS.MsanMetadata, (unsigned)0); } Just use 0. Even

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/Instrumentation/MemorySanitizer/SystemZ/basic-kernel.ll:12 + +; CHECK-LABEL: @Store1 +; CHECK: [[META_PTR:%[a-z0-9_]+]] = alloca { ptr, ptr }, align 8 `; CHECK-LABEL: define {{[^@]+}}@Store1(` to match the

[PATCH] D148827: -fsanitize=function: support C

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This patch is also available https://github.com/MaskRay/llvm-project/tree/function-c , which may make inspecting stacked patches easier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148827/new/

[PATCH] D148827: -fsanitize=function: support C

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: Sanitizers, efriedma, pcc, peter.smith, sberg, samitolvanen. Herald added a subscriber: Enna1. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, Sanitizers. Herald added a subscriber:

[PATCH] D148779: [Sema] -Wformat: recognize %lb for the printf/scanf family of functions

2023-04-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 rG5cf37d8bd5c0: [Sema] -Wformat: recognize %lb for the printf/scanf family of functions (authored by MaskRay). Repository: rG LLVM Github Monorepo

[PATCH] D148779: [Sema] -Wformat: recognize %lb for the ``printf``/``scanf`` family of functions

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515357. MaskRay retitled this revision from "[Sema] Fix spurious warning for printf("%lb", (long)10)" to "[Sema] -Wformat: recognize %lb for the ``printf``/``scanf`` family of functions". MaskRay edited the summary of this revision. MaskRay added a comment.

[PATCH] D148785: -fsanitize=function: use type hashes instead of RTTI objects

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515243. MaskRay added a comment. Herald added a subscriber: pengfei. update llvm/test/CodeGen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148785/new/ https://reviews.llvm.org/D148785 Files:

[PATCH] D148785: -fsanitize=function: use type hashes instead of RTTI objects

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: Sanitizers, pcc, peter.smith, sberg, samitolvanen. Herald added subscribers: Enna1, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers:

[PATCH] D148779: [Sema] Fix spurious warning for printf("%lb", (long)10)

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515205. MaskRay added a comment. update test/Sema/format-strings-fixit.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148779/new/ https://reviews.llvm.org/D148779 Files: clang/lib/AST/FormatString.cpp

[PATCH] D148779: [Sema] Fix spurious warning for printf("%lb", (long)10)

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aaron.ballman, dim, enh. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix https://github.com/llvm/llvm-project/issues/62247 D131057

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515166. MaskRay added a comment. update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148665/new/ https://reviews.llvm.org/D148665 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515161. MaskRay retitled this revision from "Port -fsanitize=function to AArch64" to "Allow -fsanitize=function on all targets". MaskRay edited the summary of this revision. MaskRay added a comment. Herald added subscribers: kadircet, ilya-biryukov. allow

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515157. MaskRay edited the summary of this revision. MaskRay added a comment. remove an assert to make this feature available to all targets Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148665/new/

[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I hope that we add just one option, instead of aliases. Aliases are usually added for compatibility when something is deprecated or changed, not for new options. My "Request Changes" status still holds. The patch hasn't fixed something obvious: the description

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Can you add example options in the description and say how this patch is going to change it? I think `std::map` is intended so that for `-f*-prefix-map` values, if both `a/b=...` and `a/b/c=...` match an input path, the longest wins, not the latest wins. Repository:

[PATCH] D148573: Port -fsanitize=function to AArch64

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148573#4280335 , @peter.smith wrote: > With moving the signature before the function entry this looks good to me. > I'm not so familiar with the code in https://reviews.llvm.org/D148665 would > ideally find someone a bit

[PATCH] D148387: remove Demangle/StringView.h

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LGTM, but this can only be accepted from a member of #libc_abi Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148387/new/

[PATCH] D148556: [libcxxabi][demangle] create helper for std::string_view::starts_with

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. A member from #libc_abi needs to review this as well to make this differential green :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148556/new/ https://reviews.llvm.org/D148556

[PATCH] D148556: [libcxxabi][demangle] create helper for std::string_view::starts_with

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. > This was added to ADT in https://reviews.llvm.org/D148367 then reverted in > https://reviews.llvm.org/D148547 because it was a layering violation pointed > out in https://reviews.llvm.org/D148384#4270356. This description requires

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D146987#4281068 , @Orlando wrote: >> I think we may have an issue due to this. I'm basing that on the blamelist, >> but I'm still bisecting our build, which may take some time to confirm. Can >> you take a look, and revert

[PATCH] D148671: [Driver] Make -fsanitize=kcfi,function incompatible

2023-04-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 rGadbdef6a9f39: [Driver] Make -fsanitize=kcfi,function incompatible (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D148671: [Driver] Make -fsanitize=kcfi,function incompatible

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 515063. MaskRay edited the summary of this revision. MaskRay added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148671/new/ https://reviews.llvm.org/D148671 Files:

[PATCH] D146269: MIPS: allow o32 abi with 64bit CPU and 64 abi with 32bit triple

2023-04-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: llvm/lib/Target/Mips/MipsSubtarget.cpp:107 // Check if Architecture and ABI are compatible. - assert(((!isGP64bit() && isABI_O32()) || -

[PATCH] D148671: [Driver] Make -fsanitize=kcfi,function incompatible

2023-04-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: nickdesaulniers, samitolvanen, peter.smith. Herald added subscribers: yaneury, supersymetrie, Chia-hungDuan, cryptoad. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a

[PATCH] D148573: Port -fsanitize=function to AArch64

2023-04-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 514768. MaskRay edited the summary of this revision. MaskRay added a comment. Make -mbranch-protection=bti -fsanitize=function work. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148573/new/

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

2023-04-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 514761. MaskRay added a comment. fix clang/test/CodeGen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148665/new/ https://reviews.llvm.org/D148665 Files: clang/lib/CodeGen/CGExpr.cpp

[PATCH] D148573: Port -fsanitize=function to AArch64

2023-04-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148573#4277573 , @peter.smith wrote: > As it stands I think this may have problems with -mbranch-protection. In that > case we'll need a `BTI c` to be the target of the indirect branch. I'm > guessing something like: > >

[PATCH] D148665: Change -fsanitize=function to place two words before the function entry

2023-04-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dmgreen, lenary, pcc, peter.smith. Herald added subscribers: Enna1, hiraditya, kristof.beyls. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers:

[PATCH] D148573: Port -fsanitize=function to AArch64

2023-04-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dmgreen, lenary, pcc, peter.smith. Herald added subscribers: Enna1, hiraditya, kristof.beyls, emaste. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added

[PATCH] D148410: [Parse] Remove TimeTraceScope for "ParseTemplate"

2023-04-17 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG676a96f768e1: [Parse] Remove TimeTraceScope for ParseTemplate (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148410/new/

[PATCH] D148410: [Parse] Remove TimeTraceScope for "ParseTemplate"

2023-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: clang, MaggieYi, aras-p, anton-afanasyev. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix https://github.com/llvm/llvm-project/issues/56554

[PATCH] D78644: [LSan] Enable for SystemZ

2023-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D78644#4268685 , @iii wrote: > I guess the intention is dropping the special case? The following patch > passes regtests: > > --- a/compiler-rt/lib/lsan/lsan_allocator.h > +++ b/compiler-rt/lib/lsan/lsan_allocator.h > @@

[PATCH] D78644: [LSan] Enable for SystemZ

2023-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a subscriber: Enna1. Herald added a project: All. Comment at: compiler-rt/lib/lsan/lsan_allocator.h:76 +#elif defined(__s390x__) +const uptr kAllocatorSpace = 0x400ULL; +const uptr kAllocatorSize = 0x400ULL; // 4T.

[PATCH] D148034: [clang][driver] Disable GP relaxation with RISC-V ShadowCallStack

2023-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148034#4264996 , @asb wrote: > In D148034#4262991 , @MaskRay wrote: > >> In D148034#4260376 , @asb wrote: >> >>> Will `--[no-]relax-gp` make

[PATCH] D132608: [CMake] Clean up CMake binary dir handling

2023-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added subscribers: bviyer, ekilmer, jplehr, thopre. @Ericson2314 @phosek What's the state of this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132608/new/ https://reviews.llvm.org/D132608

[PATCH] D148181: [Demangle] make llvm::demangle take a StringRef; NFC

2023-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Unfortunately we cannot do this. `LLVMSupport` depends on `LLVMDemangle`. Due to library layering `LLVMDemangle` cannot depend on `LLVMSupport`. The layering may look weird, but that's what we have. Using `std::string_view` may possibly be fine. Repository: rG LLVM

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The latest reland 3820e9a2b29a2e268319ed6635da0d59e18d736d still caused some issues to our internal workloads. Stay tuned... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148034: [clang][driver] Disable GP relaxation with RISC-V ShadowCallStack

2023-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148034#4260376 , @asb wrote: > Will `--[no-]relax-gp` make its way into a minor gcc point release or do we > need to wait for the next major release? > > In terms of this breaking GNU users - isn't it the case that without

[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

2023-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4236 + +// Use the -march=help flag as the dummy input to cc1. +Actions.clear(); craig.topper wrote: > MaskRay wrote: > > Why is the code needed? Can --print-supported-extensions

[PATCH] D148034: [clang][driver] Disable GP relaxation with RISC-V ShadowCallStack

2023-04-11 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. Sorry, we cannot do this. See https://reviews.llvm.org/D147983#4259132 I added --[no-]relax-gp to GNU ld master branch recently, which isn't in a released binutils version yet.

[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

2023-03-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created a GCC feature request: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109349 The subject and summary should be fixed and `-march=help` references should be removed. Comment at: clang/lib/Driver/Driver.cpp:4236 + +// Use the -march=help

[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

2023-03-30 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. Aliasing `-march=help` to `--print-supported-extensions` looks weird. I think this patch should remove `-march=help`. Comment at:

[PATCH] D146686: [Driver] Fix rpath for compiler-rt

2023-03-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/lib/Driver/ToolChain.cpp:638 + AddPath({getOSLibName(), llvm::Triple::getArchTypeName(getArch())}); + + return Paths; unneeded

[PATCH] D146947: [docs][clang] Add extra information inside -fsanitize=unsigned-shift-base for UndefinedBehaviorSanitizer

2023-03-30 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/D146947/new/ https://reviews.llvm.org/D146947

[PATCH] D145726: Fix assembler error when -g and -gdwarf-* is passed with -fno-integrated-as.

2023-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Please update the commit message and comment about what binutils versions reject the construct. Comment at: clang/test/Driver/gcc_forward.c:49 +// DEBUG-NOT: "-gdwarf-4" \ No newline at end of file No newline at end of file Please

[PATCH] D147030: [Clang][Driver] Default Generic_GCC::IsIntegratedAssemblerDefault to true

2023-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2924 + default: +if (getTriple().getVendor() == llvm::Triple::Myriad) + return false; `return getTriple().getVendor() != llvm::Triple::Myriad;` Repository: rG LLVM

[PATCH] D146686: [Driver] Fix rpath for compiler-rt

2023-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/OHOS.cpp:140 getFilePaths().clear(); - std::string CandidateLibPath = getArchSpecificLibPath(); - if (getVFS().exists(CandidateLibPath)) -getFilePaths().push_back(CandidateLibPath); + for (const

[PATCH] D146686: [Driver] Fix rpath for compiler-rt

2023-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The new test can be placed in `arch-specific-libdir-rpath.c`. One or two additional RUN lines seem sufficient, no need to duplicate too many. Also, use `--target=` for new tests and avoid `^//$`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146686/new/

[PATCH] D146427: [clang-tools-extra] Fix linking ClangdTests when using libclang-cpp

2023-03-24 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. (back from a long vacation with little time spending on reviews.llvm.org ) I have verified that `tools/clang/tools/extra/clangd/unittests/ClangdTests` does not link in

<    2   3   4   5   6   7   8   9   10   11   >