[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-21 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/139614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-05-02 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I've also seen ConstantEvaluationC99 intermittently fail on our mac bots recently https://github.com/llvm/llvm-project/pull/134196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [cmake] Reenable libclang.dll when LLVM_ENABLE_PIC (PR #138343)

2025-05-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/138343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cmake] Reenable libclang.dll when LLVM_ENABLE_PIC (PR #138343)

2025-05-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/138343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cmake] Reenable libclang.dll LLVM_ENABLE_PIC (PR #138343)

2025-05-02 Thread Arthur Eubanks via cfe-commits
@@ -106,7 +106,7 @@ if (LLVM_EXPORTED_SYMBOL_FILE) DEPENDS ${LIBCLANG_VERSION_SCRIPT_FILE}) endif() -if((NOT (WIN32 OR CYGWIN) AND LLVM_ENABLE_PIC) OR +if((NOT CYGWIN AND LLVM_ENABLE_PIC) OR ((WIN32 OR CYGWIN) AND NOT LIBCLANG_BUILD_STATIC)) ---

[clang] [cmake] Reenable libclang.dll LLVM_ENABLE_PIC (PR #138343)

2025-05-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/138343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cmake] Reenable libclang.dll on Windows when LLVM_ENABLE_PIC (PR #138343)

2025-05-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/138343 >From f3e9e6f256bef046b513701a43b369c5c127aac7 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 2 May 2025 20:39:17 + Subject: [PATCH 1/2] [cmake] Reenable libclang.dll on Windows when LLVM_ENABLE_

[clang] [Clang][Cygwin] Disable shared libs on Cygwin by default (PR #138119)

2025-05-02 Thread Arthur Eubanks via cfe-commits
@@ -106,7 +106,8 @@ if (LLVM_EXPORTED_SYMBOL_FILE) DEPENDS ${LIBCLANG_VERSION_SCRIPT_FILE}) endif() -if(LLVM_ENABLE_PIC OR (WIN32 AND NOT LIBCLANG_BUILD_STATIC)) +if((NOT (WIN32 OR CYGWIN) AND LLVM_ENABLE_PIC) OR + ((WIN32 OR CYGWIN) AND NOT LIBCLANG_BUIL

[clang] [cmake] Reenable libclang.dll on Windows when LLVM_ENABLE_PIC (PR #138343)

2025-05-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/138343 This was accidentally disabled in #138119 for non-mingw Windows. >From f3e9e6f256bef046b513701a43b369c5c127aac7 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 2 May 2025 20:39:17 + Subject: [PATC

[clang] [Clang][Cygwin] Disable shared libs on Cygwin by default (PR #138119)

2025-05-02 Thread Arthur Eubanks via cfe-commits
@@ -106,7 +106,8 @@ if (LLVM_EXPORTED_SYMBOL_FILE) DEPENDS ${LIBCLANG_VERSION_SCRIPT_FILE}) endif() -if(LLVM_ENABLE_PIC OR (WIN32 AND NOT LIBCLANG_BUILD_STATIC)) +if((NOT (WIN32 OR CYGWIN) AND LLVM_ENABLE_PIC) OR + ((WIN32 OR CYGWIN) AND NOT LIBCLANG_BUIL

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-05-02 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this causes a `-Wmicrosoft-goto` warning on ``` $ cat /tmp/a.c void f() { goto l; int i = 0; l: } $ bin/clang-cl /c /tmp/a.c ... /tmp/a.c(2,2): warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto] 2 | goto l;

[clang] [nfc] Fix formatting in clang release notes (PR #138172)

2025-05-01 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/138172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-05-01 Thread Arthur Eubanks via cfe-commits
@@ -130,6 +133,20 @@ static bool saveMLIRTempFile(const CompilerInvocation &ci, // Custom BeginSourceFileAction //===--===// + +static llvm::cl::opt ClPGOColdFuncAttr( aeubanks wrote: sorry,

[clang] [clang] Make `-ftime-report` and `-ftime-report-json` honor `-info-output-file` (PR #138035)

2025-04-30 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/138035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Arthur Eubanks via cfe-commits
@@ -296,7 +296,14 @@ int cc1_main(ArrayRef Argv, const char *Argv0, void *MainAddr) { // If any timers were active but haven't been destroyed yet, print their // results now. This happens in -disable-free mode. - llvm::TimerGroup::printAll(llvm::errs()); + // llvm::Tim

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Arthur Eubanks via cfe-commits
@@ -442,10 +442,6 @@ void TimerGroup::clearAll() { void TimerGroup::printJSONValue(raw_ostream &OS, const PrintRecord &R, const char *suffix, double Value) { - assert(yaml::needsQuotes(Name) == yaml::QuotingType::None && aeuban

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. lgtm, although I'd like @AaronBallman to take a quick look to make sure this seems ok (e.g. naming) https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits mailing list cfe-commits@lists

[clang] Generate empty .clang-format-ignore before running tests (PR #136154)

2025-04-18 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/136154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Generate empty .clang-format-ignore before running tests (PR #136154)

2025-04-17 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: ah yes, the build directory can be outside of the source directory, lgtm. still good to keep the other PR though so outside .clang-format-ignore files don't leak into clang-format used inside llvm-project https://github.com/llvm/llvm-project/pull/136154

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-15 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I'm guessing that a stage2 build of clang would probably repro the issue, perhaps this was tested against older clangs that didn't warn on this. https://github.com/llvm/llvm-project/pull/133173 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-15 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: we're seeing the following after this patch: ``` /Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Support/ProgramStack.cpp:67:34: error: this directive must appear between .cfi_startproc and .cfi_endproc directives 67 | "add x29, x0, #0x10\n\t"

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-04-10 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: @mizvekov we're seeing pcm non-determinism after this reland, does anything jump out at you? https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang-tools-extra] [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #131965)

2025-03-21 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: hi, this breaks `clang -cc1 -triple x86_64-pc-windows-msvc19.26.0 -fsyntax-only -fms-extensions -fms-compatibility -fms-compatibility-version=19.26 -std=c++17 /tmp/a.ii` [a.ii.txt](https://github.com/user-attachments/files/19375232/a.ii.txt) which breaks stage 2 builds of cla

[clang] [clang-tools-extra] [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #131965)

2025-03-20 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: thanks! https://github.com/llvm/llvm-project/pull/131965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #131965)

2025-03-20 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: seems like there are conflicts reverting this at head, could you take a look @mizvekov? https://github.com/llvm/llvm-project/pull/131965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][lit] mkdir before mkstemp in is_filesystem_case_insensitive() (PR #131036)

2025-03-18 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/131036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. not locking causing the test failures makes sense https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] Revert "Use global TimerGroups for both new pass manager and old pass manager timers" (PR #131173)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/131173 Reverts llvm/llvm-project#130375 Causes breakages, e.g. https://lab.llvm.org/buildbot/#/builders/160/builds/14607 >From 747535b6fd8b3bbee0c8a34a7d92fd47a89d65f5 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks D

[clang] [clang][lit] mkdir before mkstemp in is_filesystem_case_insensitive() (PR #131036)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/131036 >From 6ab707eec90cbe1d8a8f5ddf19765f514b275095 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 12 Mar 2025 21:42:47 + Subject: [PATCH 1/2] [clang][lit] mkdir before mkstemp in is_filesystem_case_i

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/130375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lit] mkdir before mkstemp in is_filesystem_case_insensitive() (PR #131036)

2025-03-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/131036 In the CMake build test_exec_root already exists here, but not in the gn build, which causes this to fail. >From 6ab707eec90cbe1d8a8f5ddf19765f514b275095 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: We

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-12 Thread Arthur Eubanks via cfe-commits
@@ -39,19 +39,20 @@ Timer *getPassTimer(Pass *); /// This class implements -time-passes functionality for new pass manager. /// It provides the pass-instrumentation callbacks that measure the pass /// execution time. They collect timing info into individual timers as -/// passe

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-11 Thread Arthur Eubanks via cfe-commits
@@ -62,16 +62,13 @@ class PassTimingInfo { private: StringMap PassIDCountMap; ///< Map that counts instances of passes - DenseMap> TimingData; ///< timers for pass instances - TimerGroup TG; + DenseMap TimingData; ///< timers for pass instances aeubanks

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-11 Thread Arthur Eubanks via cfe-commits
@@ -19,6 +19,5 @@ // NPM: InstCombinePass{{$}} // NPM-NOT: InstCombinePass # // TIME: Total{{$}} -// NPM: Pass execution timing report aeubanks wrote: why does this line disappear? https://github.com/llvm/llvm-project/pull/130375 _

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-10 Thread Arthur Eubanks via cfe-commits
@@ -115,7 +103,9 @@ void PassTimingInfo::init() { /// Prints out timing information and then resets the timers. void PassTimingInfo::print(raw_ostream *OutStream) { - TG.print(OutStream ? *OutStream : *CreateInfoOutputFile(), true); + NamedRegionTimer::getNamedTimerGroup(Tim

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-10 Thread Arthur Eubanks via cfe-commits
@@ -169,6 +169,17 @@ struct NamedRegionTimer : public TimeRegion { explicit NamedRegionTimer(StringRef Name, StringRef Description, StringRef GroupName, StringRef GroupDescription, bool Enabled = true); + + // Create or

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-14 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-14 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I believe all concerns have been addressed, will merge now with the approvals. Happy to follow up on any other concerns. https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-14 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 01/11] [clang][X86] Support __attribute__((model("small"/"larg

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks deleted https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
@@ -2950,12 +2950,11 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } -static bool isValidCodeModelAttr(Sema &S, StringRef Str) { - if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +static bool isValidCodeModelAttr(llvm::Triple Tripl

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 01/11] [clang][X86] Support __attribute__((model("small"/"larg

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 01/10] [clang][X86] Support __attribute__((model("small"/"larg

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
@@ -2964,20 +2963,36 @@ static bool isValidCodeModelAttr(Sema &S, StringRef Str) { static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { StringRef Str; SourceLocation LiteralLoc; + auto IsTripleSupported = [](const llvm::Triple Triple) { +return Tr

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/9] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][NFC] Precommit test file refactoring (PR #125944)

2025-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/125944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
@@ -62,6 +62,10 @@ def CodeModelDocs : Documentation { let Content = [{ The ``model`` attribute allows overriding the translation unit's code model (specified by ``-mcmodel``) for a specific global variable. + +On LoongArch, allowed values are "normal", "medium", "extreme". -

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/8] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/7] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
@@ -3117,11 +3120,20 @@ def PragmaClangTextSection : InheritableAttr { let Documentation = [InternalOnly]; } -def CodeModel : InheritableAttr, TargetSpecificAttr { +// The code model attribute only applies to LoongArch and x86-64, but for NVPTX aeubanks wrot

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-04 Thread Arthur Eubanks via cfe-commits
@@ -2949,15 +2950,32 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +return Str == "normal" || Str == "medium" || St

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-04 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/6] [clang][X86] Support __attribute__((model("small"/"large"

[clang] 5dccfd9 - [clang] Unbreak build

2025-02-03 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2025-02-03T22:12:04Z New Revision: 5dccfd9283cd784758aa3d16fcb6e31f135c080f URL: https://github.com/llvm/llvm-project/commit/5dccfd9283cd784758aa3d16fcb6e31f135c080f DIFF: https://github.com/llvm/llvm-project/commit/5dccfd9283cd784758aa3d16fcb6e31f135c080f.diff LOG

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/5] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-03 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I've allowed the attribute for NVPTX targets and ignored it in SemaDeclAttr rather than figure out how to conditionally emit a warning during codegen, does that work? https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits ma

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-30 Thread Arthur Eubanks via cfe-commits
@@ -1,64 +1,40 @@ -// RUN: %clang_cc1 -triple aarch64 -verify=expected,aarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64 -verify=expected,unsupported -fsyntax-only %s // RUN: %clang_cc1 -triple loongarch64 -verify=expected,loongarch64 -fsyntax-only %s -// RUN: %clang

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
@@ -1,64 +1,40 @@ -// RUN: %clang_cc1 -triple aarch64 -verify=expected,aarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64 -verify=expected,unsupported -fsyntax-only %s // RUN: %clang_cc1 -triple loongarch64 -verify=expected,loongarch64 -fsyntax-only %s -// RUN: %clang

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
@@ -1,64 +1,40 @@ -// RUN: %clang_cc1 -triple aarch64 -verify=expected,aarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64 -verify=expected,unsupported -fsyntax-only %s // RUN: %clang_cc1 -triple loongarch64 -verify=expected,loongarch64 -fsyntax-only %s -// RUN: %clang

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
@@ -5,7 +5,7 @@ // RUN: %clang_cc1 -triple riscv64 -verify=expected,riscv64 -fsyntax-only %s // RUN: %clang_cc1 -triple x86_64 -verify=expected,x86_64 -fsyntax-only %s aeubanks wrote: done https://github.com/llvm/llvm-project/pull/124834 __

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/4] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/3] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
@@ -5,7 +5,7 @@ // RUN: %clang_cc1 -triple riscv64 -verify=expected,riscv64 -fsyntax-only %s // RUN: %clang_cc1 -triple x86_64 -verify=expected,x86_64 -fsyntax-only %s aeubanks wrote: does the change to this test make sense, or am I missing something that putti

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
@@ -2949,6 +2950,13 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + bool IsX8664Target = + S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86_64; + bool IsX

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/2] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-29 Thread Arthur Eubanks via cfe-commits
@@ -5,7 +5,7 @@ // RUN: %clang_cc1 -triple riscv64 -verify=expected,riscv64 -fsyntax-only %s // RUN: %clang_cc1 -triple x86_64 -verify=expected,x86_64 -fsyntax-only %s aeubanks wrote: I thought nvptx64 was the GPU-side of things, the GPU side is also using code

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-28 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/124834 Following up #72078, on x86-64 this allows a global to be considered small or large regardless of the code model. For example, x86-64's medium code model by default classifies globals as small or large dependi

[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

2024-12-10 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/119365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

2024-12-10 Thread Arthur Eubanks via cfe-commits
@@ -594,9 +580,9 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL, SearchTimes++; const Instruction *CxtI = dyn_cast(V); - unsigned MaxIndexSize = DL.getMaxIndexSizeInBits(); aeubanks wrote: looks like `getMaxIndexSizeInBits

[clang] [llvm] Reland "[LLVM] Add IRNormalizer Pass" (PR #113780)

2024-10-30 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I believe the failure reported in the original bot is only under expensive checks (`-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`) https://github.com/llvm/llvm-project/pull/113780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [compiler-rt] [lld] [llvm] [Coverage][WebAssembly] Add initial support for WebAssembly/WASI (PR #111332)

2024-10-21 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: perhaps the `flock` cmake check doesn't work on windows for some reason? maybe wrong include? https://github.com/llvm/llvm-project/pull/111332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-10-18 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I believe Chrome is also seeing many test failures due to this (https://crbug.com/374115887), although I haven't yet confirmed it's due to this specific commit. https://github.com/llvm/llvm-project/pull/86318 ___ cfe-commits mailing l

[clang] [llvm] Reapply "[Inliner] Propagate more attributes to params when inlining (#91101)" (2nd Attempt) (PR #112749)

2024-10-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. relanding lgtm since the exposed issue was fixed https://github.com/llvm/llvm-project/pull/112749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-16 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I've reverted this in 9e6d24f61f3a6730465f3427463dd958cdcd8b9a https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9e6d24f - Revert "[Inliner] Propagate more attributes to params when inlining (#91101)"

2024-10-16 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2024-10-16T21:21:34Z New Revision: 9e6d24f61f3a6730465f3427463dd958cdcd8b9a URL: https://github.com/llvm/llvm-project/commit/9e6d24f61f3a6730465f3427463dd958cdcd8b9a DIFF: https://github.com/llvm/llvm-project/commit/9e6d24f61f3a6730465f3427463dd958cdcd8b9a.diff LOG

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-16 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: This causes broken IR: ``` $ opt -O3 -disable-output /tmp/a.ll Range bit width must match type bit width! tail call void @llvm.memset.p0.i64(ptr noundef align 1 %dst, i8 noundef range(i32 0, 256) %v8, i64 noundef range(i64 -2147483648, 21474836

[clang] [llvm] [mlir] [polly] [NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (PR #111752)

2024-10-11 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: for such a wide-reaching change, it would have been nice to add the new function in one commit, update users in other commits, then remove the old function in one last commit. makes it easier to revert the removal of the old function, and makes it easier for out of tree users t

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-10-04 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: ah there's a stack trace in an asserts build of clang ``` F 00:00:1728077756.9778713296 logging.cc:62] assert.h assertion failed at third_party/llvm/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:4602 in llvm::PointerUnion *clang::LocalInstantiationScope::find

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-10-04 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this has also caused the following issue to pop up in our modules build ``` error: variable 'param' cannot be implicitly captured in a lambda with no capture-default specified ``` hopefully the error provides some guidance for where to look, but I can try to get a reduced repr

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: I see that MMI really is a Codegen concept and not a Target concept, so that's why it takes an LLVMTargetMachine instead of TargetMachine. However, the `static_cast`s everywhere are extremely unfortunate. And it doesn't make sense to make the return type

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: ah there's more context in https://reviews.llvm.org/D123964 https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
@@ -1162,6 +1165,7 @@ void EmitAssemblyHelper::RunCodegenPipeline( // does not work with the codegen pipeline. // FIXME: make the new PM work with the codegen pipeline. legacy::PassManager CodeGenPasses; + std::unique_ptr MMI; aeubanks wrote: can this j

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
@@ -106,16 +106,18 @@ class MachineModuleInfo { const Function *LastRequest = nullptr; ///< Used for shortcut/cache. MachineFunction *LastResult = nullptr; ///< Used for shortcut/cache. - MachineModuleInfo &operator=(MachineModuleInfo &&MMII) = delete; + /// Deleted copy

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: I'm still trying to wrap my head around LLVMTargetMachine vs TargetMachine, let me do some reading https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-23 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: hmm yeah it does seem that `MCContext` is hard to unentangle from `MMI`/`MachineFunction` is it possible to split out the "MMIWP doesn't own MMI" change? that seems less controversial and easier to review/merge and makes the `MCContext` changes easier to look at https://githu

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-17 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: sorry for the delay after looking at MMI/MCContext, I agree that MMI shouldn't own MCContext, but do we even need a reference from MMI to MCContext? they are different layers of codegen IIUC. if it's possible to completely separate them we should do that (please correct me if

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-12 Thread Arthur Eubanks via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: aeubanks wrote: here's something reduced, let me know if you need the command to create the pch file as well ``` https://github.com/llvm/llvm-project/pull/104512 _

[clang] [clang][test] Fix some windows driver tests with legacy runtime dir layout (PR #108452)

2024-09-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/108452 With the legacy runtime directory layout, the runtime libraries are under `lib/clang/20/lib/windows` and have an arch suffix. >From c45f5df3c0ba7afd6c5e14e8e49ffa853abc7147 Mon Sep 17 00:00:00 2001 From: Arthu

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-12 Thread Arthur Eubanks via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: aeubanks wrote: let me try to come up with a reduced repro https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mail

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-11 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this looks like it has false positives: https://crbug.com/366074092 can we revert in the meantime? https://github.com/llvm/llvm-project/pull/107213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [compiler-rt] Reland [asan][windows] Eliminate the static asan runtime on windows (PR #107899)

2024-09-11 Thread Arthur Eubanks via cfe-commits
@@ -136,7 +160,7 @@ append_list_if(MINGW "${MINGW_LIBRARIES}" ASAN_DYNAMIC_LIBS) add_compiler_rt_object_libraries(RTAsan_dynamic OS ${SANITIZER_COMMON_SUPPORTED_OS} ARCHS ${ASAN_SUPPORTED_ARCH} - SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES} + SOURCES ${ASAN_SOURCES} --

[clang] [compiler-rt] Reland [asan][windows] Eliminate the static asan runtime on windows (PR #107899)

2024-09-11 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: previous passing output ``` 2: = 3: ==7382==ERROR: AddressSanitizer: requested allocation size 0x101 (0x1001008 after adjustments for alignment, red zones etc.) exceeds maximum supported size o

[clang] [compiler-rt] Reland [asan][windows] Eliminate the static asan runtime on windows (PR #107899)

2024-09-11 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I think this is also somehow affecting asan tests on macos: https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA/2034/ was able to reproduce locally `build/cmake/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/asan-arm64-Darwin/allocator_returns_null.cpp` faili

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-11 Thread Arthur Eubanks via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: aeubanks wrote: this is causing a crash with precompiled headers. I can try to reduce, but hopefully the problem is obvious from this assert/stack trace? ``` clang++: ../..

  1   2   3   4   5   6   >