ClangBuiltLinux / linux

Linux kernel source tree
Other
241 stars 14 forks source link

Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed #1512

Closed nathanchance closed 2 years ago

nathanchance commented 2 years ago

The kernel test robot reported an issue with a proposed change that uses asm goto with outputs.

$ curl -LSs https://lore.kernel.org/all/202111202042.9apiQnBk-lkp@intel.com/2-a.bin | gzip -d > .config

$ make -skj"$(nproc)" olddefconfig vmlinux
ld.lld: /home/nathan/cbl/tc-build/llvm-project/llvm/include/llvm/Support/Casting.h:269: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::BlockAddress, Y = llvm::Value]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'arch/x86/kvm/kvm-intel.o(pmu_intel.o at 2936)'.
1.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@vmx_passthrough_lbr_msrs'
 #0 0x0000000003b9f4f4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x3b9f4f4)
 #1 0x000000000391e12b (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x391e12b)
 #2 0x00007f3f10835870 __restore_rt sigaction.c:0:0
 #3 0x00007f3f10181d22 raise (/usr/lib/libc.so.6+0x3cd22)
 #4 0x00007f3f1016b862 abort (/usr/lib/libc.so.6+0x26862)
 #5 0x00007f3f1016b747 _nl_load_domain.cold loadmsgcat.c:0:0
 #6 0x00007f3f1017a616 (/usr/lib/libc.so.6+0x35616)
 #7 0x0000000002d2b371 llvm::SelectionDAGBuilder::visitInlineAsm(llvm::CallBase const&, llvm::BasicBlock const*) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2d2b371)
 #8 0x0000000002d26a1c llvm::SelectionDAGBuilder::visitCallBr(llvm::CallBrInst const&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2d26a1c)
 #9 0x0000000002c4930d llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2c4930d)
#10 0x0000000002c48c5c llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, true>, bool&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2c48c5c)
#11 0x0000000002c47201 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2c47201)
#12 0x0000000002c43886 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2c43886)
#13 0x0000000003acda62 (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x3acda62)
#14 0x0000000002dec453 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x2dec453)
#15 0x00000000028df899 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x28df899)
#16 0x00000000028df2bd llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x28df2bd)
#17 0x00000000028de897 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x28de897)
#18 0x0000000004646d15 (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x4646d15)
#19 0x0000000004647abe (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x4647abe)
#20 0x000000000464788e llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x464788e)
#21 0x000000000463fb69 (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x463fb69)
#22 0x000000000463f968 (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x463f968)
#23 0x00000000046428ef (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x46428ef)
#24 0x0000000003bca731 (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x3bca731)
#25 0x00007f3f10832c27 __pthread_once_slow pthread_once.c:0:0
#26 0x000000000464265a (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x464265a)
#27 0x0000000004642350 (/usr/local/stow/llvm/2021-11-20_18-15-57-dca681fee93e12d1e06733b607dec9f11d538151/bin/lld+0x4642350)
#28 0x00007f3f1082b259 start_thread pthread_create.c:0:0
#29 0x00007f3f102435e3 clone (/usr/lib/libc.so.6+0xfe5e3)
...

cvise spits out:

$ cat vmx.i
register long current_stack_pointer asm("rsp");
void vmcs_set_bits() {
  asm goto("" : "+r"(current_stack_pointer) : : : do_exception);
do_exception:;
}

$ gcc -O2 -c -o /dev/null vmx.i

$ clang -O2 -c -o /dev/null vmx.i
clang: /home/nathan/cbl/tc-build/llvm-project/llvm/include/llvm/Support/Casting.h:269: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::BlockAddress, Y = llvm::Value]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang -O2 -c -o /dev/null vmx.i
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'vmx.i'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@vmcs_set_bits'
...

This appears to be a regression between LLVM 11 and LLVM 12.

LLVM 11:

$ clang --version
Debian clang version 11.1.0-4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

$ clang -O2 -c -o vmx.o vmx.i

$ readelf -p .comment vmx.o

String dump of section '.comment':
  [     1]  Debian clang version 11.1.0-4

LLVM 12:

$ clang --version
Ubuntu clang version 12.0.1-8build1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

$ clang -O2 -c -o vmx.o vmx.i
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang -O2 -c -o vmx.o vmx.i
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'vmx.i'.
4.      Running pass 'Simple Register Coalescing' on function '@vmcs_set_bits'
...
$ git bisect run ...
...
42a82862b625279028130e62846d057425bca691 is the first bad commit
commit 42a82862b625279028130e62846d057425bca691
Author: Jonas Paulsson <paulsson@linux.vnet.ibm.com>
Date:   Wed Oct 14 08:48:29 2020 +0200

    Reapply "[clang] Improve handling of physical registers in inline
             assembly operands."

    Earlyclobbers are now excepted from this change (original commit: c78da03).

    Review: Ulrich Weigand, Nick Desaulniers

    Differential Revision: https://reviews.llvm.org/D87279

 clang/lib/CodeGen/CGStmt.cpp               | 20 +++++++++++++++++---
 clang/test/CodeGen/aarch64-inline-asm.c    |  6 ++++++
 clang/test/CodeGen/systemz-inline-asm-02.c | 13 +++++++++++++
 clang/test/CodeGen/systemz-inline-asm.c    | 14 ++++++++++++++
 4 files changed, 50 insertions(+), 3 deletions(-)
 create mode 100644 clang/test/CodeGen/systemz-inline-asm-02.c
bisect found first bad commit

$ git bisect log
# bad: [5369517d20dd362a178a1b2d6c398d8898ee4620] Bump the trunk major version to 13
# good: [7ab7b979d29e1e43701cf690f5cf1903740f50e3] Bump the trunk major version to 12
git bisect start 'llvmorg-13-init' 'llvmorg-12-init'
# good: [7579941d8b02af995e152a453da9b9cc0cc205e7] [examples] Fix Kaleidoscope-Ch3, which was broken by ad92f16ccc5.
git bisect good 7579941d8b02af995e152a453da9b9cc0cc205e7
# bad: [f86ec1e1fc4619d4a3974ab849ad362d6f6906eb] [ScalarizeMaskedMemIntrin] NFC: Convert member functions to static
git bisect bad f86ec1e1fc4619d4a3974ab849ad362d6f6906eb
# skip: [885d3f41294665b6d0e523afa94660f929bc1c19] [llvm-mca] Add branch forms of ALU instructions to Cortex-A57 test
git bisect skip 885d3f41294665b6d0e523afa94660f929bc1c19
# skip: [c3a6e7c9b7474f7977b77d38a1de13f27c785e5c] [mlir] Expose operation attributes to Python bindings
git bisect skip c3a6e7c9b7474f7977b77d38a1de13f27c785e5c
# good: [296314516d103f8eeb987a08b509c1381cfeef89] ContentCache: Simplify by always owning the MemoryBuffer
git bisect good 296314516d103f8eeb987a08b509c1381cfeef89
# skip: [fe9403df0686c8df3e78949a9bde420563e1e215] [CostModel][X86] Remove unused check-prefixes
git bisect skip fe9403df0686c8df3e78949a9bde420563e1e215
# skip: [ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9] Reapply "FileManager: Improve the FileEntryRef API and customize its OptionalStorage"
git bisect skip ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9
# skip: [2e8e1bdb89392f8bbe1c3886b1f8da8746659bb2] [lld-macho] Support linking against stub dylibs
git bisect skip 2e8e1bdb89392f8bbe1c3886b1f8da8746659bb2
# skip: [47518d6a0aed7ec3607aeacfa511dedda2cd67cb] [clang-tidy] Improving bugprone-sizeof-expr check.
git bisect skip 47518d6a0aed7ec3607aeacfa511dedda2cd67cb
# skip: [25755a0159a2a69cb84dbd2b7bcbb5db9b482a40] [NFC] Add flag to disable IV widening in indvar instance
git bisect skip 25755a0159a2a69cb84dbd2b7bcbb5db9b482a40
# skip: [2e7e898c8f0b38dc11fbce2553fc715067aaf42f] Fix ds_read2/write2 unaligned offsets
git bisect skip 2e7e898c8f0b38dc11fbce2553fc715067aaf42f
# skip: [a75d6178b809cf11d54af91e8e1254064d58f6eb] [GlobalISel] Add combine for (x | mask) -> x when (x | mask) == x
git bisect skip a75d6178b809cf11d54af91e8e1254064d58f6eb
# skip: [9f151df17800e1668c32e5314a290ae94c8f2dd3] Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC
git bisect skip 9f151df17800e1668c32e5314a290ae94c8f2dd3
# skip: [bd2c0e2c9f1ba1016fc29b284d714c9bcb1ec472] [CostModel][AArch64] Remove unused check-prefix
git bisect skip bd2c0e2c9f1ba1016fc29b284d714c9bcb1ec472
# skip: [3b4f9c16bf24dce2fe3f859a8a04304e76dace8b] [X86] rot16.ll - replace X32 check prefix with X86. NFC.
git bisect skip 3b4f9c16bf24dce2fe3f859a8a04304e76dace8b
# bad: [4b7dafd9046f0ceaadacaafe0ea4a1fb00cf70a5] [mlir]: Clarify docs for external OpTrait::FunctionLike ops
git bisect bad 4b7dafd9046f0ceaadacaafe0ea4a1fb00cf70a5
# skip: [6ec3872845dbb4d98a9e21ba43428ba2c023209b] [mlir] ODS: support TableGen dag objects to specify OpBuilder parameters
git bisect skip 6ec3872845dbb4d98a9e21ba43428ba2c023209b
# good: [e32036b9732fd1ec4794fef48ec79a268aa8cbce] [X86] Add clang release notes for HRESET and minor change for llvm release notes. (NFC)
git bisect good e32036b9732fd1ec4794fef48ec79a268aa8cbce
# skip: [96685faf6dd9b044394af6f7a9d8b10fadb327b5] [llvm] Use early exits and get rid of if-return-else-return pattern; NFC
git bisect skip 96685faf6dd9b044394af6f7a9d8b10fadb327b5
# skip: [9f5ece63ce62253321a8e8cdd3e052b5b5270b8e] [llvm-mca] Add test for cortex-a57 memory instructions
git bisect skip 9f5ece63ce62253321a8e8cdd3e052b5b5270b8e
# skip: [eb60c48744f4edbdc72a44250c84796f3bf5f262] [libc++] Revert "Include <__config_site> from <__config>"
git bisect skip eb60c48744f4edbdc72a44250c84796f3bf5f262
# good: [60913ebcbcb84d1757a4596816637b3861c1cc08] [NFC][LSAN] Use InitializeCommonFlags in LSAN
git bisect good 60913ebcbcb84d1757a4596816637b3861c1cc08
# bad: [1bcec29afb321976cdcaa632ee6a47567dd651a7] Only run when `arm` is registered. NFC.
git bisect bad 1bcec29afb321976cdcaa632ee6a47567dd651a7
# skip: [9a2d2bedb73058f22f4fea30fec14df8281638f5] Add "SkipDead" parameter to TargetInstrInfo::DefinesPredicate
git bisect skip 9a2d2bedb73058f22f4fea30fec14df8281638f5
# bad: [782b8f0d38c954bfe75ab0b7ec3be1eb8d3dbdb2] [InstructionSimplify] Precommit more tests for D89317. NFC.
git bisect bad 782b8f0d38c954bfe75ab0b7ec3be1eb8d3dbdb2
# bad: [42a82862b625279028130e62846d057425bca691] Reapply "[clang] Improve handling of physical registers in inline          assembly operands."
git bisect bad 42a82862b625279028130e62846d057425bca691
# good: [58f6b16c4981f91c49f6878ac342562a7a29d385] [compiler-rt][builtins][RISCV] Always include __mul[sd]i3 builtin definitions
git bisect good 58f6b16c4981f91c49f6878ac342562a7a29d385
# first bad commit: [42a82862b625279028130e62846d057425bca691] Reapply "[clang] Improve handling of physical registers in inline          assembly operands."

I intend to report this upstream but it seems like Bugzilla is being migrated to GitHub this week so I will wait until after that is done.

nickdesaulniers commented 2 years ago

reduced ir (via llvm-reduce):

; llc x.ll
define void @vmcs_set_bits() {
entry:
  %0 = callbr i64 asm "", "={rsp},X,{rsp},~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@vmcs_set_bits, %do_exception), i64 0)
          to label %asm.fallthrough [label %do_exception]

asm.fallthrough:                                  ; preds = %entry
  br label %do_exception

do_exception:                                     ; preds = %asm.fallthrough, %entry
  ret void
}

; Function Attrs: nounwind readonly
declare i64 @llvm.read_register.i64(metadata) #0

; Function Attrs: nounwind
declare void @llvm.write_register.i64(metadata, i64) #1

attributes #0 = { nounwind readonly }
attributes #1 = { nounwind }
nickdesaulniers commented 2 years ago

ah, the change that regressed this was strictly clang, so the emitted IR is irrelevant. The difference in emitted IR between clang-11 and 12 looks like:

--- clang-11.ll        2021-11-30 16:05:16.268337463 -0800
+++ clang-12.ll        2021-11-30 16:05:25.844400186 -0800
@@ -1,6 +1,6 @@
 define dso_local void @vmcs_set_bits() #0 !dbg !8 {
   %1 = call i64 @llvm.read_register.i64(metadata !3), !dbg !12
-  %2 = callbr i64 asm "", "={rsp},X,0,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@vmcs_set_bits, %4), i64 %1) #4
+  %2 = callbr i64 asm "", "={rsp},X,{rsp},~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@vmcs_set_bits, %4), i64 %1) #4
           to label %3 [label %4], !dbg !12, !srcloc !13

 3: 
nickdesaulniers commented 2 years ago

the statement if (Info.allowsRegister() && (GCCReg.empty() || Info.earlyClobber())) in EmitAsmStmt() in clang/lib/CodeGen/CGStmt.cpp is what regressed this.

nickdesaulniers commented 2 years ago

hmmm...I wonder whether it's clang producing one less constraint than necessary, or if SelectionDAGBuilder::visitInlineAsm is choking on valid IR?

nickdesaulniers commented 2 years ago

23c2a5ce33f0f's change to SelectionDAGBuilder::visitInlineAsm regarding NumMatchingOps is suspicious.

clang may no longer generate tied inputs (those numbered constraints) for "+r" output constraints, but I think the terminating condition is perhaps incorrect for when SelectionDAGBuilder::visitInlineAsm should try to parse an argument as a BlockAddress.

I need to spend more time understanding how llvm represents the parameters to an inline asm call; the ordering of the parameters and the constraint string is confusing+unreadable.

nickdesaulniers commented 2 years ago

https://reviews.llvm.org/D114895

I should remove the fixes tag; we may need a kernel side fix for this, too.

nathanchance commented 2 years ago

That patch resolves the crash under the original configuration and does not regress allmodconfig. I can test other configurations as well.

nickdesaulniers commented 2 years ago

I appreciate the testing, as always and thanks for formalizing the report here, too.

I can test other configurations as well.

There's been feedback on the bug; might as well wait for further changes to the patch at this point.

nathanchance commented 2 years ago

I'll test the next revision when it is ready then!

nathanchance commented 2 years ago

The latest version of D114895 still fixes the original report/configuration and I do not see any new regressions across any of the configurations that I test.

nathanchance commented 2 years ago

I tested diff 391716 of D114895 on top of https://github.com/llvm/llvm-project/commit/2f16b87b4b1d3fee07aff71a9bf79c3a8d514e7a against Peter's x86/wip.extable branch @ 2e09d82a746a288b97c268537d2af8917a346b4c, where I saw the original error fixed and no new errors.

Build results

``` i386 defconfig successful in 0:03:30 i386 defconfig qemu boot successful i386 defconfig + CONFIG_LTO_CLANG_THIN=y successful in 0:03:52 i386 defconfig + CONFIG_LTO_CLANG_THIN=y qemu boot successful i386 allmodconfig successful in 0:28:46 i386 allnoconfig successful in 0:00:29 i386 tinyconfig successful in 0:00:26 i386 debian config + CONFIG_SYSTEM_TRUSTED_KEYS=n + CONFIG_NETFILTER_SYNPROXY=n (https://github.com/ClangBuiltLinux/linux/issues/1442) successful in 0:16:44 i686 fedora config + CONFIG_BPF_PRELOAD=n (https://github.com/ClangBuiltLinux/linux/issues/1433) + CONFIG_NETFILTER_SYNPROXY=n (https://github.com/ClangBuiltLinux/linux/issues/1442) successful in 0:19:11 i386 opensuse config successful in 0:01:20 x86_64 defconfig successful in 0:03:38 x86_64 qemu boot successful x86_64 defconfig + CONFIG_LTO_CLANG_THIN=y successful in 0:04:02 x86_64 defconfig + CONFIG_LTO_CLANG_THIN=y qemu boot successful x86_64 allmodconfig + CONFIG_WERROR=n successful in 0:35:32 x86_64 allmodconfig at -O3 + CONFIG_WERROR=n successful in 0:35:15 x86_64 allmodconfig + CONFIG_GCOV_KERNEL=n + CONFIG_KASAN=n + CONFIG_WERROR=n + CONFIG_LTO_CLANG_THIN=y successful in 0:32:44 x86_64 alpine config successful in 0:15:29 x86_64 alpine config qemu boot successful x86_64 archlinux config + CONFIG_BPF_PRELOAD=n (https://github.com/ClangBuiltLinux/linux/issues/1433) successful in 0:24:18 x86_64 archlinux config + CONFIG_BPF_PRELOAD=n (https://github.com/ClangBuiltLinux/linux/issues/1433) qemu boot successful x86_64 debian config successful in 0:19:37 x86_64 debian config qemu boot successful x86_64 fedora config + CONFIG_BPF_PRELOAD=n (https://github.com/ClangBuiltLinux/linux/issues/1433) successful in 0:22:14 x86_64 fedora config + CONFIG_BPF_PRELOAD=n (https://github.com/ClangBuiltLinux/linux/issues/1433) qemu boot successful x86_64 opensuse config successful in 0:21:30 x86_64 opensuse config qemu boot successful ```

nickdesaulniers commented 2 years ago

Link might die but: x86/vmx: Provide asm-goto-output vmread

nickdesaulniers commented 2 years ago

I've split the patch up into a series:

  1. https://reviews.llvm.org/D115410
  2. https://reviews.llvm.org/D115311
  3. https://reviews.llvm.org/D115409
  4. https://reviews.llvm.org/D115471

(There's still some discussion ongoing in https://reviews.llvm.org/D114895, but I'm likely to abandon that approach)

nathanchance commented 2 years ago

It looks like Peter has a version of the patch that does not break with current clang versions so the kernel side will be taken care of when the LLVM fixes land: https://lore.kernel.org/r/YbcbbGW2GcMx6KpD@hirez.programming.kicks-ass.net/

nickdesaulniers commented 2 years ago

Been discussing this a lot with @jyknight . Based on https://reviews.llvm.org/D115409#3190589, I think I'm going to go with:

  1. https://reviews.llvm.org/D115688
  2. https://reviews.llvm.org/D115410
  3. https://reviews.llvm.org/D115311
  4. https://reviews.llvm.org/D115471