Skip to content

Conversation

@serenity4
Copy link
Contributor

@serenity4 serenity4 commented Jun 2, 2025

Implements the remaining feature for #37, mapping equations/variables to callees that use them. Requires JuliaComputing/StateSelection.jl#3.

Before merge:

  • Remove StateSelection PR from project & manifest once merged.

Here is what it looks like:
screenshot

I also added a matched = true parameter to @code_structure so we can easily get to this visualization.

@serenity4
Copy link
Contributor Author

This is good for review along with the StateSelection PR, we'll see if the crash mentioned in d93598b can be reproduced in CI.

@serenity4
Copy link
Contributor Author

CI seems fine. @Keno can you reproduce the crash by running the test suite with this PR?

@Keno
Copy link
Member

Keno commented Jun 4, 2025

I do see this crash locally:

  %16 = alloca [10 x i64], align 8
  %155 = insertelement <4 x ptr> poison, ptr %16, i32 0
Unexpected instruction

[118965] signal 6 (-6): Aborted
in expression starting at /home/keno/.julia/dev/DAECompiler2/test/reflection.jl:28
pthread_kill at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
RecursivelyVisit<llvm::IntrinsicInst, LateLowerGCFrame::PlaceRootsAndUpdateCalls(llvm::ArrayRef<int>, int, State&, std::map<llvm::Value*, std::pair<int, int> >)::<lambda(llvm::AllocaInst*&)>::<lambda(llvm::Use&)> > at /home/keno/julia-clean/src/llvm-late-gc-lowering.cpp:803
operator() at /home/keno/julia-clean/src/llvm-late-gc-lowering.cpp:2560 [inlined]
PlaceRootsAndUpdateCalls at /home/keno/julia-clean/src/llvm-late-gc-lowering.cpp:2576
runOnFunction at /home/keno/julia-clean/src/llvm-late-gc-lowering.cpp:2638
run at /home/keno/julia-clean/src/llvm-late-gc-lowering.cpp:2675
run at /home/keno/julia-clean/usr/include/llvm/IR/PassManagerInternal.h:91
_ZN4llvm11PassManagerINS_8FunctionENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_ at /home/keno/julia-clean/usr/bin/../lib/libLLVM.so.20.1jl (unknown line)
run at /home/keno/julia-clean/usr/include/llvm/IR/PassManagerInternal.h:91
_ZN4llvm27ModuleToFunctionPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE at /home/keno/julia-clean/usr/bin/../lib/libLLVM.so.20.1jl (unknown line)
run at /home/keno/julia-clean/usr/include/llvm/IR/PassManagerInternal.h:91
_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_ at /home/keno/julia-clean/usr/bin/../lib/libLLVM.so.20.1jl (unknown line)
run at /home/keno/julia-clean/src/pipeline.cpp:791
operator() at /home/keno/julia-clean/src/jitlayers.cpp:1475

Maybe you can work with @gbaraldi to see if you can figure out what the issue is. Otherwise I can take a look.

@Keno
Copy link
Member

Keno commented Jun 4, 2025

Since this is fixed on master and we didn't see it on CI anyway, I'll go ahead and merge this.

@Keno Keno merged commit a06aeb2 into JuliaComputing:main Jun 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants