Page MenuHomePhabricator

Hahnfeld (Jonas Hahnfeld)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 2 2015, 4:52 AM (417 w, 16 h)

Recent Activity

Thu, Mar 23

Hahnfeld added a comment to D146497: libclang: Pass Clang install directory to driver via argv[0]..

The issue doesn't reproduce for me locally on my Windows machine, so it may be something specific to the VE setup.

Thu, Mar 23, 5:22 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D146497: libclang: Pass Clang install directory to driver via argv[0]..

FYI this commit breaks clang/test/Index/index-file.cu for me:

warning: CUDA version 11.8 is only partially supported [-Wunknown-cuda-version]
warning: CUDA version 11.8 is only partially supported [-Wunknown-cuda-version]
/home/jhahnfel/LLVM/src/clang/test/Index/index-file.cu:8:20: error: CHECK-HOST-NOT: excluded string found in input
// CHECK-HOST-NOT: macro definition=__CUDA_ARCH__
                   ^
<stdin>:6218:48: note: found here
// CHECK: __clang_cuda_runtime_wrapper.h:70:9: macro definition=__CUDA_ARCH__ Extent=[70:9 - 70:27]
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It could be related to the warning about my locally installed CUDA version, but __CUDA_ARCH__ should really not be defined when compiling for the host. If you have any idea what's going on here, please let me know - I'm a bit puzzled right now...

Thu, Mar 23, 1:14 AM · Restricted Project, Restricted Project

Fri, Mar 3

Hahnfeld added a comment to D142386: ExecutionEngine: support composite types handling..

As far as I can tell, this is for the MCJIT infrastructure which is deprecated (?) or at least not actively worked on anymore. You should try ORC, which does actual just-in-time compilation.

Fri, Mar 3, 4:17 AM · Restricted Project, Restricted Project

Feb 6 2023

Hahnfeld reopened D142606: Lazyly initialize uncommon toolchain detector.

This broke clang/test/Driver/rocm-detect.hip on a number of platforms (including the pre-merge checks on this PR), I've reverted for now in b5ee4f755fcff56243f6ff0cea9e7a722259304a.

Feb 6 2023, 6:42 AM · Restricted Project, Restricted Project
Hahnfeld added a reverting change for rG6fa2abf90886: Lazyly initialize uncommon toolchain detector: rGb5ee4f755fcf: Revert "Lazyly initialize uncommon toolchain detector".
Feb 6 2023, 6:42 AM · Restricted Project, Restricted Project
Hahnfeld committed rGb5ee4f755fcf: Revert "Lazyly initialize uncommon toolchain detector" (authored by Hahnfeld).
Revert "Lazyly initialize uncommon toolchain detector"
Feb 6 2023, 6:42 AM · Restricted Project, Restricted Project
Hahnfeld added a reverting change for D142606: Lazyly initialize uncommon toolchain detector: rGb5ee4f755fcf: Revert "Lazyly initialize uncommon toolchain detector".
Feb 6 2023, 6:42 AM · Restricted Project, Restricted Project

Feb 5 2023

Hahnfeld committed rG50ca8b3e8726: [ORC] Drop Comdat when discarding IR symbol (authored by Hahnfeld).
[ORC] Drop Comdat when discarding IR symbol
Feb 5 2023, 2:07 AM · Restricted Project, Restricted Project
Hahnfeld closed D142443: [ORC] Drop Comdat when discarding IR symbol.
Feb 5 2023, 2:07 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D143039: [AArch64] Unconditionally use DW_EH_PE_indirect|DW_EH_PE_pcrel personality/lsda/ttype encodings.

For RuntimeDyld, we would have maybe needed the equivalent of 72ea1a721e005f29c6fea4a684807a68abd93c39 also for AArch64?

Feb 5 2023, 2:03 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

I received three complaints from AArch64 bots now failing Clang Interpreter tests, for example: https://lab.llvm.org/buildbot/#/builders/197/builds/3920 I don't quite understand how this can happen and currently have no easy way to verify, so reverting a second time...

That looks like the issue that's being discussed in https://reviews.llvm.org/D143039. If so then it's unrelated to your patch.

Feb 5 2023, 1:58 AM · Restricted Project, Restricted Project

Feb 4 2023

Hahnfeld reopened D142443: [ORC] Drop Comdat when discarding IR symbol.

I received three complaints from AArch64 bots now failing Clang Interpreter tests, for example: https://lab.llvm.org/buildbot/#/builders/197/builds/3920 I don't quite understand how this can happen and currently have no easy way to verify, so reverting a second time...

Feb 4 2023, 12:28 PM · Restricted Project, Restricted Project
Hahnfeld added a reverting change for rG87d783820226: [ORC] Drop Comdat when discarding IR symbol: rG76d94d3eedf0: Revert "[ORC] Drop Comdat when discarding IR symbol".
Feb 4 2023, 12:27 PM · Restricted Project, Restricted Project
Hahnfeld committed rG76d94d3eedf0: Revert "[ORC] Drop Comdat when discarding IR symbol" (authored by Hahnfeld).
Revert "[ORC] Drop Comdat when discarding IR symbol"
Feb 4 2023, 12:27 PM · Restricted Project, Restricted Project
Hahnfeld added a reverting change for D142443: [ORC] Drop Comdat when discarding IR symbol: rG76d94d3eedf0: Revert "[ORC] Drop Comdat when discarding IR symbol".
Feb 4 2023, 12:27 PM · Restricted Project, Restricted Project

Feb 3 2023

Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

@spatel thanks for testing, now pushed as rGde7e9ebe46d1acc0ee12609ada49aa21064b7a97

Feb 3 2023, 7:35 AM · Restricted Project, Restricted Project
Hahnfeld committed rGde7e9ebe46d1: [Orc] XFAIL test with Comdats on macOS (authored by Hahnfeld).
[Orc] XFAIL test with Comdats on macOS
Feb 3 2023, 7:34 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

The test seems to be crashing on macOS with or without the code change:
"LLVM ERROR: MachO doesn't support COMDATs, 'f' cannot be lowered."

Hm right... If you are on macOS, could you test if XFAIL: target={{.*}}-darwin{{.*}} correctly excludes the test?

Still crashing after I add that line - let me know if I'm missing anything:

Feb 3 2023, 7:09 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

The test seems to be crashing on macOS with or without the code change:
"LLVM ERROR: MachO doesn't support COMDATs, 'f' cannot be lowered."

Feb 3 2023, 6:55 AM · Restricted Project, Restricted Project
Hahnfeld committed rG87d783820226: [ORC] Drop Comdat when discarding IR symbol (authored by Hahnfeld).
[ORC] Drop Comdat when discarding IR symbol
Feb 3 2023, 2:17 AM · Restricted Project, Restricted Project
Hahnfeld added a reverting change for rG76b3f0b4d5a0: [ORC] Drop Comdat when discarding IR symbol: rGe5dd58e3a6de: Revert "[ORC] Drop Comdat when discarding IR symbol".
Feb 3 2023, 1:05 AM · Restricted Project, Restricted Project
Hahnfeld committed rGe5dd58e3a6de: Revert "[ORC] Drop Comdat when discarding IR symbol" (authored by Hahnfeld).
Revert "[ORC] Drop Comdat when discarding IR symbol"
Feb 3 2023, 1:05 AM · Restricted Project, Restricted Project
Hahnfeld added a reverting change for D142443: [ORC] Drop Comdat when discarding IR symbol: rGe5dd58e3a6de: Revert "[ORC] Drop Comdat when discarding IR symbol".
Feb 3 2023, 1:05 AM · Restricted Project, Restricted Project

Feb 2 2023

Hahnfeld committed rG76b3f0b4d5a0: [ORC] Drop Comdat when discarding IR symbol (authored by Hahnfeld).
[ORC] Drop Comdat when discarding IR symbol
Feb 2 2023, 11:42 PM · Restricted Project, Restricted Project
Hahnfeld closed D142443: [ORC] Drop Comdat when discarding IR symbol.
Feb 2 2023, 11:42 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

LGTM for me. That validation error has been a problem on Windows too.

Feb 2 2023, 1:45 AM · Restricted Project, Restricted Project

Feb 1 2023

Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

Testcases should trigger a call to discard function since weak symbol gets overridden, right?

Feb 1 2023, 11:35 PM · Restricted Project, Restricted Project
Hahnfeld committed rGe302c04cfa10: XFAIL new test available_externally_alias.ll on NVPTX (authored by Hahnfeld).
XFAIL new test available_externally_alias.ll on NVPTX
Feb 1 2023, 1:15 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

ping @lhames

Feb 1 2023, 12:42 AM · Restricted Project, Restricted Project
Hahnfeld committed rGf1c4f927f7c1: [CodeGen] Filter out available_externally aliases (authored by Hahnfeld).
[CodeGen] Filter out available_externally aliases
Feb 1 2023, 12:41 AM · Restricted Project, Restricted Project
Hahnfeld closed D142352: [CodeGen] Filter out available_externally aliases.
Feb 1 2023, 12:41 AM · Restricted Project, Restricted Project

Jan 26 2023

Hahnfeld added a comment to D142188: [ORC] Fix in-process lookup of symbols without GlobalPrefix.

Ok, understood. I think this should already be taken care of by the last update from Tuesday.

Jan 26 2023, 7:45 AM · Restricted Project, Restricted Project, Restricted Project

Jan 24 2023

Hahnfeld added a comment to D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.

Yes, I meant the pp-trace docs. Why would "we didn't find the included file" not be a traceable event?

Jan 24 2023, 9:51 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142443: [ORC] Drop Comdat when discarding IR symbol.

What happens when we actually have duplicate comdat any definitions? IIRC I've seen that in msvcrt.lib.

Jan 24 2023, 9:28 AM · Restricted Project, Restricted Project
Hahnfeld accepted D142378: [OpenMP][Archer] Use dlsym rather than weak symbols for TSan annotations.

Thanks!

Jan 24 2023, 6:10 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142188: [ORC] Fix in-process lookup of symbols without GlobalPrefix.

This change won't work for other platforms at the moment. E.g. On Darwin where the global prefix is _ an ORC lookup (which uses mangled names) for [ "foo", "_foo" ] should return [ nullptr, <addr of _foo> ], but with this patch it will return [ <addr of foo>, <addr of foo> ].

Jan 24 2023, 2:39 AM · Restricted Project, Restricted Project, Restricted Project
Hahnfeld updated the diff for D142188: [ORC] Fix in-process lookup of symbols without GlobalPrefix.

Only allow leading question mark without GlobalPrefix according to DataLayout.

Jan 24 2023, 2:37 AM · Restricted Project, Restricted Project, Restricted Project
Hahnfeld requested review of D142443: [ORC] Drop Comdat when discarding IR symbol.
Jan 24 2023, 1:57 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.

I checked a second time and couldn't find other API docs. I've now pushed this change for now (also to get it included in release/16.x), but please let me know for any follow-ups. Thanks!

Jan 24 2023, 12:57 AM · Restricted Project, Restricted Project
Hahnfeld accepted D142378: [OpenMP][Archer] Use dlsym rather than weak symbols for TSan annotations.
Jan 24 2023, 12:55 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D142378: [OpenMP][Archer] Use dlsym rather than weak symbols for TSan annotations.

LG, assuming it fixes the problem and is not too much of a performance blow (the weak symbols will be resolved by the runtime loader, whereas we now do indirect function calls through pointers).

Jan 24 2023, 12:55 AM · Restricted Project, Restricted Project
Hahnfeld committed rG01eb01c7fd7a: [clang][Lex] Add back PPCallbacks::FileNotFound (authored by Hahnfeld).
[clang][Lex] Add back PPCallbacks::FileNotFound
Jan 24 2023, 12:53 AM · Restricted Project, Restricted Project
Hahnfeld closed D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.
Jan 24 2023, 12:52 AM · Restricted Project, Restricted Project

Jan 23 2023

Hahnfeld added a comment to D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.

Also I think we should mention this API in our docs, right where the removed original used to be.

Jan 23 2023, 3:25 PM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.

Update comment.

Jan 23 2023, 3:21 PM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D142352: [CodeGen] Filter out available_externally aliases.

Fix type of function alias.

Jan 23 2023, 5:46 AM · Restricted Project, Restricted Project
Hahnfeld requested review of D142352: [CodeGen] Filter out available_externally aliases.
Jan 23 2023, 5:41 AM · Restricted Project, Restricted Project

Jan 21 2023

Hahnfeld updated the diff for D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.

Add unit test.

Jan 21 2023, 1:02 PM · Restricted Project, Restricted Project

Jan 20 2023

Hahnfeld added a comment to D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.

I just checked and this "simplified" version of the callback would give us enough information to implement all we need in ROOT (plus some, the bool return value is nicer than temporarily playing with SuppressIncludeNotFoundError). For an upstream test, I could implement a unit test in clang/unittests/Lex/PPCallbacksTest.cpp or a "toy" tooling where #include <file.h?> is ignored if file.h doesn't exist? What do you think (assuming the general idea of adding this callback is fine)?

Jan 20 2023, 4:54 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D119708: [clang][lex] Remove `PPCallbacks::FileNotFound()`.

If the plan is to eventually upstream that part of Cling, I'm fine with re-adding a safe version of this API.

Jan 20 2023, 2:23 AM · Restricted Project, Restricted Project, Restricted Project
Hahnfeld requested review of D142196: [clang][Lex] Add back PPCallbacks::FileNotFound.
Jan 20 2023, 2:19 AM · Restricted Project, Restricted Project
Hahnfeld requested review of D142188: [ORC] Fix in-process lookup of symbols without GlobalPrefix.
Jan 20 2023, 1:05 AM · Restricted Project, Restricted Project, Restricted Project

Jan 19 2023

Hahnfeld added a comment to D138264: [COFF] Improve JIT support of weak symbols.

ping @lhames

Jan 19 2023, 11:50 PM · Restricted Project, Restricted Project

Jan 17 2023

Hahnfeld added a comment to D119708: [clang][lex] Remove `PPCallbacks::FileNotFound()`.

Hello, sorry for the late heads-up, but this functionality is used by ROOT: https://github.com/root-project/root/blob/f58cccf5ce7fd67894c7fd9e9e74d3f37bc1acba/core/metacling/src/TClingCallbacks.cxx#L282 Any chance of bringing this back?

Hi. Your downstream callback never fills in RecoveryPath and always returns false, meaning it will never reach the unsafe block of code I had issue with: HeaderInfo.AddSearchPath(DL, isAngled).

Jan 17 2023, 11:29 PM · Restricted Project, Restricted Project, Restricted Project
Herald added a project to D119708: [clang][lex] Remove `PPCallbacks::FileNotFound()`: Restricted Project.

Hello, sorry for the late heads-up, but this functionality is used by ROOT: https://github.com/root-project/root/blob/f58cccf5ce7fd67894c7fd9e9e74d3f37bc1acba/core/metacling/src/TClingCallbacks.cxx#L282 Any chance of bringing this back?

Jan 17 2023, 8:26 AM · Restricted Project, Restricted Project, Restricted Project

Jan 14 2023

Hahnfeld accepted D141380: [clang-repl] XFAIL riscv targets in simple-exception test case.

Yes, this is correct: The JITLink backend for RISC-V doesn't (yet) register the eh frames into libunwind, so throwing and catching exceptions through JITted code doesn't work (yet). I know in principle how to make this happen and it's on my list, but I couldn't give it priority before a talk on Thursday. Sorry for not realizing we have a test for this in clang-repl - does this mean we have bots running this natively on RISC-V?

Jan 14 2023, 1:35 AM · Restricted Project, Restricted Project

Jan 4 2023

Hahnfeld committed rGc8d43dca2332: [JITLink][RISCV] Add R_RISCV_RVC_BRANCH and R_RISCV_RVC_JUMP (authored by Hahnfeld).
[JITLink][RISCV] Add R_RISCV_RVC_BRANCH and R_RISCV_RVC_JUMP
Jan 4 2023, 4:52 AM · Restricted Project, Restricted Project
Hahnfeld closed D140827: [JITLink][RISCV] Add R_RISCV_RVC_BRANCH and R_RISCV_RVC_JUMP.
Jan 4 2023, 4:52 AM · Restricted Project, Restricted Project

Jan 3 2023

Hahnfeld committed rG850adc1ddc41: [JITLink][RISCV] Homogenize immediate handling (authored by Hahnfeld).
[JITLink][RISCV] Homogenize immediate handling
Jan 3 2023, 8:20 AM · Restricted Project, Restricted Project
Hahnfeld committed rGe7d432fd67c8: [JITLink][RISCV] Improve R_RISCV_JAL (authored by Hahnfeld).
[JITLink][RISCV] Improve R_RISCV_JAL
Jan 3 2023, 8:20 AM · Restricted Project, Restricted Project
Hahnfeld closed D140820: [JITLink][RISCV] Homogenize immediate handling.
Jan 3 2023, 8:19 AM · Restricted Project, Restricted Project

Jan 2 2023

Hahnfeld committed rG6f539de7351c: [JITLink][RISCV] Order EdgeKind_riscv the same way as relocations (authored by Hahnfeld).
[JITLink][RISCV] Order EdgeKind_riscv the same way as relocations
Jan 2 2023, 5:50 AM · Restricted Project, Restricted Project
Hahnfeld closed D140802: [JITLink][RISCV] Order EdgeKind_riscv the same way as relocations.
Jan 2 2023, 5:50 AM · Restricted Project, Restricted Project
Hahnfeld added inline comments to D140820: [JITLink][RISCV] Homogenize immediate handling.
Jan 2 2023, 1:26 AM · Restricted Project, Restricted Project

Jan 1 2023

Hahnfeld added inline comments to D140827: [JITLink][RISCV] Add R_RISCV_RVC_BRANCH and R_RISCV_RVC_JUMP.
Jan 1 2023, 2:14 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D140820: [JITLink][RISCV] Homogenize immediate handling.

I have to confess that the previous way of specifying the arguments to extractBits (before rG95b74d4db0686a8d55fdae1af4e985ea52b2c572) was slightly more convenient because we could just copy from the spec. I personally find this new variable naming more logical, but please let me know what you think. Ideally, we could either share this immediate handling with LLD or directly extract it from the instruction encoding that LLVM knows about anyway.

Jan 1 2023, 2:13 PM · Restricted Project, Restricted Project
Hahnfeld requested review of D140827: [JITLink][RISCV] Add R_RISCV_RVC_BRANCH and R_RISCV_RVC_JUMP.
Jan 1 2023, 2:09 PM · Restricted Project, Restricted Project
Hahnfeld requested review of D140820: [JITLink][RISCV] Homogenize immediate handling.
Jan 1 2023, 10:12 AM · Restricted Project, Restricted Project

Dec 31 2022

Hahnfeld requested review of D140802: [JITLink][RISCV] Order EdgeKind_riscv the same way as relocations.
Dec 31 2022, 4:43 AM · Restricted Project, Restricted Project

Dec 29 2022

Hahnfeld added inline comments to D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs.
Dec 29 2022, 12:49 AM · Restricted Project, Restricted Project
Hahnfeld committed rGf3c9342a3d56: Fix build of nvptx-arch with CLANG_LINK_CLANG_DYLIB (authored by Hahnfeld).
Fix build of nvptx-arch with CLANG_LINK_CLANG_DYLIB
Dec 29 2022, 12:48 AM · Restricted Project, Restricted Project

Dec 27 2022

Hahnfeld added a comment to D135462: [SelectionDAG] Do not second-guess alignment for alloca.

Hi @asavonic, after reading through the comments here and peeking into D44186, I think your analysis is correct: libomptarget assumes that it can pad the start address of every member to 8 bytes and stay within the requested size, which isn't true anymore. I'm not sure if it would be possible to "fix up" this mistake by increasing the padding requirements in the IR generated by the Clang frontend (do we control all allocas and can they also be passed in by other parts of code?). I guess the better approach would indeed be to correct the implementation in the runtime library. That said, I haven't looked into the OpenMP offloading code for quite some time, more active members include @jdoerfert @jhuber6 @ronlieb (all of which have been pinged already...)

Dec 27 2022, 6:32 AM · Restricted Project, Restricted Project

Dec 8 2022

Hahnfeld committed rGc9cb4fc761cd: [DebugInfo] Store optional DIFile::Source as pointer (authored by Hahnfeld).
[DebugInfo] Store optional DIFile::Source as pointer
Dec 8 2022, 12:59 AM · Restricted Project, Restricted Project
Hahnfeld closed D138658: [DebugInfo] Store optional DIFile::Source as pointer.
Dec 8 2022, 12:59 AM · Restricted Project, Restricted Project

Dec 5 2022

Hahnfeld added a comment to D138658: [DebugInfo] Store optional DIFile::Source as pointer.

FWIW if we keep the std::optional and just deal with the possibility of a nullptr inside, all we seem to need is

patch
diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h
index c85c21ddd9f1..2a757fb74674 100644
--- a/llvm/include/llvm/IR/DebugInfoMetadata.h
+++ b/llvm/include/llvm/IR/DebugInfoMetadata.h
@@ -654,8 +654,9 @@ public:
     return StringRefChecksum;
   }
   std::optional<StringRef> getSource() const {
-    return Source ? std::optional<StringRef>((*Source)->getString())
-                  : std::nullopt;
+    if (!Source)
+      return std::nullopt;
+    return std::optional<StringRef>(*Source ? (*Source)->getString() : "");
   }
Dec 5 2022, 2:26 AM · Restricted Project, Restricted Project
Hahnfeld updated the diff for D138658: [DebugInfo] Store optional DIFile::Source as pointer.

I updated the patch to use MDString::get directly and represent the empty file by a non-nullptr. I'm not sure yet if there are any bad implications by not having a "canonical" MDString...

Dec 5 2022, 1:59 AM · Restricted Project, Restricted Project

Dec 4 2022

Hahnfeld removed a reviewer for D139278: [AArch64] Use string comparison for ArchInfo equality: Hahnfeld.

I can confirm it solves the failing tests I'm seeing with LLVM_LINK_LLVM_DYLIB, but I'm not versed in this part of the code or the recent changes.

Dec 4 2022, 2:33 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D138792: [AArch64] Improve TargetParser API.

What about @bkramer's suggestion to move the definitions out of the header? Based on what you write (comparison by address), this should also solve the issue.

Dec 4 2022, 12:47 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
Hahnfeld added a comment to D138792: [AArch64] Improve TargetParser API.

Hi, I bisected this change to lead to a couple of test failures when building with LLVM_LINK_LLVM_DYLIB. In the past, this had to do with global variable initialization order, but nothing immediately jumps to my eye in this patch. Is AARCH64_ARCH used to define global variables?

Did you hit these?

Failed Tests (4):
  Clang :: Driver/aarch64-target-as-march.s
  Clang :: Misc/target-invalid-cpu-note.c
  Clang :: Preprocessor/aarch64-target-features.c
  Clang :: Sema/attr-target.c

I've just bisected them to this commit, so I guess yes.

Dec 4 2022, 12:36 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
Hahnfeld added inline comments to D138792: [AArch64] Improve TargetParser API.
Dec 4 2022, 3:20 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Dec 2 2022

Hahnfeld added a comment to D138792: [AArch64] Improve TargetParser API.

Hi, I bisected this change to lead to a couple of test failures when building with LLVM_LINK_LLVM_DYLIB. In the past, this had to do with global variable initialization order, but nothing immediately jumps to my eye in this patch. Is AARCH64_ARCH used to define global variables?

Dec 2 2022, 9:21 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
Hahnfeld added a comment to D138658: [DebugInfo] Store optional DIFile::Source as pointer.

I think we can't use getCanonicalMDString here, because it collapses the empty case into the null case, when they were intended to be differentiated. So this'll need to be manually expanded to the MDString::get(Context, S) without the empty->nullptr part. Then empty -> empty MDString, None -> null, non-empty -> non-empty MDString.

Dec 2 2022, 12:03 AM · Restricted Project, Restricted Project

Dec 1 2022

Hahnfeld updated the diff for D138658: [DebugInfo] Store optional DIFile::Source as pointer.

Thanks for the discussion. I updated the patch to remove the Optional wrapping a MDString *, PTAL.

Dec 1 2022, 5:36 AM · Restricted Project, Restricted Project

Nov 29 2022

Hahnfeld added a comment to D138658: [DebugInfo] Store optional DIFile::Source as pointer.

That seems a Cling-novelty though, right? A zero-length file isn't valid in C++ (you have to have a newline at the end) and I guess if you give clang a truly zero-length file it doesn't generate DWARF at least, or doesn't do any code generation at all? So maybe Cling should do something similar to whatever clang does with a zero-length file? (or does clang hit the same problem if you give it a zero-length file?)

Nov 29 2022, 12:30 PM · Restricted Project, Restricted Project

Nov 26 2022

Hahnfeld added a comment to D138658: [DebugInfo] Store optional DIFile::Source as pointer.

Where did this issue come up in practice? Change seems reasonable, but wouldn't mind having more context.

Please see https://reviews.llvm.org/D137152 for context. I think what's happening is that we (the Cling interpreter in ROOT) create an empty source file while injecting some code during startup. It may be possible to fix that, but LLVM shouldn't crash from it.

hmm, more context might be nice - like where's the Cling code that's doing something different than the Clang code when it's creating DIFiles?

Nov 26 2022, 2:19 PM · Restricted Project, Restricted Project
Hahnfeld added a comment to D138658: [DebugInfo] Store optional DIFile::Source as pointer.

Where did this issue come up in practice? Change seems reasonable, but wouldn't mind having more context.

Nov 26 2022, 1:56 PM · Restricted Project, Restricted Project

Nov 24 2022

Hahnfeld added a comment to D137152: Fix crash when using embedded DWARF-5 debugging info.

As far as I could tell with some testing, this crash happens if you pass in an empty string because then getCanonicalMDString() returns a nullptr. I think it would be cleaner to normalize this case to None: https://reviews.llvm.org/D138658

Nov 24 2022, 4:47 AM · Restricted Project, Restricted Project
Hahnfeld requested review of D138658: [DebugInfo] Store optional DIFile::Source as pointer.
Nov 24 2022, 4:46 AM · Restricted Project, Restricted Project

Nov 15 2022

Hahnfeld accepted D138030: [JITLink][RISCV] Add R_RISCV_LO12_S relocation support.

Btw we should probably order the relocations according to their enum values. But that should be a follow-up patch, I can try to take a look next weekend. I also have the compressed relocations implemented, but I need to write tests for them...

Nov 15 2022, 11:18 AM · Restricted Project, Restricted Project

Nov 14 2022

Hahnfeld added a comment to D137787: [CodeGen] Relax assertion on generating destructor call.
  • Is the failure also not reproducible with clang9 (on which is based cling)?
  • Is the failure also not reproducible with clang9 built on top of the downstream patches?
Nov 14 2022, 8:09 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D137787: [CodeGen] Relax assertion on generating destructor call.

Yes, I fully agree that having a test is desirable, I just didn't manage so far. Maybe it takes somebody with deep AST knowledge to explain under what circumstances DtorDecl->getParent() is *not* the canonical Decl. Maybe this could help crafting a test case, even outside of modules maybe

Nov 14 2022, 6:05 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D137787: [CodeGen] Relax assertion on generating destructor call.

Sorry, I don't understand well. Could you rewrite the reproducer in the style I wrote? And in what cases it works fine?

Nov 14 2022, 2:39 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D137697: Move the isSelfContained function from clangd to libtooling..

No worries, thanks for fixing so quickly! I just happened to pull in the wrong moment...

Nov 14 2022, 2:25 AM · Restricted Project, Restricted Project, Restricted Project
Hahnfeld abandoned D137927: Adapt unittests for isSelfContainedHeader to API.

Fixed in https://reviews.llvm.org/rG5c4ae8a86a865e622e2c663666c0c139334b5da2

Nov 14 2022, 2:24 AM · Restricted Project, Restricted Project
Hahnfeld added a comment to D137697: Move the isSelfContained function from clangd to libtooling..

@hokein it seems the unit test wasn't updated for the last-minute API change, which breaks check-all for me. I've posted https://reviews.llvm.org/D137927, could you take a look if that change is correct?

Nov 14 2022, 2:07 AM · Restricted Project, Restricted Project, Restricted Project
Hahnfeld requested review of D137927: Adapt unittests for isSelfContainedHeader to API.
Nov 14 2022, 2:06 AM · Restricted Project, Restricted Project

Nov 13 2022

Hahnfeld added a comment to D137787: [CodeGen] Relax assertion on generating destructor call.

Is it the reproducer?

Nov 13 2022, 5:14 AM · Restricted Project, Restricted Project

Nov 11 2022

Hahnfeld added a comment to D137787: [CodeGen] Relax assertion on generating destructor call.

I've trimmed the failing code down to

#include <string>
#include <string_view>
#include <vector>
Nov 11 2022, 7:55 AM · Restricted Project, Restricted Project

Nov 10 2022

Hahnfeld added a comment to D137787: [CodeGen] Relax assertion on generating destructor call.

This fixes the assertion for a downstream case in ROOT/Cling with the involvement of modules. If anyone has ideas how to test this, please let me know...

Nov 10 2022, 7:38 AM · Restricted Project, Restricted Project
Hahnfeld requested review of D137787: [CodeGen] Relax assertion on generating destructor call.
Nov 10 2022, 7:34 AM · Restricted Project, Restricted Project