[clang] [llvm] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/79082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang-repl] Enable native CPU detection by default (#77491)" (PR #79178)

2024-01-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/79178 Reverting because `clang-repl -Xcc -mcpu=arm1176jzf-s` isn't overwriting this as I had expected. We need to check whether a specific CPU flag was given by the user first. Reverts llvm/llvm-project#77491

[clang] Revert "[clang-repl] Enable native CPU detection by default (#77491)" (PR #79178)

2024-01-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/79178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fb9a82b - [clang-repl] Refine fix for linker error: PLT offset too large

2024-01-24 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-01-24T11:45:04+01:00 New Revision: fb9a82b0235713782c1cf9d1eba20ce8d95766f7 URL: https://github.com/llvm/llvm-project/commit/fb9a82b0235713782c1cf9d1eba20ce8d95766f7 DIFF: https://github.com/llvm/llvm-project/commit/fb9a82b0235713782c1cf9d1eba20ce8d95766f7.diff

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-24 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: The above patch landed after `release/18.x` branched. It drops the check for `CMAKE_SYSTEM_PROCESSOR` as discussed in this thread and only relies on the linker-flag check. This seems to be the right thing to do. I checked on 32-bit Raspbian @ RPi4b: It correctly defaults

[clang] [llvm] [Draft] Basic JITLink AArch32 support for clang-repl (PR #77313)

2024-01-20 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/77313 From ab1fa3773766072882666a16682e985bbd9cd72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 18 Jan 2024 17:26:33 +0100 Subject: [PATCH 1/9] [JITLink][AArch32] Add GOT builder

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/78959 I cross-compile clang-repl with GCC-10 on Ubuntu 20.04 and get this error when linking with gold: PLT offset too large, try linking with --long-plt From 0449f8fc14a703aae515db1696bbbee578914629 Mon Sep 17

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/78959 From 0449f8fc14a703aae515db1696bbbee578914629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sat, 20 Jan 2024 11:13:45 +0100 Subject: [PATCH 1/2] [clang-repl] Fix linker error on AR

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Thank for the quick review! Toolchain files seem to set a lowercase string sometimes, so I added a case-conversion. https://github.com/llvm/llvm-project/pull/78959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/78959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Oh, that's unfortunate. Let me add a check for `LLVM_USE_LINKER=gold`. AFAIK it's never used on macOS. https://github.com/llvm/llvm-project/pull/78959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] 2bb6d7b - [clang-repl] Limit use of PLT offset flag to linkers that support it

2024-01-22 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-01-22T17:16:52+01:00 New Revision: 2bb6d7b8a4d1e31d5c856174c163e77d7d3a0b94 URL: https://github.com/llvm/llvm-project/commit/2bb6d7b8a4d1e31d5c856174c163e77d7d3a0b94 DIFF: https://github.com/llvm/llvm-project/commit/2bb6d7b8a4d1e31d5c856174c163e77d7d3a0b94.diff

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: @shiltian Does that fix the issue for you? https://github.com/llvm/llvm-project/pull/78959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-23 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: CMake does always have more surprises to offer :) Thanks for fixing it right away @mstorsjo! > When cross compiling LLVM, I never have set `CMAKE_SYSTEM_PROCESSOR` so far, > since we don't really have anything that uses it (before this), which means > that this expands t

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-23 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Oh, I usually don't do that, but it's certainly a valid point. Can you think of a better way to express the condition here? We need `-Wl,--long-plt` for ARM targets whenever the used linker supports it. Otherwise we have to assume that it emits such PLTs by default. http

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-23 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > I don't really know more about the issue that requires --long-plt at the > moment and why it's only needed for clang-repl clang-repl binary size is ~3.7G in debug mode and this seems to exceed the branch range of default ARM PLT slots. The instruction sequence that's n

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-23 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: I was wondering as well and checked the codebase for existing uses, but no findings. Yes, clang has no JIT and may not reach the limit. And yes, LLDB is mostly an `.so` where the linker's approach might differ and/or it's just not built frequently for ARM. Myself, I usual

[clang] [llvm] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/79082 From c206fb211666e77cbe6aeb806174774f5db1a2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 23 Jan 2024 02:35:27 +0100 Subject: [PATCH 1/4] [JITLink][AArch32] Implement Armv5

[clang] [llvm] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
@@ -725,6 +725,60 @@ bool GOTBuilder::visitEdge(LinkGraph &G, Block *B, Edge &E) { return true; } +/// Create a new node in the link-graph for the given stub template. +template +static Block &allocStub(LinkGraph &G, Section &S, const uint8_t (&Code)[Size]) { + constexpr

[clang] [llvm] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail commented: Thanks for your notes @smithp35. This worked out nicely! A test for Thumb B to Arm interworking is todo, because we need support for `R_ARM_THM_JUMP11` first. I will work on it now. I think it's quite rare though and anyway, this is more than Runtim

[clang] [llvm] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
@@ -23,7 +23,7 @@ if(CLANG_PLUGIN_SUPPORT) export_executable_symbols_for_plugins(clang-repl) endif() -string(TOUPPER ${CMAKE_SYSTEM_PROCESSOR} system_processor) +string(TOUPPER "${CMAKE_SYSTEM_PROCESSOR}" system_processor) weliveindetail wrote: (Unrelated c

[llvm] [clang] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
@@ -725,6 +725,13 @@ bool GOTBuilder::visitEdge(LinkGraph &G, Block *B, Edge &E) { return true; } +const uint8_t ArmThumbv5LdrPc[] = { +0x78, 0x47, // bx pc +0xfd, 0xe7, // b #-6 ; Arm recommended sequence to follow bx pc +0x04, 0xf0, 0x1

[llvm] [clang] [JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets (PR #79082)

2024-01-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/79082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 767b328 - [ORC] Minor renaming and typo fixes (NFC)

2021-09-23 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2021-09-23T21:33:34+02:00 New Revision: 767b328e506ef069ecbb89b7cc9e2da7f8f84c6c URL: https://github.com/llvm/llvm-project/commit/767b328e506ef069ecbb89b7cc9e2da7f8f84c6c DIFF: https://github.com/llvm/llvm-project/commit/767b328e506ef069ecbb89b7cc9e2da7f8f84c6c.diff

[clang] d9eece9 - [ObjC][ARC] Teach the OptimizeSequences step of ObjCARCOpts about WinEH funclet tokens

2023-01-24 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2023-01-24T15:17:18+01:00 New Revision: d9eece916a8a9b370e1f90e6461c612d12c55729 URL: https://github.com/llvm/llvm-project/commit/d9eece916a8a9b370e1f90e6461c612d12c55729 DIFF: https://github.com/llvm/llvm-project/commit/d9eece916a8a9b370e1f90e6461c612d12c55729.diff

[clang] 3b387d1 - Lift EHPersonalities from Analysis to IR (NFC)

2023-01-27 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2023-01-27T18:05:13+01:00 New Revision: 3b387d10707d3ec5f4786812cc055c89c3eaa161 URL: https://github.com/llvm/llvm-project/commit/3b387d10707d3ec5f4786812cc055c89c3eaa161 DIFF: https://github.com/llvm/llvm-project/commit/3b387d10707d3ec5f4786812cc055c89c3eaa161.diff

[clang] 9a9d636 - [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-22 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2022-11-22T12:02:53+01:00 New Revision: 9a9d636caeea9ca9364b906364ac1aaba0869858 URL: https://github.com/llvm/llvm-project/commit/9a9d636caeea9ca9364b906364ac1aaba0869858 DIFF: https://github.com/llvm/llvm-project/commit/9a9d636caeea9ca9364b906364ac1aaba0869858.diff

[clang] 01023bf - [CGObjC] Add run line for release mode in test arc-exceptions-seh.mm (NFC)

2022-11-22 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2022-11-22T13:43:08+01:00 New Revision: 01023bfcd33f922ed8c934ce563e54abe8bfe246 URL: https://github.com/llvm/llvm-project/commit/01023bfcd33f922ed8c934ce563e54abe8bfe246 DIFF: https://github.com/llvm/llvm-project/commit/01023bfcd33f922ed8c934ce563e54abe8bfe246.diff

[clang] a37807a - Revert "[CGObjC] Add run line for release mode in test arc-exceptions-seh.mm (NFC)"

2022-11-22 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2022-11-22T20:51:09+01:00 New Revision: a37807ac8a3e9d2880a483940dcd33194f354bf8 URL: https://github.com/llvm/llvm-project/commit/a37807ac8a3e9d2880a483940dcd33194f354bf8 DIFF: https://github.com/llvm/llvm-project/commit/a37807ac8a3e9d2880a483940dcd33194f354bf8.diff

[clang] 63d65d3 - Reland "[CGObjC] Add run line for release mode in test arc-exceptions-seh.mm (NFC)"

2022-11-23 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2022-11-23T11:35:22+01:00 New Revision: 63d65d3764ea2fc27e0e1a6054ec42cff6d84158 URL: https://github.com/llvm/llvm-project/commit/63d65d3764ea2fc27e0e1a6054ec42cff6d84158 DIFF: https://github.com/llvm/llvm-project/commit/63d65d3764ea2fc27e0e1a6054ec42cff6d84158.diff

[clang] [compiler-rt] [llvm] [clang-repl] [ORC] Add support for out-of-process execution on ELF (PR #79936)

2024-02-20 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Thanks for your follow-up. Yes, I agree it's best to leave it here as a draft. We can reference it from future PRs to provide context, if we decide to implement one part or the other in isolation. Thanks! https://github.com/llvm/llvm-project/pull/79936 ___

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-07-01 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/97071 From ca2ab5f9e3470e87923c7b950b7b06e5ff21119e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Fri, 28 Jun 2024 16:43:42 +0200 Subject: [PATCH 1/3] [clang-repl] Fix RuntimeInterfaceBu

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-07-01 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Thanks for your feedback everyone! https://github.com/llvm/llvm-project/pull/97071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-07-03 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/97071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: @vgvassilev Thanks for the ping. I got derailed and missed the fix for the blocker! https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Some bots report failures after this patch landed. I will push a fix soon. https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] 98f9bb3 - [clang-repl] Check host JIT support in all tests that create an Interpreter (#84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-05-28T13:54:09+02:00 New Revision: 98f9bb384af1beb62eb62a353f0585281bee8c26 URL: https://github.com/llvm/llvm-project/commit/98f9bb384af1beb62eb62a353f0585281bee8c26 DIFF: https://github.com/llvm/llvm-project/commit/98f9bb384af1beb62eb62a353f0585281bee8c26.diff

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: @vgvassilev I pushed a quick fix for the tests. I think we should revisit/refactor the test story here though in the mid-term. https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] 6a47315 - [clang-repl] Even more tests create the Interpreter and must check host JIT support (#84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-05-28T22:48:55+02:00 New Revision: 6a47315a3cb2c6d381809f0ba5c89bd8dcdbcaa0 URL: https://github.com/llvm/llvm-project/commit/6a47315a3cb2c6d381809f0ba5c89bd8dcdbcaa0 DIFF: https://github.com/llvm/llvm-project/commit/6a47315a3cb2c6d381809f0ba5c89bd8dcdbcaa0.diff

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: @vvereschaka Thanks for the note! should be fixed now. > I am not sure how this patch changed these tests to start failing on Windows. > Do you have any clue? It's just cases I missed in the first quick-fix > What do you mean? This is adding a lot of boilerplate, becaus

[clang] df542e1 - Fix build: [clang-repl] Even more tests create the Interpreter and must check host JIT support (#84758)

2024-05-28 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-05-28T23:20:27+02:00 New Revision: df542e1ed82bd4e5a9e345d3a3ae63a76893a0cf URL: https://github.com/llvm/llvm-project/commit/df542e1ed82bd4e5a9e345d3a3ae63a76893a0cf DIFF: https://github.com/llvm/llvm-project/commit/df542e1ed82bd4e5a9e345d3a3ae63a76893a0cf.diff

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-29 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Oh indeed, it seems we can decide to skip tests in `SetUp()` ``` class FooTest : public ::testing:Test { protected: void SetUp() { GTEST_SKIP(); } }; ``` https://github.com/llvm/llvm-project/pull/84758 ___ cfe

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > Looks like you already implemented it. Nice. Well, it's gonna be a bit more churn. Eventually, it will reduce coverage for the incremental features in the frontend that are independent from the JIT. To be honest, I don't mind because none of the targets seem relevant fo

[clang] 4310988 - [clang-repl] Even more tests create the Interpreter and must check host JIT support 2 (#84758)

2024-05-30 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-05-30T11:52:15+02:00 New Revision: 4310988991b46c9a35f60abc27a08ee10309a50c URL: https://github.com/llvm/llvm-project/commit/4310988991b46c9a35f60abc27a08ee10309a50c DIFF: https://github.com/llvm/llvm-project/commit/4310988991b46c9a35f60abc27a08ee10309a50c.diff

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: @jakeegan Thanks for reporting! Should be fixed now. Hope we caught them all 🤞 https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/89734 From 3aef8a0b009b54c4839a323b21cb5b09aa50d035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 23 Apr 2024 12:23:11 +0200 Subject: [PATCH 1/3] [clang-repl] Add test for explicit

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/93816 Reduce code bloat by checking test requirements in a common test fixture From fd02a874601b8a72d05c3c1b219e28600851b56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 30 May 20

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Here we go: https://github.com/llvm/llvm-project/pull/93816 https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Oh interesting, the Windows test actually fails at this assertion: ``` DC->getLexicalParent() == CurContext && "The next DeclContext should be lexically contained in the current one.", file C:\ws\src\clang\lib\Sema\SemaDecl.cpp, line 1332 ``` @vgvassilev Any ideas? https

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/93816 From fd02a874601b8a72d05c3c1b219e28600851b56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 30 May 2024 14:32:52 +0200 Subject: [PATCH 1/2] [clang-repl] Introduce common fixtu

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/93816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Looking into https://lab.llvm.org/buildbot/#/builders/86/builds/81169 right now. Pushing a fix soon. https://github.com/llvm/llvm-project/pull/93816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] 647d272 - [clang-repl] Fix SetUp in CodeCompletionTest fixture (#93816)

2024-05-30 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-05-30T17:03:21+02:00 New Revision: 647d2728c4dbc387521ce3984ebfda78ff2b031f URL: https://github.com/llvm/llvm-project/commit/647d2728c4dbc387521ce3984ebfda78ff2b031f DIFF: https://github.com/llvm/llvm-project/commit/647d2728c4dbc387521ce3984ebfda78ff2b031f.diff

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84758 From 7ee5d29f69daf626a4fdc2fced802fe7e881f31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sun, 10 Mar 2024 18:17:48 +0100 Subject: [PATCH 1/2] [clang-repl] Set up executor implic

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > https://github.com/llvm/llvm-project/pull/89031 should unblock this PR. @vgvassilev It did. And it uncovered an issue that I didn't think about before: If we set up the executor in the constructor, then the interpreter instance isn't fully initialized yet when we create

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84758 From 7ee5d29f69daf626a4fdc2fced802fe7e881f31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sun, 10 Mar 2024 18:17:48 +0100 Subject: [PATCH 1/3] [clang-repl] Set up executor implic

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Taking this patch would mean that deriving from Interpreter won't hold as the mechanism for extensions! At least for customizing the JITBuilder. I propose to pass the `LLJITBuilder` to the constructor then and to store it as a member for later `Create/ResetExecutor()` cal

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84758 From 7ee5d29f69daf626a4fdc2fced802fe7e881f31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sun, 10 Mar 2024 18:17:48 +0100 Subject: [PATCH 1/4] [clang-repl] Set up executor implic

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-04-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/89734 This patch adds test coverage for an edge case that is supported already. From 085a93919d8f65419cc856fe5584c83d3eceb142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 23 Apr 2

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-04-23 Thread Stefan Gränitz via cfe-commits
@@ -0,0 +1,13 @@ +// UNSUPPORTED: system-aix + +// RUN: cat %s | clang-repl | FileCheck %s +int *x = new int(); +template struct GuardX { T *&x; GuardX(T *&x) : x(x) {}; ~GuardX(); }; +template GuardX::~GuardX() { delete x; x = nullptr; } + +// clang would normally defer codege

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-23 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: FYI: The run on the Windows bot failed even though tests worked as expected. In particular, all `ClangReplInterpreterTests` unittests passed as well as all `Interpreter` LIT tests. I could land this towards the end of the week. https://github.com/llvm/llvm-project/pull/84

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-04-23 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/89734 From 085a93919d8f65419cc856fe5584c83d3eceb142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 23 Apr 2024 12:23:11 +0200 Subject: [PATCH 1/2] [clang-repl] Add test for explicit

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/89734 From 085a93919d8f65419cc856fe5584c83d3eceb142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 23 Apr 2024 12:23:11 +0200 Subject: [PATCH 1/3] [clang-repl] Add test for explicit

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Stefan Gränitz via cfe-commits
@@ -241,18 +243,13 @@ int main(int argc, const char **argv) { break; } if (Input == R"(%undo)") { -if (auto Err = Interp->Undo()) { +if (auto Err = Interp->Undo()) llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "error: "

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/89879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail approved this pull request. I assume the return code is supposed to reflect only frontend errors? (See my note inline.) From reading the test it's not obvious what is interactive mode and what is non-interactive/batch mode. Might be worth a note. Otherwise, thi

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-04-24 Thread Stefan Gränitz via cfe-commits
@@ -0,0 +1,21 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: cat %s | clang-repl -Xcc -xc -Xcc -Xclang -Xcc -verify | FileCheck %s +// RUN: cat %s | clang-repl -Xcc -xc -Xcc -O2 -Xcc -Xclang -Xcc -verify| FileCheck %s +int printf(const char *, ...); +in

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail commented: I am not an expert on the behavior of IdResolver, but this patch works for me. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-04-24 Thread Stefan Gränitz via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the IdR

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-25 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > The Unix pre-merge seems okay, however the windows pre-merge check is doing > nothing for more than 12h. Yeah same here. I recognized that Windows PR checks are running Flang regression tests now. I guess that adds a huge load on the builders and causes the delays. Min

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-14 Thread Stefan Gränitz via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the IdR

[clang] [clang-repl] Fix unboxing of va_args Value on 32-bit ARM (#94994) (PR #96900)

2024-06-27 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/96900 todo From 2e1eac5919a56fd15a7c79281d6544c4958d6874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 27 Jun 2024 14:28:03 +0200 Subject: [PATCH] [clang-repl] Fix unboxing of va_a

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-28 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/97071 When generating runtime interface bindings, extend integral types to the native register size rather than 64-bit per se From ca2ab5f9e3470e87923c7b950b7b06e5ff21119e Mon Sep 17 00:00:00 2001 From: =?UTF-8

[clang] [clang-repl] Fix unboxing of va_args Value on 32-bit ARM (#94994) (PR #96900)

2024-06-28 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail closed https://github.com/llvm/llvm-project/pull/96900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix unboxing of va_args Value on 32-bit ARM (#94994) (PR #96900)

2024-06-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Superseded by https://github.com/llvm/llvm-project/pull/97071 https://github.com/llvm/llvm-project/pull/96900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-29 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/97071 From ca2ab5f9e3470e87923c7b950b7b06e5ff21119e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Fri, 28 Jun 2024 16:43:42 +0200 Subject: [PATCH 1/2] [clang-repl] Fix RuntimeInterfaceBu

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-29 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > Any chance of adding a test case? We could add a lot more tests in general, but I don't think this specific detail requires a dedicated one. It's a fix for an existing bug, so we have coverage already. https://github.com/llvm/llvm-project/pull/97071 ___

<    1   2