wsmoses / tapir-llvm Goto Github PK
View Code? Open in Web Editor NEWTapir extension to LLVM for optimizing Parallel Programs
License: Other
Tapir extension to LLVM for optimizing Parallel Programs
License: Other
Reproduction step: make
Machines: both Athena and Azure instance
Output:
Code: foo.tar.gz
This is caused by replacing the for
loop in dot_product
with cilk_for
.
clang -std=gnu99 -Wall -O3 -ftapir -g main.c -ldl -lcilkrts -o main
jiahaoli@biohazard-cafe:~/Academic/172/recitation5/matrix$ make
clang -std=gnu99 -Wall -O3 -ftapir -g main.c -ldl -lcilkrts -o main
clang: /home/ubuntu/Parallel-IR/lib/Transforms/Utils/SSAUpdater.cpp:535: void llvm::LoadAndStorePromoter::run(const llvm::SmallVectorImpl<llvm::Instruction*>&) const: Assertion `NewVal && "not a replaced load?"' failed.
#0 0x00000000031e90e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000031e94a9 PrintStackTraceSignalHandler(void*) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:470:0
#2 0x00000000031e7814 llvm::sys::RunSignalHandlers() /home/ubuntu/Parallel-IR/lib/Support/Signals.cpp:44:0
#3 0x00000000031e8a78 SignalHandler(int) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:256:0
#4 0x00002b52c0b96330 __restore_rt (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00002b52c1a15c37 gsignal (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x36c37)
#6 0x00002b52c1a19028 abort (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x3a028)
#7 0x00002b52c1a0ebf6 (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x2fbf6)
#8 0x00002b52c1a0eca2 (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x00000000032b05ea llvm::LoadAndStorePromoter::run(llvm::SmallVectorImpl<llvm::Instruction*> const&) const /home/ubuntu/Parallel-IR/lib/Transforms/Utils/SSAUpdater.cpp:540:0
#10 0x0000000003037561 llvm::promoteLoopAccessesToScalars(llvm::AliasSet&, llvm::SmallVectorImpl<llvm::BasicBlock*>&, llvm::SmallVectorImpl<llvm::Instruction*>&, llvm::PredIteratorCache&, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo const*, llvm::Loop*, llvm::AliasSetTracker*, llvm::LoopSafetyInfo*) /home/ubuntu/Parallel-IR/lib/Transforms/Scalar/LICM.cpp:1066:0
#11 0x000000000303427e (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::ScalarEvolution*, bool) /home/ubuntu/Parallel-IR/lib/Transforms/Scalar/LICM.cpp:258:0
#12 0x0000000003033c86 (anonymous namespace)::LegacyLICMPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/ubuntu/Parallel-IR/lib/Transforms/Scalar/LICM.cpp:141:0
#13 0x000000000401d5e0 llvm::LPPassManager::runOnFunction(llvm::Function&) /home/ubuntu/Parallel-IR/lib/Analysis/LoopPass.cpp:198:0
#14 0x0000000002ccff10 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1522:0
#15 0x0000000003ff2a41 (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/ubuntu/Parallel-IR/lib/Analysis/CallGraphSCCPass.cpp:151:0
#16 0x0000000003ff3a74 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/ubuntu/Parallel-IR/lib/Analysis/CallGraphSCCPass.cpp:420:0
#17 0x0000000003ff3d3c (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/ubuntu/Parallel-IR/lib/Analysis/CallGraphSCCPass.cpp:475:0
#18 0x0000000002cd042f (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1599:0
#19 0x0000000002cd0b20 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1702:0
#20 0x0000000002cd0d61 llvm::legacy::PassManager::run(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1734:0
#21 0x0000000003461d31 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/BackendUtil.cpp:730:0
#22 0x00000000034627ad clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/BackendUtil.cpp:820:0
#23 0x0000000003def400 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/CodeGenAction.cpp:195:0
#24 0x000000000484653a clang::ParseAST(clang::Sema&, bool, bool) /home/ubuntu/Parallel-IR/tools/clang/lib/Parse/ParseAST.cpp:169:0
#25 0x00000000039a77aa clang::ASTFrontendAction::ExecuteAction() /home/ubuntu/Parallel-IR/tools/clang/lib/Frontend/FrontendAction.cpp:559:0
#26 0x0000000003dee46a clang::CodeGenAction::ExecuteAction() /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/CodeGenAction.cpp:868:0
#27 0x00000000039a7251 clang::FrontendAction::Execute() /home/ubuntu/Parallel-IR/tools/clang/lib/Frontend/FrontendAction.cpp:462:0
#28 0x0000000003958476 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/ubuntu/Parallel-IR/tools/clang/lib/Frontend/CompilerInstance.cpp:872:0
#29 0x0000000003ac10b8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/ubuntu/Parallel-IR/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:246:0
#30 0x000000000189bb22 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/ubuntu/Parallel-IR/tools/clang/tools/driver/cc1_main.cpp:181:0
#31 0x0000000001892125 ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/ubuntu/Parallel-IR/tools/clang/tools/driver/driver.cpp:299:0
#32 0x0000000001892bac main /home/ubuntu/Parallel-IR/tools/clang/tools/driver/driver.cpp:380:0
#33 0x00002b52c1a00f45 __libc_start_main (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x21f45)
#34 0x000000000188fa79 _start (/afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/clang+0x188fa79)
Stack dump:
0. Program arguments: /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name main.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -resource-dir /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/../lib/clang/4.0.0 -I/usr/include/x86_64-linux-gnu/ -internal-isystem /usr/local/include -internal-isystem /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/../lib/clang/4.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -std=gnu99 -fdebug-compilation-dir /mit/jiahaoli/Academic/172/recitation5/matrix -ferror-limit 19 -fmessage-length 158 -ftapir -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /tmp/main-d24234.o -x c main.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'main.c'.
4. Running pass 'Loop Pass Manager' on function '@dot_product'
5. Running pass 'Loop Invariant Code Motion' on basic block '%pfor.detach'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 4.0.0 (https://github.com/wsmoses/Cilk-Clang.git 1c283243292d1417e1eecf5933c24e30b77c7609) (https://github.com/wsmoses/Parallel-IR.git a2c6e22dd11c4212dbb64ce15020f677d77ed479)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/main-581a5a.c
clang: note: diagnostic msg: /tmp/main-581a5a.sh
clang: note: diagnostic msg:
********************
make: *** [main] Error 254
Jiahao Li
I want to make it easy for scripts and tools (e.g., profiling scripts) with only access to the binary as it runs to look at the name of an outlined task function and map that back to the name of the original function the code came from, and specifically I want tools to be able to easily identify what portion of an outlined task function's name was the original mangled name of a C++ function, to automatically demangle that original mangled function name (e.g., with c++filt
or abi::__cxa_demangle
) to report a correctly demanged C++ function name to a human user.
I therefore propose that the names of outlined task functions should begin with the name of the frontend-generated function from whence the code was outlined, followed by a delimiter that would never be generated by the frontend, such as a period, followed by whatever additional suffixes.
The CreateHelper
utility currently almost does this, generating names for outlined functions by concatenating the name of the function the code came from with an underscore followed by a BasicBlock's name and a caller-specified suffix:
Tapir-LLVM/lib/Transforms/Tapir/Outline.cpp
Lines 238 to 241 in 2031611
foo_for.body.preheader.cilk
, for example, if a Cilk task starting with a block named "for.body.preheader" from the function foo
was outlined. Unfortunately, given that function names themselves may have multiple underscores and basic block names may include anything a LLVM transform pass writer thought to use as a name of a block created during some transformation, it's hard for a tool to know how to find the right underscore that divides the original function name from the rest.
Since at this point it seems that we're already happy generating function names with periods in them, my proposal would be to replace the underscore joining the function name and basic block name with a string that starts with a period like ".outline_", resulting in function names like foo.outline_for.body.preheader.cilk
. Given this name, a tool can easily search for the first occurance of a period or the string ".outline" and remove everything after that to determine the original function name was foo
.
To reproduce: https://github.mit.edu/Supertech-Connectomics/sift_features/tree/1-24-2018-tapir-bug (branch 1-24-2018-tapir-bug) and checkout commit 95540f89caf784d42f6b8ca4614efd10328edbf3 on that branch.
A workaround that appears to avoid the compilation problem is to change the return value of Section::parameter_optimization to be void (and return result via argument reference).
clang-5.0: /home/wmoses/git/Tapir/include/llvm/Support/Casting.h:255: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::Function; Y = llvm::Constant; typename llvm::cast_retty<X, Y*>::ret_type = llvm::Function*]: Assertion `isa(Val) && "cast() argument of incompatible type!"' failed.
0 0x000055a41afa28d3 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/wmoses/git/Tapir/lib/Support/Unix/Signals.inc:398:0
1 0x000055a41afa2966 PrintStackTraceSignalHandler(void*) /home/wmoses/git/Tapir/lib/Support/Unix/Signals.inc:462:0
2 0x000055a41afa0b99 llvm::sys::RunSignalHandlers() /home/wmoses/git/Tapir/lib/Support/Signals.cpp:49:0
3 0x000055a41afa213f SignalHandler(int) /home/wmoses/git/Tapir/lib/Support/Unix/Signals.inc:252:0
4 0x00007f3e69c24150 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13150)
5 0x00007f3e68b540bb gsignal /build/glibc-itYbWN/glibc-2.26/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
6 0x00007f3e68b55f5d abort /build/glibc-itYbWN/glibc-2.26/stdlib/abort.c:92:0
7 0x00007f3e68b4bf17 __assert_fail_base /build/glibc-itYbWN/glibc-2.26/assert/assert.c:92:0
8 0x00007f3e68b4bfc2 (/lib/x86_64-linux-gnu/libc.so.6+0x2efc2)
9 0x000055a419d9f3d9 llvm::cast_retty<llvm::Function, llvm::Constant*>::ret_type llvm::cast<llvm::Function, llvm::Constant>(llvm::Constant*) /home/wmoses/git/Tapir/include/llvm/Support/Casting.h:255:0
10 0x000055a41e3db5a0 (anonymous namespace)::Get__cilkrts_get_tls_worker(llvm::Module&) /home/wmoses/git/Tapir/include/llvm/Transforms/Tapir/CilkABI.h:161:0
11 0x000055a41e3dd723 Get__cilkrts_enter_frame_1(llvm::Module&) /home/wmoses/git/Tapir/lib/Transforms/Tapir/CilkABI.cpp:459:0
12 0x000055a41e3dea13 GetOrInitCilkStackFrame(llvm::Function&, llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex > >&, bool, bool) /home/wmoses/git/Tapir/lib/Transforms/Tapir/CilkABI.cpp:728:0
13 0x000055a41e3dfbf1 llvm::tapir::CilkABI::createDetach(llvm::DetachInst&, llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex > >&, llvm::DominatorTree&, llvm::AssumptionCache&) /home/wmoses/git/Tapir/lib/Transforms/Tapir/CilkABI.cpp:955:0
14 0x000055a41e3eea5d (anonymous namespace)::LowerTapirToTarget::processFunction(llvm::Function&, llvm::DominatorTree&, llvm::AssumptionCache&) /home/wmoses/git/Tapir/lib/Transforms/Tapir/TapirToTarget.cpp:121:0
15 0x000055a41e3eeeb1 (anonymous namespace)::LowerTapirToTarget::runOnModule(llvm::Module&) /home/wmoses/git/Tapir/lib/Transforms/Tapir/TapirToTarget.cpp:169:0
16 0x000055a41a92c19b (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/wmoses/git/Tapir/lib/IR/LegacyPassManager.cpp:1591:0
17 0x000055a41a92c8c5 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/wmoses/git/Tapir/lib/IR/LegacyPassManager.cpp:1694:0
18 0x000055a41a92cac3 llvm::legacy::PassManager::run(llvm::Module&) /home/wmoses/git/Tapir/lib/IR/LegacyPassManager.cpp:1726:0
19 0x000055a41b261b1b (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) /home/wmoses/git/Tapir/tools/clang/lib/CodeGen/BackendUtil.cpp:838:0
20 0x000055a41b263d3c clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) /home/wmoses/git/Tapir/tools/clang/lib/CodeGen/BackendUtil.cpp:1188:0
21 0x000055a41bf16e4f clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/wmoses/git/Tapir/tools/clang/lib/CodeGen/CodeGenAction.cpp:261:0
22 0x000055a41c88dbc6 clang::ParseAST(clang::Sema&, bool, bool) /home/wmoses/git/Tapir/tools/clang/lib/Parse/ParseAST.cpp:161:0
23 0x000055a41b8bb849 clang::ASTFrontendAction::ExecuteAction() /home/wmoses/git/Tapir/tools/clang/lib/Frontend/FrontendAction.cpp:1003:0
24 0x000055a41bf14c0e clang::CodeGenAction::ExecuteAction() /home/wmoses/git/Tapir/tools/clang/lib/CodeGen/CodeGenAction.cpp:993:0
25 0x000055a41b8bb28c clang::FrontendAction::Execute() /home/wmoses/git/Tapir/tools/clang/lib/Frontend/FrontendAction.cpp:906:0
26 0x000055a41b858e78 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/wmoses/git/Tapir/tools/clang/lib/Frontend/CompilerInstance.cpp:981:0
27 0x000055a41ba04fe8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/wmoses/git/Tapir/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:251:0
28 0x000055a419d30426 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/wmoses/git/Tapir/tools/clang/tools/driver/cc1_main.cpp:221:0
29 0x000055a419d255bc ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/wmoses/git/Tapir/tools/clang/tools/driver/driver.cpp:306:0
30 0x000055a419d26198 main /home/wmoses/git/Tapir/tools/clang/tools/driver/driver.cpp:387:0
31 0x00007f3e68b3e1c1 __libc_start_main /build/glibc-itYbWN/glibc-2.26/csu/../csu/libc-start.c:342:0
32 0x000055a419d22c9a _start (/mnt/Data/git/Tapir/installed/bin/clang-5.0+0x186ec9a)
Stack dump:
0. Program arguments: /mnt/Data/git/Tapir/installed/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name cilk-abi-cilk-for.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/wmoses/git/cilkrts/build/CMakeFiles/cilkrts_static.dir/runtime/cilk-abi-cilk-for.cpp.gcno -resource-dir /mnt/Data/git/Tapir/installed/lib/clang/5.0.0 -I /home/wmoses/git/cilkrts/include -I /home/wmoses/git/cilkrts/runtime -I /home/wmoses/git/cilkrts/runtime/sslib -I /home/wmoses/git/cilkrts/runtime/config/x86 -D IN_CILK_RUNTIME=1 -D HAVE_ALLOCA_H -D HAVE_ATTRIBUTE_VISIBILITY -D HAVE_PTHREAD_AFFINITY_NP -D DONT_USE_CPU_ALLOC_SIZE -D _GNU_SOURCE -D _FORTIFY_SOURCE=2 -D __need_wchar_t -D __need_size_t -D NDEBUG -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward -internal-isystem /usr/local/include -internal-isystem /mnt/Data/git/Tapir/installed/lib/clang/5.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -fdeprecated-macro -fdebug-compilation-dir /home/wmoses/git/cilkrts/build -ferror-limit 19 -fmessage-length 178 -fcilkplus -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o CMakeFiles/cilkrts_static.dir/runtime/cilk-abi-cilk-for.cpp.o -x c++ /home/wmoses/git/cilkrts/runtime/cilk-abi-cilk-for.cpp
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/cilk-abi-cilk-for-a2ee62.cpp
clang-5.0: note: diagnostic msg: /tmp/cilk-abi-cilk-for-a2ee62.sh
clang-5.0: note: diagnostic msg:
CMakeFiles/cilkrts_static.dir/build.make:110: recipe for target 'CMakeFiles/cilkrts_static.dir/runtime/cilk-abi-cilk-for.cpp.o' failed
make[2]: *** [CMakeFiles/cilkrts_static.dir/runtime/cilk-abi-cilk-for.cpp.o] Error 254
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cilkrts_static.dir/all' failed
make[1]: *** [CMakeFiles/cilkrts_static.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I installed Cilk using the instructions from the website.
sudo apt-add-repository ppa:wsmoses/tapir-toolchain
sudo apt-get update
sudo apt-get install tapirclang-5.0 libcilkrts5
I copied the following program from the Cilk documentation.
#include <stdio.h>
#include <stdint.h>
int64_t fib(int64_t n) {
if (n < 2) return n;
int x, y;
x = cilk_spawn fib(n - 1);
y = fib(n - 2);
cilk_sync;
return x + y;
}
int main(){
printf("%ld\n", fib(20));
}
I then compiled using the compiler flag that they specified.
clang-5.0 -fcilkplus Fib.c
Fib.c:7:9: error: use of undeclared identifier 'cilk_spawn'
x = cilk_spawn fib(n - 1);
^
Fib.c:9:5: error: use of undeclared identifier 'cilk_sync'
cilk_sync;
^
The desired output is a working executable that uses Cilk
and prints 6765
.
What magic incantations are needed to produce this executable?
I am running Ubuntu 18.04 with kernel 4.4.0-45-generic
.
Requires modifying Cilk-Clang
command: make
machine: personal Azure instance
Here is full bug reports:
clang -std=gnu99 -Wall -ftapir -O3 -DNDEBUG -o quadtree.o -c quadtree.c
#0 0x00000000031e90e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000031e94a9 PrintStackTraceSignalHandler(void*) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:470:0
#2 0x00000000031e7814 llvm::sys::RunSignalHandlers() /home/ubuntu/Parallel-IR/lib/Support/Signals.cpp:44:0
#3 0x00000000031e8a78 SignalHandler(int) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:256:0
#4 0x00002b5cbb761330 __restore_rt (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x000000000265382e llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:454:0
#6 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#7 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#8 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#9 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#10 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#11 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#12 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#13 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#14 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#15 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#16 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#17 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#18 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#19 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#20 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#21 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#22 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#23 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#24 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#25 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#26 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#27 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#28 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#29 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#30 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#31 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#32 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#33 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#34 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#35 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#36 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#37 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#38 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#39 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#40 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#41 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#42 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#43 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#44 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#45 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#46 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#47 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#48 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#49 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#50 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#51 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#52 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#53 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#54 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#55 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#56 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#57 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#58 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#59 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#60 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#61 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#62 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#63 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#64 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#65 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#66 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#67 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#68 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#69 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#70 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#71 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#72 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#73 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#74 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#75 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#76 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#77 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#78 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#79 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#80 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#81 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#82 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#83 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#84 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#85 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#86 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#87 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#88 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#89 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#90 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#91 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#92 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#93 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#94 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#95 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#96 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#97 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#98 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#99 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#100 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#101 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#102 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#103 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#104 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#105 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#106 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#107 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#108 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#109 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#110 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#111 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#112 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#113 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#114 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#115 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#116 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#117 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#118 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#119 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#120 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#121 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#122 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#123 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#124 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#125 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#126 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#127 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#128 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#129 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#130 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#131 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#132 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#133 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#134 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#135 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#136 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#137 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#138 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#139 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#140 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#141 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#142 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#143 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#144 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#145 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#146 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#147 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#148 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#149 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#150 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#151 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#152 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#153 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#154 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#155 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#156 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#157 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#158 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#159 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#160 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#161 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#162 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#163 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#164 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#165 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#166 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#167 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#168 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#169 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#170 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#171 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#172 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#173 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#174 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#175 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#176 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#177 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#178 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#179 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#180 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#181 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#182 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#183 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#184 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#185 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#186 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#187 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#188 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#189 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#190 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#191 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#192 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#193 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#194 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#195 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#196 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#197 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#198 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#199 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#200 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#201 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#202 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#203 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#204 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#205 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#206 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#207 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#208 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#209 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#210 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#211 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#212 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#213 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#214 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#215 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#216 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#217 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#218 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#219 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#220 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#221 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#222 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#223 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#224 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#225 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#226 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#227 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#228 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#229 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#230 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#231 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#232 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#233 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#234 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#235 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#236 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#237 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#238 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#239 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#240 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#241 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#242 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#243 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#244 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#245 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#246 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#247 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#248 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#249 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#250 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#251 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#252 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#253 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
#254 0x0000000002655562 llvm::AAResults::getModRefInfo(llvm::Instruction const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/include/llvm/Analysis/AliasAnalysis.h:519:0
#255 0x0000000002653972 llvm::AAResults::getModRefInfo(llvm::DetachInst const*, llvm::MemoryLocation const&) /home/ubuntu/Parallel-IR/lib/Analysis/AliasAnalysis.cpp:473:0
Stack dump:
0. Program arguments: /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name quadtree.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-file /mit/hyshwang/6.172/project2/quadtree.o -resource-dir /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/../lib/clang/4.0.0 -D NDEBUG -I/usr/include/x86_64-linux-gnu/ -internal-isystem /usr/local/include -internal-isystem /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/../lib/clang/4.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -std=gnu99 -fdebug-compilation-dir /mit/hyshwang/6.172/project2 -ferror-limit 19 -fmessage-length 77 -ftapir -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o quadtree.o -x c quadtree.c
<eof> parser at end of file
Per-module optimization passes
Running pass 'CallGraph Pass Manager' on module 'quadtree.c'.
Running pass 'Loop Pass Manager' on function '@count_collision_within_tree_parallel'
Running pass 'Loop Invariant Code Motion' on basic block '%pfor.detach.us'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 4.0.0 (https://github.com/wsmoses/Cilk-Clang.git 1c283243292d1417e1eecf5933c24e30b77c7609) (https://github.com/wsmoses/Parallel-IR.git a2c6e22)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/quadtree-4601ff.c
clang: note: diagnostic msg: /tmp/quadtree-4601ff.sh
clang: note: diagnostic msg:
make: *** [quadtree.o] Error 254
bug.tar.gz
I downloaded the benchmarks via http://tinyurl.com/TapirLLVMTesting and tried to run the test.sh script. However, I get errors saying the argument '-ftapir' is unknown. This can be found in the clib.sh which the other test scripts are sourcing. Has this argument been deprecated?
Is there a design reason that LoopSpawning
, at several points, checks the return value of verifyFunction()
and, if the verification fails, it merely returns false
indicating it did not transform anything, despite the fact that, at those locations in the code, some transformations have indeed been attempted? Was there some point during development where letting bad transformed code continue through the compilation pipeline made sense? I have sometimes locally changed the verifyFunction()
checks into asserts which was useful when I was debugging an issue,
So I'm not sure why the CI is passing, but I'm getting test failures that I wasn't a few months ago. I haven't had a chance to narrow down exactly when the issue was introduced, but I get no unexpected failures on commit 7352407d063c8bac796926ca618e14d8eca87735
from January, for example. On the current HEAD, 1482504e234a65bffc8c54de8de9fc877822345d
, I'm getting 1767 unexpected failures when running make check
.
When I get the chance I'll try and look into what could have caused all the failures between now and then, but in the meantime I thought it was worth opening an issue. I'm curious if others can reproduce these failures.
Test case: (run clang -O3 -fcilkplus to exhibit)
test.ll.txt
The code can be found here https://github.com/wheatman/extended-csr/tree/cilksan-issue
#0 0x000000000152cbda llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152cbda)
#1 0x000000000152ae2e llvm::sys::RunSignalHandlers() (/efs/tools/tapir-6/build/bin/clang-6.0+0x152ae2e)
#2 0x000000000152af6a SignalHandler(int) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152af6a)
#3 0x00002ab3efc3c330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x0000000000cbbffb llvm::FullDependence::isScalar(unsigned int) const (/efs/tools/tapir-6/build/bin/clang-6.0+0xcbbffb)
#5 0x0000000002e2127a DependenceMightRace(std::unique_ptr<llvm::Dependence, std::default_deletellvm::Dependence >, llvm::Instruction*, llvm::Instruction*, llvm::Value*, llv
m::Value*, llvm::DenseMap<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u>, llvm::DenseMapInfo<llvm::Spindle const*>, llvm::detail::DenseMapPair<llvm::Spindle c
onst*, llvm::SmallPtrSet<llvm::Task const*, 2u> > >&, llvm::DenseMap<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u>, llvm::DenseMapInfo<llvm::Spindle const*>,
llvm::detail::DenseMapPair<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u> > >&, llvm::DominatorTree const&, llvm::TaskInfo const&, llvm::LoopInfo&, llvm::Dat
aLayout const&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2e2127a)
#6 0x0000000002e2547a InstrMightRaceWithTask(llvm::Instruction*, llvm::DenseMap<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u>, llvm::DenseMapInfo<llvm::Spind
le const*>, llvm::detail::DenseMapPair<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u> > >&, llvm::DenseMap<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task
const*, 2u>, llvm::DenseMapInfo<llvm::Spindle const*>, llvm::detail::DenseMapPair<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u> > >&, llvm::DenseMap<llvm::Ta
sk const*, llvm::SmallVector<llvm::Instruction*, 8u>, llvm::DenseMapInfo<llvm::Task const*>, llvm::detail::DenseMapPair<llvm::Task const*, llvm::SmallVector<llvm::Instruction
, 8u> > >&, llvm::SmallPtrSetImplllvm::Instruction*&, llvm::DenseMap<llvm::MemTransferInst, (anonymous namespace)::AccessType, llvm::DenseMapInfollvm::MemTransferInst*,
llvm::detail::DenseMapPair<llvm::MemTransferInst*, (anonymous namespace)::AccessType> >&, llvm::DominatorTree const&, llvm::TaskInfo const&, llvm::LoopInfo&, llvm::Dependenc
eInfo&, llvm::TargetLibraryInfo const*, llvm::DataLayout const&, bool, bool) [clone .part.825] (/efs/tools/tapir-6/build/bin/clang-6.0+0x2e2547a)
#7 0x0000000002e25aae InstrMightRaceWithTask(llvm::Instruction*, llvm::DenseMap<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u>, llvm::DenseMapInfo<llvm::Spind
le const*>, llvm::detail::DenseMapPair<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u> > >&, llvm::DenseMap<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task
const*, 2u>, llvm::DenseMapInfo<llvm::Spindle const*>, llvm::detail::DenseMapPair<llvm::Spindle const*, llvm::SmallPtrSet<llvm::Task const*, 2u> > >&, llvm::DenseMap<llvm::Ta
sk const*, llvm::SmallVector<llvm::Instruction*, 8u>, llvm::DenseMapInfo<llvm::Task const*>, llvm::detail::DenseMapPair<llvm::Task const*, llvm::SmallVector<llvm::Instruction
, 8u> > >&, llvm::SmallPtrSetImplllvm::Instruction*&, llvm::DenseMap<llvm::MemTransferInst, (anonymous namespace)::AccessType, llvm::DenseMapInfollvm::MemTransferInst*,
llvm::detail::DenseMapPair<llvm::MemTransferInst*, (anonymous namespace)::AccessType> >&, llvm::DominatorTree const&, llvm::TaskInfo const&, llvm::LoopInfo&, llvm::Dependenc
eInfo&, llvm::TargetLibraryInfo const*, llvm::DataLayout const&, bool, bool) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2e25aae)
#8 0x0000000002e2b1c2 (anonymous namespace)::CilkSanitizerImpl::prepareToInstrumentFunction(llvm::Function&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2e2b1c2)
#9 0x0000000002e2ceab (anonymous namespace)::CilkSanitizerImpl::run() (/efs/tools/tapir-6/build/bin/clang-6.0+0x2e2ceab)
#10 0x0000000002e2e66e (anonymous namespace)::CilkSanitizerLegacyPass::runOnModule(llvm::Module&) [clone .part.831] (/efs/tools/tapir-6/build/bin/clang-6.0+0x2e2e66e)
#11 0x00000000011421c0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x11421c0)
#12 0x00000000016c9926 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pw
rite_stream> >) (/efs/tools/tapir-6/build/bin/clang-6.0+0x16c9926)
#13 0x00000000016cb597 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang
::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (
/efs/tools/tapir-6/build/bin/clang-6.0+0x16cb597)
#14 0x0000000001e587ab clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e587ab)
#15 0x0000000002025542 clang::ParseAST(clang::Sema&, bool, bool) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2025542)
#16 0x0000000001e58014 clang::CodeGenAction::ExecuteAction() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e58014)
#17 0x0000000001a5fbfe clang::FrontendAction::Execute() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a5fbfe)
#18 0x0000000001a37d6d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a37d6d)
#19 0x0000000001aeb2c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1aeb2c4)
#20 0x0000000000a75c98 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/efs/tools/tapir-6/build/bin/clang-6.0+0xa75c98)
#21 0x0000000000a12401 main (/efs/tools/tapir-6/build/bin/clang-6.0+0xa12401)
#22 0x00002ab3f0b31f45 __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#23 0x0000000000a71357 _start (/efs/tools/tapir-6/build/bin/clang-6.0+0xa71357)
Stack dump:
0. Program arguments: /efs/tools/tapir-6/build/bin/clang-6.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -m
ain-file-name test2.cpp -mrelocation-model static -mthread-model posix -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros -mreassociate -freciprocal-
math -fno-trapping-math -ffp-contract=fast -ffast-math -ffinite-math-only -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu haswell -target-fea
ture +sse2 -target-feature +cx16 -target-feature -tbm -target-feature -avx512ifma -target-feature -gfni -target-feature -sha -target-feature -fma4 -target-feature -vpclmulqdq
-target-feature -prfchw -target-feature +bmi2 -target-feature -xsavec -target-feature +fsgsbase -target-feature +popcnt -target-feature +aes -target-feature -avx512bitalg -t
arget-feature -xsaves -target-feature -avx512er -target-feature -avx512vnni -target-feature -avx512vpopcntdq -target-feature -clwb -target-feature -avx512f -target-feature -c
lzero -target-feature -pku -target-feature +mmx -target-feature -lwp -target-feature -xop -target-feature -rdseed -target-feature -ibt -target-feature -sse4a -target-feature
-avx512bw -target-feature -clflushopt -target-feature +xsave -target-feature -avx512vbmi2 -target-feature -avx512vl -target-feature -avx512cd -target-feature +avx -target-fea
ture -vaes -target-feature -rtm -target-feature +fma -target-feature +bmi -target-feature +rdrnd -target-feature -mwaitx -target-feature +sse4.1 -target-feature +sse4.2 -targ
et-feature +avx2 -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c -target-feature +ssse3 -target-feature
-sgx -target-feature -shstk -target-feature +cmov -target-feature -avx512vbmi -target-feature +movbe -target-feature +xsaveopt -target-feature -avx512dq -target-feature -adx
-target-feature -avx512pf -target-feature +sse3 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /ef
s/tools/tapir-6/build/lib/clang/6.0.0 -I/usr/include/x86_64-linux-gnu/ -c-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -cxx-isystem /efs/tools/tapir-6/build/lib/
clang/5.0.0/include/ -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../inc
lude/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-lin
ux-gnu/5.4.1/../../../../include/c++/5.4.1/backward -internal-isystem /usr/local/include -internal-isystem /efs/tools/tapir-6/build/lib/clang/6.0.0/include -internal-externc-
isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -std=c++17 -fdeprecated-macro -fdebug-compilation-di
r /efs/home/wheatman/extended-csr -ferror-limit 19 -fmessage-length 174 -fcilkplus -fsanitize=cilk -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-vectorize-loops -vectorize-slp -o /tmp/test2-94c907.o -x c++ test2.cpp
<eof> parser at end of file
Per-module optimization passes
Running pass 'CilkSanitizer' on module 'test2.cpp'.
clang-6.0: error: unable to execute command: Segmentation fault
clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 6.0.0 (https://github.com/wsmoses/Tapir-Clang.git 190c083a326a7bee7dcf773d3ddd3e2e9240b719) (https://github.com/wsmoses/Tapir-LLVM.git 065b7e7
6f144919cb77221)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /efs/tools/tapir-6/build/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-6.0: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test2-9e5f8e.cpp
clang-6.0: note: diagnostic msg: /tmp/test2-9e5f8e.sh
clang-6.0: note: diagnostic msg:
test2-9e5f8e.sh.txt
test2-9e5f8e.txt
make: *** [.run.cilksan] Error 254
The -inferattrs
pass is run both before and after lowering:
I am wondering why this is. Note that this is distinct from the -functionattrs
pass that can deduce attributes based on the contents of functions. The -inferattrs
pass only infers attributes of library API declarations based on the name and signature, using the big list here:
I don't see anything CilkABI-related in the list, so I'm wondering: how does -inferattrs
help lowering? Is that pass actually unneeded and can it be removed?
So that we can just apt-get install
it, instead of having to build it from source. Is there anything specific (dependencies for example) blocking it ?
I just diagnosed a Swarm compiler crash and am wondering if there are any invariants that would prevent a similar crash from happening in Tapir, or you would want a change that would fix my problem to also be merged into Tapir.
Inside of SimplifyCFG
, if a block is empty except for phi nodes and is terminated by a reattach, then we check the following condition to determine whether to serialize the block into its predecessors:
Tapir-LLVM/lib/Transforms/Utils/SimplifyCFG.cpp
Lines 6012 to 6016 in ba2f0ed
(Ugh, there's a tab causing alignment issues there.)
If we get through this loop without returning false, we precede to attempt to replace all the preceding detaches with branches in order to serialize them.
The problem is, this check is not carefully enough. I think It should have been
// Scan predecessors to verify that all of them detach BB.
for (BasicBlock *PredBB : predecessors(BB)) {
auto *DI = dyn_cast<DetachInst>(PredBB->getTerminator());
if (!DI || DI->getDetached() != BB)
return false;
}
I want to make sure to check whether DI->getDetached() == BB
inside the loop, in order to deal with cases like the following. Consider a CFG that starts out like this:
A:[detach] --detach-edge--> B:[detach] --detach-edge--> C:[some computation; reattach] -->reattach-edge-->
\ \_______________continue_edge___________________________________________> D:[reattach] --reattach-edge-->
\__________________________________continue_edge_________________________________________________________________________________> E:[whatever continuation]
So A detaches B which detaches C, which does some work and reattaches to D, which immediately reattaches to E.
Now consider what happens if, during some optimization, the compiler discovers that C causes undefined behavior/will always crash, so it is impossible to reach C's terminator, the reattach to D. We're left with:
A:[detach] --detach-edge--> B:[detach] --detach-edge--> C:[crash; unreachable]
\ \_______________continue_edge________________> D:[reattach] --reattach-edge-->
\__________________________________continue_edge______________________________________________________> E:[whatever continuation]
So now consider what happens if serializeTrivialDetachedBlock()
runs on block D, before serializeDetachOfUnreachable()
runs on block C. D contains nothing but a reattach, and its single predecessor, block B, terminates in a detach. In this case serializeTrivialDetachedBlock()
decides it should try to serialize the detach in block B, but this makes no sense. It will end up crashing the compiler when it reaches this assertion:
Tapir-LLVM/lib/Transforms/Utils/SimplifyCFG.cpp
Lines 6022 to 6023 in ba2f0ed
I was having some weird issues with compiling and transforming loops in Swarm programs, and as I started narrowing the problem down, I started to suspect the bug was due in part to code I didn't write, but copied from Tapir's LoopSpawning pass. So I decided to see if I could write a Cilk program that miscompiled in a way analogous to the issue I was having. Here's what I've come up with:
+victory@bcn5 /tmp/victory/llvm-tapir-build $ cat cilktest.c
#include <cilk/cilk.h>
#include <stdio.h>
__attribute__((noinline)) void foo(int limit) {
cilk_for (int i = 1; i <= limit; i++) {
printf("Limit is %d\n", limit);
}
}
int main() {
printf("Starting\n");
foo(8);
printf("Finished\n");
}
+victory@bcn5 /tmp/victory/llvm-tapir-build $ bin/clang --version
clang version 5.0.0 ([email protected]:wsmoses/Cilk-Clang.git cb4e7cc1202c13504de32b352091076560be42c6) (https://github.com/wsmoses/Parallel-IR.git 6ce5f2f27b1bc2d92e48420376c2a37d1608f3a1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /tmp/victory/llvm-tapir-build/bin
+victory@bcn5 /tmp/victory/llvm-tapir-build $ bin/clang -ftapir cilktest.c
+victory@bcn5 /tmp/victory/llvm-tapir-build $ ./a.out
Starting
Limit is 1
Limit is 1
Limit is 2
Limit is 4
Limit is 4
Limit is 6
Limit is 6
Limit is 8
Limit is 8
Finished
+victory@bcn5 /tmp/victory/llvm-tapir-build $
The above program should only print out a limit value of 8 repeatedly, but, as you can see, it is mis-compiled (with no error messages, even with assertions turned on!) and prints out a variety of different numbers. This is using a compiler generated from the current master branch of this repo, without any modifications from me.
I believe the problem is as follows: the loop invariant value "limit" that already exists in the code (as a formal parameter of foo()) happens to coincide exactly with the loop limit, so when LoopSpawning uses SCEVExpander to build LimitVar
(https://github.com/wsmoses/Parallel-IR/blob/6ce5f2f27b1bc2d92e48420376c2a37d1608f3a1/lib/Transforms/Tapir/LoopSpawning.cpp#L1059), no code is actually built and LimitVar
just points to the existing "limit" value, which the code in the body of the loop also uses. Then when the loop gets outlined to a helper function, both uses of the limit value in the loop (correctly, the loop limit comparison, but also, incorrectly, the use in the body of the loop) are mapped to the limit argument of the helper, which is the end value of the range to be iterated over for each DAC call.
I infer the numbers printed out come from a DAC spawning call tree that looks like:
(0,8)
/ \
(0,4) (5,8)
/ \ / \
(0,2) (3,4) (5,6) (7,8)
/ \
(0,1) (2,2)
Hence 1, 4, 6, and 8 each being printed twice, since these are the "end" values of leaf ranges of size two, and 2 being printed once due to one leaf task being assigned just the single iteration with index 2.
Tapir's expected syntax for the grain size pragma doesn't match other Cilk compilers.
Example:
#include <cilk/cilk.h>
long array[10000];
void foo() {
#pragma cilk grainsize = 100
cilk_for (long i = 0; i < 10000; ++i) {
array[i] = 0;
}
}
Error:
<source>:6:28: error: expected expression
#pragma cilk grainsize = 100
^
<source>:6:28: warning: extra tokens at end of '#pragma cilk grainsize' - ignored [-Wignored-pragmas]
1 warning and 1 error generated.
Compiler returned: 1
Removing the equals sign (i.e. #pragma cilk grainsize 100
) fixes the error, but breaks compatibility with other Cilk compilers like gcc 5.5:
<source>: In function 'void foo()':
<source>:6:28: error: expected '=' before numeric constant
#pragma cilk grainsize 100
^
Compiler returned: 1
Intel's definition of Cilk required the equals sign, see https://www.cilkplus.org/sites/default/files/open_specifications/cilk_plus_language_specification_0_9.pdf.
I was experimenting with one of the recent branches of Tapir, and I ran across an interesting situation and possible bug. When I run the program compiling with a normal for
loop, I get the answer that I expect. However, when compiling with _Cilk_for
with -O1 -g
, I get a different result, and the program crashes on an assert I added, even when run with CILK_NWORKERS=1
.
NabbitDCBug.zip
When I compile with CIlk Plus from GCC 5.4.0, both serial and Cilk versions work as I expect.
I am using the xla_8
branch of the various repos, and clang++ --version
returns the following for me:
clang version 8.0.1 (https://github.com/wsmoses/Tapir-Clang.git c0169413e4d82fb2bc4a3c401fe4527f1838baa1) (https://github.com/wsmoses/Tapir-LLVM.git a038195c28ef6c41f5ad8e0947f061e71771cb6a)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jsukha/sandbox/Tapir-Meta/src/build/bin
I reduced the original problem down to the following test programs. I've included a Makefile + C++ code.
NabbitDCBug.zip
This code was originally implementing a blocked divide-and-conquer wavefront algorithm on a 2d grid. It has been a while since I looked at the details of this code, so I'm not 100% sure there isn't a bug or race somewhere in the program. But this code has worked through multiple incarnations of Cilk, so it would be interesting if there is a bug that is now being exposed by using Tapir.
Any ideas on what might be happening, and/or what is a good way to debug this issue?
I am playing around with the halide front-end for Tapir.
Is there an elegant way to generate the bitcode prior to lowering to a cilk runtime and ABI.
The reason is we are currently taking hijacking Tapir's target-independent bitcode (i.e., reattaches, syncs, detaches) to plug into an FPGA backend.
I see the use of CilkABI as the within
https://github.com/wsmoses/Halide/blob/958cd01f3505b11bfb6e641b9c0c9dd229854d56/src/CodeGen_LLVM.cpp#L1042
Is there a NoneTarget or a target that does not lower to a specific runtime?
Thanks
When a cilk_spawn expression is outlined into a function, all sub-expressions are moved into the outlined function. For example, in cilk_spawn foo(x + y)
, the values of x
and y
are passed as arguments to the outlined function, which adds them together before calling foo
. Nested function calls are also handled in this way.
Now consider the case where one of the arguments to the spawned function is an object, passed by value. An implicit call to the object's copy-constructor occurs here. I would have expected to see the call to the copy-constructor occur within the outlined function, but in Tapir it happens before the call to the outlined function. Is this intentional? Why the inconsistent behavior?
Example:
volatile long * marker;
#include <cilk/cilk.h>
#define noinline __attribute__((noinline))
struct object {
long _value;
noinline object(long value) : _value(value) {
*marker = 0xC;
}
noinline object(const object& other) {
*marker = 0xCC;
}
};
noinline long add(long x, long y) { return x + y;}
noinline void child(long a, long b, object c)
{
*marker += a + b + c._value;
}
noinline long parent(long x)
{
object obj(0xEE);
for (long i = 0; i < 100; ++i){
// *** LOOK AT THIS SPAWN ***
// Note that obj is passed by value
cilk_spawn child(x+i, add(x, i), obj);
obj._value++;
}
cilk_sync;
return *marker;
}
Compiled with -g0 -fcilkplus -std=c++14 -O1 -emit-llvm -mllvm -debug-abi-calls
. Here's the demangled IR for the outlined function. Notice the evaluation of x + i
and the call to add
have been outlined as expected, but the copy constructor is not here.
define internal fastcc void @_Z6parentl_det.achd.cilk(i64 %x.cilk, i64 %i.07.cilk, %struct.object* nocapture readonly align 8 %agg.tmp.cilk) unnamed_addr #2 {
%__cilkrts_sf = alloca %struct.__cilkrts_stack_frame, align 8
call fastcc void @__cilkrts_enter_frame_fast_1(%struct.__cilkrts_stack_frame* nonnull %__cilkrts_sf)
call fastcc void @__cilkrts_detach(%struct.__cilkrts_stack_frame* nonnull %__cilkrts_sf)
%call.cilk = call i64 @add(long, long)(i64 %x.cilk, i64 %i.07.cilk)
%add.cilk = add nsw i64 %i.07.cilk, %x.cilk
call void @child(long, long, object)(i64 %add.cilk, i64 %call.cilk, %struct.object* nonnull %agg.tmp.cilk)
call fastcc void @__cilk_parent_epilogue(%struct.__cilkrts_stack_frame* nonnull %__cilkrts_sf)
ret void
}
Here's the call to the copy constructor at the call site:
for.body: ; preds = %det.cont, %entry
%i.07 = phi i64 [ 0, %entry ], [ %inc1, %det.cont ]
call void @object::object(object const&)(%struct.object* nonnull %agg.tmp, %struct.object* nonnull dereferenceable(8) %obj)
call void asm sideeffect "stmxcsr $0\0A\09fnstcw $1", "*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* %1, i16* %2) #7 %9 = call i8* @llvm.frameaddress(i32 0)
store volatile i8* %9, i8** %4, align 8
%10 = call i8* @llvm.stacksave()
store volatile i8* %10, i8** %5, align 8
%11 = call i32 @llvm.eh.sjlj.setjmp(i8* %6) #9
%12 = icmp eq i32 %11, 0
br i1 %12, label %for.body.split, label %det.cont
for.body.split: ; preds = %for.body
call fastcc void @_Z6parentl_det.achd.cilk(i64 %x, i64 %i.07, %struct.object* nonnull %agg.tmp)
br label %det.cont
The code can be found in https://github.com/wheatman/extended-csr/tree/old_stuff/extended-csr2
With the following code
cilk_for (uint32_t i = 0; i < n; i++) {
cilk_for (uint32_t j = 0; j < n; j++) {
// find_value returns 0 if not found.
uint32_t value = g->find_value(i, j);
if (value != 0) {
add_edge(i, j, value);
}
}
}
The compiler crashes with the error at the bottom
If I change either of the cilk_for loops to normal for loops the error goes away
Note this is not an issue on master, but rather with WIP-taskinfo
Referring to a basic block in another function!
invoke fastcc void @ZN3OFM7convertEP5Graph.outline.otd2(%class.Graph** %0, i32* %41, %class.OFM* %1, i32 %123)
to label %146 unwind label %283, !dbg !29922
Referring to a basic block in another function!
invoke fastcc void @ZN3OFM7convertEP5Graph.outline.otd2(%class.Graph** %0, i32* %41, %class.OFM* %1, i32 %123)
to label %146 unwind label %283, !dbg !29922
#0 0x000000000152cbda llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152cbda)
#1 0x000000000152ae2e llvm::sys::RunSignalHandlers() (/efs/tools/tapir-6/build/bin/clang-6.0+0x152ae2e)
#2 0x000000000152af6a SignalHandler(int) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152af6a)
#3 0x00002ba6cd4e0330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00000000010afa7d llvm::BasicBlock::getTerminator() const (/efs/tools/tapir-6/build/bin/clang-6.0+0x10afa7d)
#5 0x00000000010f9b1f llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock, false> >::ChildrenGetter::Get(llvm::BasicBlock*, llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock, false> >::BatchUpdateInfo*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x10f9b1f)
#6 0x0000000001101820 unsigned int llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock, false> >::runDFS<false, bool ()(llvm::BasicBlock, llvm::BasicBlock*)>(llvm::BasicBlock*, unsigned int, bool ()(llvm::BasicBlock, llvm::BasicBlock*), unsigned int) [clone .constprop.412] (/efs/tools/tapir-6/build/bin/clang-6.0+0x1101820)
#7 0x0000000001101aa2 llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock, false> >::CalculateFromScratch(llvm::DominatorTreeBase<llvm::BasicBlock, false>&, llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock, false> >::BatchUpdateInfo*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1101aa2)
#8 0x0000000001101c81 llvm::DominatorTreeWrapperPass::runOnFunction(llvm::Function&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1101c81)
#9 0x00000000011417da llvm::FPPassManager::runOnFunction(llvm::Function&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x11417da)
#10 0x0000000001141873 llvm::FPPassManager::runOnModule(llvm::Module&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1141873)
#11 0x00000000011421c0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x11421c0)
#12 0x00000000016c9961 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/efs/tools/tapir-6/build/bin/clang-6.0+0x16c9961)
#13 0x00000000016cb597 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/efs/tools/tapir-6/build/bin/clang-6.0+0x16cb597)
#14 0x0000000001e587ab clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e587ab)
#15 0x0000000002025542 clang::ParseAST(clang::Sema&, bool, bool) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2025542)
#16 0x0000000001e58014 clang::CodeGenAction::ExecuteAction() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e58014)
#17 0x0000000001a5fbfe clang::FrontendAction::Execute() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a5fbfe)
#18 0x0000000001a37d6d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a37d6d)
#19 0x0000000001aeb2c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1aeb2c4)
#20 0x0000000000a75c98 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/efs/tools/tapir-6/build/bin/clang-6.0+0xa75c98)
#21 0x0000000000a12401 main (/efs/tools/tapir-6/build/bin/clang-6.0+0xa12401)
#22 0x00002ba6ce3d5f45 __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#23 0x0000000000a71357 _start (/efs/tools/tapir-6/build/bin/clang-6.0+0xa71357)
Stack dump:
0. Program arguments: /efs/tools/tapir-6/build/bin/clang-6.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-va
lue-names -main-file-name test2.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zer
os -mreassociate -freciprocal-math -fno-trapping-math -ffp-contract=fast -ffast-math -ffinite-math-only -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -
target-cpu haswell -target-feature +sse2 -target-feature +cx16 -target-feature -tbm -target-feature -avx512ifma -target-feature -gfni -target-feature -sha -target-feature -fm
a4 -target-feature -vpclmulqdq -target-feature -prfchw -target-feature +bmi2 -target-feature -xsavec -target-feature +fsgsbase -target-feature +popcnt -target-feature +aes -t
arget-feature -avx512bitalg -target-feature -xsaves -target-feature -avx512er -target-feature -avx512vnni -target-feature -avx512vpopcntdq -target-feature -clwb -target-featu
re -avx512f -target-feature -clzero -target-feature -pku -target-feature +mmx -target-feature -lwp -target-feature -xop -target-feature -rdseed -target-feature -ibt -target-f
eature -sse4a -target-feature -avx512bw -target-feature -clflushopt -target-feature +xsave -target-feature -avx512vbmi2 -target-feature -avx512vl -target-feature -avx512cd -t
arget-feature +avx -target-feature -vaes -target-feature -rtm -target-feature +fma -target-feature +bmi -target-feature +rdrnd -target-feature -mwaitx -target-feature +sse4.1
-target-feature +sse4.2 -target-feature +avx2 -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c -target-
feature +ssse3 -target-feature -sgx -target-feature -shstk -target-feature +cmov -target-feature -avx512vbmi -target-feature +movbe -target-feature +xsaveopt -target-feature
-avx512dq -target-feature -adx -target-feature -avx512pf -target-feature +sse3 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -resource-dir
/efs/tools/tapir-6/build/lib/clang/6.0.0 -c-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -cxx-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -interna
l-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4
.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../incl
ude/c++/5.4.1/backward -internal-isystem /usr/local/include -internal-isystem /efs/tools/tapir-6/build/lib/clang/6.0.0/include -internal-externc-isystem /usr/include/x86_64-l
inux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wall -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /efs/home/wheatman/extended
-csr/extended-csr2 -ferror-limit 19 -fmessage-length 174 -fcilkplus -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o /tmp/test2-a58efc.o -x c++ t
est2.cpp
<eof> parser at end of file
Code generation
Running pass 'Function Pass Manager' on module 'test2.cpp'.
Running pass 'Dominator Tree Construction' on function '@_ZN3OFM7convertEP5Graph.outline_.otd1'
clang-6.0: error: unable to execute command: Segmentation fault
clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 6.0.0 (https://github.com/wsmoses/Tapir-Clang.git 190c083a326a7bee7dcf773d3ddd3e2e9240b719) (https://github.com/wsmoses/Tapir-LLVM.git 065b7e7
6f144919cb77221)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /efs/tools/tapir-6/build/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang-6.0: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test2-7a40dd.cpp
clang-6.0: note: diagnostic msg: /tmp/test2-7a40dd.sh
clang-6.0: note: diagnostic msg:
make: *** [run] Error 254
test2-7a40dd.sh.txt
test2-7a40dd.cpp.txt
Hi! Is exiting a cilk_for via control-flow (break/return) supported? I've run into various issues trying to compile the following function.
#include "cilk/cilk.h"
int is_sorted(int *tab, int n) {
cilk_for (int i = 0; i < n - 1; i++) {
if (tab[i] > tab[i+1]) {
return i;
}
}
return -1;
}
Trying to compile without optimizations, I get the following error:
$ ~/src/Tapir-Meta/tapir/build/bin/clang -fcilkplus -c test.c
Found return instr that returns non-void in Function of void return type!
ret i32 %76
void
The error gets uglier after enabling optimizations:
$ ~/src/Tapir-Meta/tapir/build/bin/clang -O1 -fcilkplus -c test.c
Found return instr that returns non-void in Function of void return type!
ret i32 %37
voidtest.c:3:5: warning: Tapir loop not transformed: failed to use divide-and-conquer loop spawning
[-Wpass-failed=loop-spawning]
int is_sorted(int *tab, int n) {
^
#0 0x0000559e79e0301a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a301a)
#1 0x0000559e79e00dde llvm::sys::RunSignalHandlers() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a0dde)
#2 0x0000559e79e00f36 SignalHandler(int) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a0f36)
#3 0x00007f2bb2214d00 __restore_rt (/usr/lib/libpthread.so.0+0x13d00)
#4 0x0000559e79d6514c simplifyFunctionCFG(llvm::Function&, llvm::TargetTransformInfo const&, llvm::AssumptionCache*, int, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x120514c)
#5 0x0000559e79965e50 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05e50)
#6 0x0000559e79965ea1 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05ea1)
#7 0x0000559e79965576 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05576)
#8 0x0000559e79fe665d (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x148665d)
#9 0x0000559e79fe896b clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x148896b)
#10 0x0000559e7a8a4934 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1d44934)
#11 0x0000559e7abc40a9 clang::ParseAST(clang::Sema&, bool, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x20640a9)
#12 0x0000559e7a8a37e7 clang::CodeGenAction::ExecuteAction() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1d437e7)
#13 0x0000559e7a4292a6 clang::FrontendAction::Execute() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x18c92a6)
#14 0x0000559e7a3ef316 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x188f316)
#15 0x0000559e7a4db3c3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x197b3c3)
#16 0x0000559e791dcaa8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x67caa8)
#17 0x0000559e79187ded main (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x627ded)
#18 0x00007f2bb1a84ee3 __libc_start_main (/usr/lib/libc.so.6+0x26ee3)
#19 0x0000559e791dad1e _start (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x67ad1e)
Stack dump:
0. Program arguments: /home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/guatto/tmp/test.gcno -resource-dir /home/guatto/src/Tapir-Meta/tapir/build/lib/clang/5.0.0 -internal-isystem /usr/local/include -internal-isystem /home/guatto/src/Tapir-Meta/tapir/build/lib/clang/5.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O1 -fdebug-compilation-dir /home/guatto/tmp -ferror-limit 19 -fmessage-length 95 -fcilkplus -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c test.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'test.c'.
4. Running pass 'Simplify the CFG' on function '@is_sorted_.ls'
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 5.0.0 (https://github.com/wsmoses/Tapir-Clang 94b8db88cc38969262505a8b2942fb69c8fbacde) (https://github.com/wsmoses/Tapir-LLVM ba2f0eda34108ab64e581f2740b4d06eecc50709)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/guatto/src/Tapir-Meta/tapir/build/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to https://github.com/wsmoses/Tapir-LLVM/issues and include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/test-940b5d.c
clang-5.0: note: diagnostic msg: /tmp/test-940b5d.sh
clang-5.0: note: diagnostic msg:
********************
I've attached the files mentioned above in test-940b5d.zip.
As far as I see, the above crash is deterministic. Replacing return
with break
leads to non-deterministic, infrequent crashes.
int is_sorted(int *tab, int n) {
int tmp = -1;
cilk_for (int i = 0; i < n - 1; i++) {
if (tab[i] > tab[i+1]) {
tmp = i;
break;
}
}
return tmp;
}
The crash I sometimes get is:
$ clang -O1 -fcilkplus -c test.c
#0 0x00005580c3a5101a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a301a)
#1 0x00005580c3a4edde llvm::sys::RunSignalHandlers() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a0dde)
#2 0x00005580c3a4ef36 SignalHandler(int) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12a0f36)
#3 0x00007fd43603cd00 __restore_rt (/usr/lib/libpthread.so.0+0x13d00)
#4 0x00005580c35ed8e6 llvm::Use::getImpliedUser() const (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe3f8e6)
#5 0x00005580c35ed959 llvm::Use::getUser() const (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe3f959)
#6 0x00005580c3218239 llvm::PredIterator<llvm::BasicBlock, llvm::Value::user_iterator_impl<llvm::User> >::advancePastNonTerminators() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xa6a239)
#7 0x00005580c3b4e7e3 llvm::SimplifyCFG(llvm::BasicBlock*, llvm::TargetTransformInfo const&, unsigned int, llvm::AssumptionCache*, llvm::SmallPtrSetImpl<llvm::BasicBlock*>*, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x13a07e3)
#8 0x00005580c39b28c1 iterativelySimplifyCFG(llvm::Function&, llvm::TargetTransformInfo const&, llvm::AssumptionCache*, unsigned int, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x12048c1)
#9 0x00005580c39b2c71 simplifyFunctionCFG(llvm::Function&, llvm::TargetTransformInfo const&, llvm::AssumptionCache*, int, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1204c71)
#10 0x00005580c35b3e50 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05e50)
#11 0x00005580c35b3ea1 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05ea1)
#12 0x00005580c35b3576 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0xe05576)
#13 0x00005580c3c3465d (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x148665d)
#14 0x00005580c3c3696b clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x148896b)
#15 0x00005580c44f2934 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1d44934)
#16 0x00005580c48120a9 clang::ParseAST(clang::Sema&, bool, bool) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x20640a9)
#17 0x00005580c44f17e7 clang::CodeGenAction::ExecuteAction() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x1d437e7)
#18 0x00005580c40772a6 clang::FrontendAction::Execute() (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x18c92a6)
#19 0x00005580c403d316 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x188f316)
#20 0x00005580c41293c3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x197b3c3)
#21 0x00005580c2e2aaa8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x67caa8)
#22 0x00005580c2dd5ded main (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x627ded)
#23 0x00007fd4358acee3 __libc_start_main (/usr/lib/libc.so.6+0x26ee3)
#24 0x00005580c2e28d1e _start (/home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0+0x67ad1e)
Stack dump:
0. Program arguments: /home/guatto/src/Tapir-Meta/tapir/build/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/guatto/tmp/test.gcno -resource-dir /home/guatto/src/Tapir-Meta/tapir/build/lib/clang/5.0.0 -internal-isystem /usr/local/include -internal-isystem /home/guatto/src/Tapir-Meta/tapir/build/lib/clang/5.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O1 -fdebug-compilation-dir /home/guatto/tmp -ferror-limit 19 -fmessage-length 95 -fcilkplus -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c test.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'test.c'.
4. Running pass 'Simplify the CFG' on function '@is_sorted'
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 5.0.0 (https://github.com/wsmoses/Tapir-Clang 94b8db88cc38969262505a8b2942fb69c8fbacde) (https://github.com/wsmoses/Tapir-LLVM ba2f0eda34108ab64e581f2740b4d06eecc50709)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/guatto/src/Tapir-Meta/tapir/build/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to https://github.com/wsmoses/Tapir-LLVM/issues and include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/test-f1c94e.c
clang-5.0: note: diagnostic msg: /tmp/test-f1c94e.sh
clang-5.0: note: diagnostic msg:
********************
Here are the log files for this second crash.
My group has the following snippet in our quadtree implementation (quadtree.c:202-210
):
// Pairs of lines in this node
cilk_for (size_t i = 0; i < quadtree->num_lines; i++) {
cilk_for (size_t j = i + 1; j < quadtree->num_lines; j++) {
assert (i != j);
Line *l1 = quadtree->lines[i];
Line *l2 = quadtree->lines[j];
intersect_any_order(l1, l2, time_step, intersection_event_list);
}
}
The following output is produced, compiling with make DEBUG=1
and running on cqrun8
:
Compilation:
a2z@localhost:~/project2$ make -B DEBUG=1
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o intersection_event_list.o -c intersection_event_list.c
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o screensaver.o -c screensaver.c
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o vec.o -c vec.c
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o quadtree.o -c quadtree.c
Selecting successive spawn in place of DAC for recursive cilk_for in function quadtree_intersections|pfor.cond16
<no RPN>
%cmp = icmp ult i64 %4, %6, !dbg !145
<---->
pfor.cond: ; preds = %pfor.inc10, %entry
%4 = load i64, i64* %i, align 8, !dbg !141
%5 = load %struct.quadtree*, %struct.quadtree** %quadtree.addr, align 8, !dbg !143
%num_lines = getelementptr inbounds %struct.quadtree, %struct.quadtree* %5, i32 0, i32 3, !dbg !144
%6 = load i64, i64* %num_lines, align 8, !dbg !144
%cmp = icmp ult i64 %4, %6, !dbg !145
br i1 %cmp, label %pfor.detach, label %pfor.end12, !dbg !146
<---->
</no RPN>
no induction var
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o intersection_detection.o -c intersection_detection.c
clang -std=gnu99 -Wall -ftapir
[project2.tar.gz](https://github.com/wsmoses/Parallel-IR/files/544924/project2.tar.gz)
-g -O0 -gdwarf-3 -o collision_world.o -c collision_world.c
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o line_demo.o -c line_demo.c
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o graphic_stuff.o -c graphic_stuff.c
clang -lrt -lm -lcilkrts -lXext -lX11 -o screensaver intersection_event_list.o screensaver.o vec.o quadtree.o intersection_detection.o collision_world.o line_demo.o graphic_stuff.o
Execution:
a2z@localhost:~/project2$ cqrun8 ./screensaver 4000
6.172 Cloud Queue 2016 (8-cores, no hyperthreading)
Submitting Job: ./screensaver 4000
Waiting for job to finish...
==== Standard Error ====
./screensaver: /afs/csail/proj/courses/6.172/cilkplus-4_8-install/lib64/libcilkrts.so.5: no version information available (required by ./screensaver)
./screensaver: /afs/csail/proj/courses/6.172/cilkplus-4_8-install/lib64/libcilkrts.so.5: no version information available (required by ./screensaver)
screensaver: quadtree.c:205: void quadtree_intersections(const quadtree_t *const, IntersectionEventListReducer *): Assertion `i != j' failed.
screensaver: quadtree.c:205: void quadtree_intersections(const quadtree_t *const, IntersectionEventListReducer *): Assertion `i != j' failed.
screensaver: quadtree.c:205: void quadtree_intersections(const quadtree_t *const, IntersectionEventListReducer *): Assertion `i != j' failed.
/bin/bash: line 1: 75166 Aborted (core dumped) ./screensaver 4000
==== Standard Output ====
Number of frames = 4000
Input file path is: input/mit.in
tar: ./stdout: time stamp 2016-10-21 17:29:31 is 16.9355163 s in the future
tar: ./job_a2z_20161021T172852_66462_in.tar: time stamp 2016-10-21 17:29:31 is 16.8826354 s in the future
tar: ./stderr: time stamp 2016-10-21 17:29:31 is 16.3962651 s in the future
tar: .: time stamp 2016-10-21 17:29:31 is 16.3629695 s in the future
This problem does not occur if the body of the outer cilk_for
loop (i.e., the entirety of the inner cilk_for
loop) is extracted into a new function whose declaration is annotated with __attribute__((noinline))
.
Notice how this function calls some variant of getModRefInfo(I) for each non-sync instruction I contained within the detached CFG:
Tapir-LLVM/lib/Analysis/AliasAnalysis.cpp
Lines 487 to 526 in ba2f0ed
This includes calling getModRefInfo() on nested detaches, making this function (mutually) recursive (with getModRefInfo)! This is totally unnecessary: The (non-recursive) loop will already iterate through all instructions contained within the detached CFG region. Calling getModRefInfo() recursively on a nested detach will simply require redundantly iterating through all the instructions that are also within the nested detached CFG. If there are N levels of nested detaches, then the code within the innermost detach will be iterated through N times. In the worst case, calling getModRefInfo() on an outer detach can take quadratic time in the size of the detached region, and linear depth of recursive calls.
The right answer is probably to treat nested detaches just like nested syncs: they can just be ignored.
getModRefInfo(DetachInst *) should be able to compute it's result with a single linear pass over the detached region, and never needs to recursively call itself.
If I'm right, then fixing this will have the nice benefit of removing a case of nasty recursion that can cause a stack overflow on inputs with particularly deeply nested task structures, which I've been running into in some of my autoparallelization efforts.
I thought I'd open an issue to discuss progress towards up to date versions 6 and 7. stelleg:release_60 is current master rebased on llvm:release_60 that is failing 5 tapir-specific tests, 2 loop fusion and 3 parallel-for loop vectorization tests. Once I've figured those out, I'll make a PR, and start rebasing that branch on llvm:release_70. I used some of the work from tapir-llvm:release_60 and master-v6 to help fix some of the issues rebasing on llvm:release_60. tapir-llvm:release_60 seems to have diverged slightly, making rebasing off of it more difficult than llvm:release_60. Let me know if you want any logic from tapir-llvm:release_60 incorporated before I make the PR.
I was trying to test out the Tapir using the command line tools, and whenever I use llvm-dis
, I get the following error:
llvm-dis: error: Invalid record (Producer: 'LLVM5.0.0git-ec3ad2b' Reader: 'LLVM 5.0.0git-ec3ad2b')
I'm using version ec3ad2b, and using the following command to replicate it:
llvm-as nloop.ll -o=- | llvm-dis
The nloop.ll file is below:
declare token @llvm.syncregion.start() #3
declare void @print(i32)
define void @test (i32 %n) {
entry:
%i = alloca i32
store i32 0, i32* %i ; store it back
br label %loop.1.entry
loop.1.entry:
%tmp = load i32, i32* %i
%cmp = icmp ne i32 %tmp, %n
br i1 %cmp, label %loop.1.body, label %loop.1.exit
loop.1.body:
%syncreg = call token @llvm.syncregion.start()
detach within %syncreg, label %loop.1.body.1, label %loop.1.body.2
loop.1.body.1:
%tmp2 = load i32, i32* %i
call void @print(i32 %tmp2)
reattach within %syncreg, label %loop.1.body.2
loop.1.body.2:
%tmp3 = load i32, i32* %i
%tmp4 = add i32 %tmp3, 1 ; increment it
store i32 %tmp4, i32* %i ; store it back
br label %loop.1.final
loop.1.final:
sync within %syncreg, label %loop.1.entry
loop.1.exit:
ret void
}
During outlining, Tapir creates a new function name by concatenating the name of the original function with the name of the outlined block.
Tapir-LLVM/lib/Transforms/Tapir/Outline.cpp
Line 241 in 6817533
When compiling C++, the new name can no longer be demangled by tools like c++filt
, the additional characters break the format.
$ echo "_ZN10hybrid_bfs36top_down_step_with_migrating_threadsEv" | c++filt
hybrid_bfs::top_down_step_with_migrating_threads()
$ echo "_ZN10hybrid_bfs36top_down_step_with_migrating_threadsEv_if.end.i.i.i.i20.i.i.otd1" | c++filt
_ZN10hybrid_bfs36top_down_step_with_migrating_threadsEv_if.end.i.i.i.i20.i.i.otd1
Not sure what the fix is here, perhaps we can demangle, append, and remangle?
InstructionCombining
sinks any instruction it can if that instruction is only used in a single successor of it's current basic block:
Tapir-LLVM/lib/Transforms/InstCombine/InstructionCombining.cpp
Lines 2946 to 2955 in 2031611
This presents significant problems for me, when compiling Swarm tasks. Consider a task that starts out like
foo = a + b * c + d * e + f * g + ....;
spawn {
some_var = foo;
}
and assume all those variables a, b, c, d, etc. are local values held in registers, so in the Tapir SSA form, there are no memory operations here other than the store inside the task to the variable some_var, which is the only variable here that is not promoted to registers. This task will have a very tiny closure, containing the value tmp computed in the parent. This is very good for targets such as Swarm that efficiently support tasks with very small numbers of arguments.
But InstCombine
sees all the arithmetic instructions are used only inside the detached block and sinks the computation there, producing a task like
spawn {
some_var = a + b * c + d * e + f * g + ....;
}
Now this is a task with many inputs that need to be captured from its parent task and passed to the child task, in order for the child task to perform the arithmetic. This significantly increases the task overhead.
On the other hand, there are certainly cases where sinking instructions from a parent task to a child task is a good idea that shortens the critical path, so this seems like a problem where you'd want to come up with better heuristics to determine what instructions to sink (which, on the Swarm side of things, we've started to think about: https://github.mit.edu/swarm/Swarm-IR/blob/77c721b9f4bb279331daa4fd9ba12868fec75af3/lib/Transforms/Utils/SwarmUtils.cpp#L565-L586)
This is probably a much less important optimization issue for Tapir's compilation of Cilk tasks, which are at least usually a little coarser grained, compared to my compilation of Swarm tasks, which tend to be very fine grained and I legitimately frequently have tasks that store to a single location, so moving extra instructions around really affects task overheads which in turn can easily cause large changes in work efficiency. Nonetheless, I think this problem isn't fundamentally Swarm-specific. You can see my patch where I simply killed off instruction sinking through detaches here: https://github.mit.edu/swarm/Swarm-IR/commit/809027c0477795f1fe26f0b159426a8648321151
Compilation fails; tried debug and cilksan.
I received the following long output:
clang -std=gnu99 -Wall -ftapir -g -O0 -gdwarf-3 -o collision_world.o -c collision_world.c
clang: /home/ubuntu/Parallel-IR/include/llvm/Transforms/CilkABI.h:1131: bool llvm::cilk::populateDetachedCFG(const llvm::DetachInst&, llvm::DominatorTree&, llvm::SmallPtrSet<llvm::BasicBlock*, 32u>&, llvm::SmallVector<llvm::BasicBlock*, 32u>&, bool, bool): Assertion `term != &detach && "Found recursive detach!"' failed.
#0 0x00000000031e90e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000031e94a9 PrintStackTraceSignalHandler(void*) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:470:0
#2 0x00000000031e7814 llvm::sys::RunSignalHandlers() /home/ubuntu/Parallel-IR/lib/Support/Signals.cpp:44:0
#3 0x00000000031e8a78 SignalHandler(int) /home/ubuntu/Parallel-IR/lib/Support/Unix/Signals.inc:256:0
#4 0x00002b57888c2330 restore_rt (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00002b5789741c37 gsignal (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x36c37)
#6 0x00002b5789745028 abort (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x3a028)
#7 0x00002b578973abf6 (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x2fbf6)
#8 0x00002b578973aca2 (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x0000000003257ea5 llvm::cilk::populateDetachedCFG(llvm::DetachInst const&, llvm::DominatorTree&, llvm::SmallPtrSet<llvm::BasicBlock*, 32u>&, llvm::SmallVector<llvm::BasicBlock*, 32u>&, bool, bool) /home/ubuntu/Parallel-IR/include/llvm/Transforms/CilkABI.h:1132:0
#10 0x000000000325f095 (anonymous namespace)::Loop2Cilk::performDAC(llvm::Loop*, llvm::LPPassManager&) /home/ubuntu/Parallel-IR/lib/Transforms/Utils/Loop2Cilk.cpp:944:0
#11 0x00000000032604f7 (anonymous namespace)::Loop2Cilk::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/ubuntu/Parallel-IR/lib/Transforms/Utils/Loop2Cilk.cpp:1153:0
#12 0x000000000401d5e0 llvm::LPPassManager::runOnFunction(llvm::Function&) /home/ubuntu/Parallel-IR/lib/Analysis/LoopPass.cpp:198:0
#13 0x0000000002ccff10 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1522:0
#14 0x0000000002cd00a3 llvm::FPPassManager::runOnModule(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1543:0
#15 0x0000000002cd042f (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1599:0
#16 0x0000000002cd0b20 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1702:0
#17 0x0000000002cd0d61 llvm::legacy::PassManager::run(llvm::Module&) /home/ubuntu/Parallel-IR/lib/IR/LegacyPassManager.cpp:1734:0
#18 0x0000000003461d31 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/BackendUtil.cpp:730:0
#19 0x00000000034627ad clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/BackendUtil.cpp:820:0
#20 0x0000000003def400 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/CodeGenAction.cpp:195:0
#21 0x000000000484653a clang::ParseAST(clang::Sema&, bool, bool) /home/ubuntu/Parallel-IR/tools/clang/lib/Parse/ParseAST.cpp:169:0
#22 0x00000000039a77aa clang::ASTFrontendAction::ExecuteAction() /home/ubuntu/Parallel-IR/tools/clang/lib/Frontend/FrontendAction.cpp:559:0
#23 0x0000000003dee46a clang::CodeGenAction::ExecuteAction() /home/ubuntu/Parallel-IR/tools/clang/lib/CodeGen/CodeGenAction.cpp:868:0
#24 0x00000000039a7251 clang::FrontendAction::Execute() /home/ubuntu/Parallel-IR/tools/clang/lib/Frontend/FrontendAction.cpp:462:0
#25 0x0000000003958476 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/ubuntu/Parallel-IR/tools/clang/lib/Frontend/CompilerInstance.cpp:872:0
#26 0x0000000003ac10b8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/ubuntu/Parallel-IR/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:246:0
#27 0x000000000189bb22 cc1_main(llvm::ArrayRef<char const*>, char const, void) /home/ubuntu/Parallel-IR/tools/clang/tools/driver/cc1_main.cpp:181:0
#28 0x0000000001892125 ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/ubuntu/Parallel-IR/tools/clang/tools/driver/driver.cpp:299:0
#29 0x0000000001892bac main /home/ubuntu/Parallel-IR/tools/clang/tools/driver/driver.cpp:380:0
#30 0x00002b578972cf45 __libc_start_main (/afs/csail.mit.edu/proj/courses/6.172/tapir/otherlibs/lib/x86_64-linux-gnu/libc.so.6+0x21f45)
#31 0x000000000188fa79 _start (/afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/clang+0x188fa79)
Stack dump:
0. Program arguments: /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name collision_world.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=3 -debugger-tuning=gdb -coverage-file /afs/athena.mit.edu/user/k/e/kezilu/projects/project2/collision_world.o -resource-dir /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/../lib/clang/4.0.0 -I/usr/include/x86_64-linux-gnu/ -I/usr/include/x86_64-linux-gnu/ -internal-isystem /usr/local/include -internal-isystem /afs/csail.mit.edu/proj/courses/6.172/tapir-3.0/bin/../lib/clang/4.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wall -std=gnu99 -fdebug-compilation-dir /afs/athena.mit.edu/user/k/e/kezilu/projects/project2 -ferror-limit 19 -fmessage-length 145 -ftapir -fobjc-runtime=gcc -fdiagnostics-show-option -o collision_world.o -x c collision_world.c
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/collision_world-fbc1b1.c
clang: note: diagnostic msg: /tmp/collision_world-fbc1b1.sh
clang: note: diagnostic msg:
make: *** [collision_world.o] Error 254
Hello,
I tried to follow the steps on Cilk Hub (http://cilk.mit.edu/download/) to install Tapir/LLVM compiler on Ubantu 14.04.1, but when I was running command "cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BINUTILS_INCDIR=/usr/include .." to build Tapir/LLVM, it showed that "The snappy compression library is required to build Cilksan". Under such situations, I tried to download the source code of snappy (https://github.com/google/snappy ) and use cmake command to build it. Unfortunately, after snappy had been built successfully, the same error was still there. Could you please give me some suggestions to fix this issue?
Thank you very much for your help. Look forward to you reply.
Bests,
Lin
I'm in the process of merging all the changes that have been made in Tapir's master
since March into my Swarm compiler project, and I notice special handling of exit blocks that might have something to do with C++ exceptions was added in late April. In particular, I notice CloneIntoFunction()
and CreateHelper()
now have an ExitBlocks
argument, which defaults to nullptr
in the declaration in include/llvm/Transforms/Tapir/Outline.h. However, CloneIntoFunction()
always tries to dereference it at the start of the function, without checking if it is null:
https://github.com/wsmoses/Parallel-IR/blob/ce8d1893a0e20842b28ab7561b8e8c6c3e1a051c/lib/Transforms/Tapir/Outline.cpp#L95
so using the default value of nullptr
just causes errors. It seems to me that either:
1.) CloneIntoFunction()
should check if ExitBlocks
is null before dereferencing it, or
2.) The ExitBlocks
argument must be non-null, so the default value of nullptr
should be removed, perhaps replaced with defaulting to an empty set instead.
I have implemented option 1 in my repo, and would be interested in seeing a similar change in Tapir's master
to keep the diff between my repo and Tapir small.
Hi,
Greeting from me!
I follow Quick start to build the Tapir-LLVM
on Arch Linux
successfully. Then I write a simple program:
$ cat test.c
#include <stdio.h>
#include <cilk/cilk.h>
int fib(int n) {
if (n < 2) return n;
int x, y;
x = cilk_spawn fib(n - 1);
y = fib(n - 2);
cilk_sync;
return x + y;
}
int main(void)
{
printf("%d\n", fib(100));
return 0;
}
But it reports a link error:
$ clang -fcilkplus test.c
/usr/bin/ld: cannot find -lcilkrts
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
After using -v
option:
$ clang -v -fcilkplus test.c
clang version 5.0.0 (https://github.com/wsmoses/Cilk-Clang 9e81b3be8a7749cb8feea3f6bad30df9b7ba1e75) (https://github.com/wsmoses/Parallel-IR 4ccec4566bf6d847c26c8e8d1af3ec378cc262f5)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/xiaonan/Tapir-Meta/tapir/build/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1
Selected GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
"/home/xiaonan/Tapir-Meta/tapir/build/bin/clang-5.0" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb -resource-dir /home/xiaonan/Tapir-Meta/tapir/build/lib/clang/5.0.0 -internal-isystem /usr/local/include -internal-isystem /home/xiaonan/Tapir-Meta/tapir/build/lib/clang/5.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/xiaonan -ferror-limit 19 -fmessage-length 121 -fcilkplus -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/test-1711bf.o -x c test.c
clang -cc1 version 5.0.0 based upon LLVM 5.0.0git-4ccec4566bf default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/home/xiaonan/Tapir-Meta/tapir/build/lib/clang/5.0.0/include
/usr/include
End of search list.
"/usr/bin/ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/crtbegin.o -L/usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1 -L/usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../.. -L/home/xiaonan/Tapir-Meta/tapir/build/bin/../lib -L/lib -L/usr/lib /tmp/test-1711bf.o -lcilkrts -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/crtend.o /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib64/crtn.o
/usr/bin/ld: cannot find -lcilkrts
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
There is indeed no libcilkrts
in the lib
directory:
$ ls /home/xiaonan/Tapir-Meta/tapir/build/bin/../lib/libci*
ls: cannot access '/home/xiaonan/Tapir-Meta/tapir/build/bin/../lib/libci*': No such file or directory
Does I miss something? Thanks very much in advance!
Best Regards
Nan Xiao
/efs/2018-tapir/Tapir-LLVM/projects/compiler-rt/lib/cilkscale/csanrt.c:106:7: error: โforโ loop initia
l declarations are only allowed in C99 mode
for (int i = 0; i < table->num_entries; ++i)
Note: after talking with TB I realize that an attempt was made to fix this bug. But it does not appear to have worked. I'm compiling with gcc 4.8.5
When I compile the code found in https://github.com/wheatman/extended-csr/tree/tapir_crash
with ./setup.sh clang++ test2.cpp I get a compiler crash instead of just gracefully failing with a message that I have cilk_api calls without cilk
My version is
clang version 6.0.0 (https://github.com/wsmoses/Tapir-Clang.git 190c083a326a7bee7dcf773d3ddd3e2e9240b719) (https://github.com/wsmoses/Tapir-LLVM.git 065b7e7
1c6f144919cb77221)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /efs/tools/tapir-6/build/bin
In file included from test2.cpp:18:
In file included from ./OFM.cpp:2:
In file included from ./helpers.h:4:
/efs/tools/tapir-6/build/lib/clang/6.0.0/include/cilk/cilk_api.h:59:9: warning: Cilk API is being used with non-Cilk compiler (or Cilk is disabled) [-W#warnings]
^
#0 0x000000000152cbda llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152cbda)
#1 0x000000000152ae2e llvm::sys::RunSignalHandlers() (/efs/tools/tapir-6/build/bin/clang-6.0+0x152ae2e)
#2 0x000000000152af6a SignalHandler(int) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152af6a)
#3 0x00007fa64b5a1330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007fa64a588d1c cfree /build/eglibc-oGUzwX/eglibc-2.19/malloc/malloc.c:2929:0
#5 0x0000000001d678a8 llvm::SelectionDAGBuilder::visitInvoke(llvm::InvokeInst const&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1d678a8)
#6 0x0000000001d6dcbc llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1d6dcbc)
#7 0x0000000001da2614 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, bool&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1da2614)
#8 0x0000000001da9c66 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1da9c66)
#9 0x0000000001dac2ab llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone .part.964] (/efs/tools/tapir-6/build/bin/clang-6.0+0x1dac2ab)
#10 0x0000000000ae1d84 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/efs/tools/tapir-6/build/bin/clang-6.0+0xae1d84)
#11 0x0000000000e6b127 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/efs/tools/tapir-6/build/bin/clang-6.0+0xe6b127)
#12 0x00000000011417da llvm::FPPassManager::runOnFunction(llvm::Function&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x11417da)
#13 0x0000000001141873 llvm::FPPassManager::runOnModule(llvm::Module&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1141873)
#14 0x00000000011421c0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x11421c0)
#15 0x00000000016c9961 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/efs/tools/tapir-6/build/bin/clang-6.0+0x16c9961)
#16 0x00000000016cb597 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/efs/tools/tapir-6/build/bin/clang-6.0+0x16cb597)
#17 0x0000000001e587ab clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e587ab)
#18 0x0000000002025542 clang::ParseAST(clang::Sema&, bool, bool) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2025542)
#19 0x0000000001e58014 clang::CodeGenAction::ExecuteAction() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e58014)
#20 0x0000000001a5fbfe clang::FrontendAction::Execute() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a5fbfe)
#21 0x0000000001a37d6d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a37d6d)
#22 0x0000000001aeb2c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1aeb2c4)
#23 0x0000000000a75c98 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/efs/tools/tapir-6/build/bin/clang-6.0+0xa75c98)
#24 0x0000000000a12401 main (/efs/tools/tapir-6/build/bin/clang-6.0+0xa12401)
#25 0x00007fa64a527f45 __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#26 0x0000000000a71357 _start (/efs/tools/tapir-6/build/bin/clang-6.0+0xa71357)
Stack dump:
0. Program arguments: /efs/tools/tapir-6/build/bin/clang-6.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test2.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -resource-dir /efs/tools/tapir-6/build/lib/clang/6.0.0 -c-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -cxx-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1/backward -internal-isystem /usr/local/include -internal-isystem /efs/tools/tapir-6/build/lib/clang/6.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /efs/home/wheatman/extended-csr -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o /tmp/test2-dbef85.o -x c++ test2.cpp
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test2-f186e0.cpp
clang-6.0: note: diagnostic msg: /tmp/test2-f186e0.sh
clang-6.0: note: diagnostic msg:
A continue in a cilk for causes a recursive detach and compiler crash
The source code below causes the crash:
#include <stdio.h>
#include <cilk/cilk.h>
int main() {
cilk_for(int i=0; i<10; i++) {
if (i%2==0) break;
printf("%d\n", i);
}
}
The following command was run to cause the bug
wmoses@tardis:/mnt/files/git/Parallel-IR/Parallel-IR-Tests$ ~/git/Parallel-IR/build/bin/clang continue.c -ftapir -O3
clang-3.8: /home/wmoses/git/Parallel-IR/include/llvm/Transforms/CilkABI.h:1131: bool llvm::cilk::populateDetachedCFG(const llvm::DetachInst&, llvm::DominatorTree&, llvm::SmallPtrSet<llvm::BasicBlock*, 32u>&, llvm::SmallVector<llvm::BasicBlock*, 32u>&, bool, bool): Assertion `term != &detach && "Found recursive detach!"' failed.
When building the cilk version of a simple finite elements application: https://mantevo.org/downloads/miniFE_2.0.1.html
Have done a small amount of digging, but thought I'd submit an issue in case the fix is obvious to someone else. I'll keep digging in the meantime.
Error output:
In file included from main.cpp:47:
./driver.hpp:125:1: warning: Tapir loop not transformed: failed to use divide-and-conquer loop spawning [-Wpass-failed=loop-spawning]
driver(const Box& global_box, Box& my_box,
^
./driver.hpp:125:1: warning: Tapir loop not transformed: failed to use divide-and-conquer loop spawning [-Wpass-failed=loop-spawning]
clang-5.0: /home/george/tasks/tapir/parallel-ir/lib/Transforms/Tapir/LoopSpawning.cpp:1226: virtual bool {anonymous}::DACLoopSpawning::processLoop(): Assertion `Returns.empty() && "Returns cloned when cloning loop."' failed.
#0 0x0000560f2563968f llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/george/tasks/tapir/parallel-ir/lib/Support/Unix/Signals.inc:398:0
#1 0x0000560f25639722 PrintStackTraceSignalHandler(void*) /home/george/tasks/tapir/parallel-ir/lib/Support/Unix/Signals.inc:462:0
#2 0x0000560f25637955 llvm::sys::RunSignalHandlers() /home/george/tasks/tapir/parallel-ir/lib/Support/Signals.cpp:49:0
#3 0x0000560f25638efb SignalHandler(int) /home/george/tasks/tapir/parallel-ir/lib/Support/Unix/Signals.inc:252:0
#4 0x00007fd26b932da0 __restore_rt (/usr/lib/libpthread.so.0+0x11da0)
#5 0x00007fd26a464860 __GI_raise (/usr/lib/libc.so.6+0x34860)
#6 0x00007fd26a465ec9 __GI_abort (/usr/lib/libc.so.6+0x35ec9)
#7 0x00007fd26a45d0bc __assert_fail_base (/usr/lib/libc.so.6+0x2d0bc)
#8 0x00007fd26a45d133 (/usr/lib/libc.so.6+0x2d133)
#9 0x0000560f26698ab3 (anonymous namespace)::DACLoopSpawning::processLoop() /home/george/tasks/tapir/parallel-ir/lib/Transforms/Tapir/LoopSpawning.cpp:1226:0
#10 0x0000560f2669b598 (anonymous namespace)::LoopSpawningImpl::processLoop(llvm::Loop*) /home/george/tasks/tapir/parallel-ir/lib/Transforms/Tapir/LoopSpawning.cpp:1686:0
#11 0x0000560f2669adf3 (anonymous namespace)::LoopSpawningImpl::run() /home/george/tasks/tapir/parallel-ir/lib/Transforms/Tapir/LoopSpawning.cpp:1627:0
#12 0x0000560f2669bda3 (anonymous namespace)::LoopSpawning::runOnFunction(llvm::Function&) /home/george/tasks/tapir/parallel-ir/lib/Transforms/Tapir/LoopSpawning.cpp:1818:0
#13 0x0000560f24f1f99a llvm::FPPassManager::runOnFunction(llvm::Function&) /home/george/tasks/tapir/parallel-ir/lib/IR/LegacyPassManager.cpp:1514:0
#14 0x0000560f24f1fb3f llvm::FPPassManager::runOnModule(llvm::Module&) /home/george/tasks/tapir/parallel-ir/lib/IR/LegacyPassManager.cpp:1535:0
#15 0x0000560f24f1fec7 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/george/tasks/tapir/parallel-ir/lib/IR/LegacyPassManager.cpp:1591:0
#16 0x0000560f24f205f1 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/george/tasks/tapir/parallel-ir/lib/IR/LegacyPassManager.cpp:1694:0
#17 0x0000560f24f207e9 llvm::legacy::PassManager::run(llvm::Module&) /home/george/tasks/tapir/parallel-ir/lib/IR/LegacyPassManager.cpp:1726:0
#18 0x0000560f258e5b09 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/george/tasks/tapir/parallel-ir/tools/clang/lib/CodeGen/BackendUtil.cpp:842:0
#19 0x0000560f258e7d2a clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/george/tasks/tapir/parallel-ir/tools/clang/lib/CodeGen/BackendUtil.cpp:1192:0
#20 0x0000560f264369c3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/george/tasks/tapir/parallel-ir/tools/clang/lib/CodeGen/CodeGenAction.cpp:261:0
#21 0x0000560f271abe80 clang::ParseAST(clang::Sema&, bool, bool) /home/george/tasks/tapir/parallel-ir/tools/clang/lib/Parse/ParseAST.cpp:161:0
#22 0x0000560f25f3a6fb clang::ASTFrontendAction::ExecuteAction() /home/george/tasks/tapir/parallel-ir/tools/clang/lib/Frontend/FrontendAction.cpp:1003:0
#23 0x0000560f26434784 clang::CodeGenAction::ExecuteAction() /home/george/tasks/tapir/parallel-ir/tools/clang/lib/CodeGen/CodeGenAction.cpp:993:0
#24 0x0000560f25f3a13e clang::FrontendAction::Execute() /home/george/tasks/tapir/parallel-ir/tools/clang/lib/Frontend/FrontendAction.cpp:906:0
#25 0x0000560f25ed6e38 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/george/tasks/tapir/parallel-ir/tools/clang/lib/Frontend/CompilerInstance.cpp:981:0
#26 0x0000560f260850f8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/george/tasks/tapir/parallel-ir/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:251:0
#27 0x0000560f2358dca3 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/george/tasks/tapir/parallel-ir/tools/clang/tools/driver/cc1_main.cpp:221:0
#28 0x0000560f23582e5c ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/george/tasks/tapir/parallel-ir/tools/clang/tools/driver/driver.cpp:306:0
#29 0x0000560f23583a38 main /home/george/tasks/tapir/parallel-ir/tools/clang/tools/driver/driver.cpp:387:0
#30 0x00007fd26a450f4a __libc_start_main (/usr/lib/libc.so.6+0x20f4a)
#31 0x0000560f2358053a _start (/home/george/tasks/tapir/build/bin/clang-5.0+0x1b6a53a)
Stack dump:
0. Program arguments: /home/george/tasks/tapir/build/bin/clang-5.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name main.cpp -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/george/tasks/mantevo/miniFE/miniFE-2.0_cilk/src/main.gcno -resource-dir /home/george/tasks/tapir/build/lib/clang/5.0.0 -I . -I ../utils -I ../fem -D MINIFE_SCALAR=double -D MINIFE_LOCAL_ORDINAL=int -D MINIFE_GLOBAL_ORDINAL=int -D MINIFE_CSR_MATRIX -D MINIFE_INFO=1 -D MINIFE_KERNELS=0 -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1 -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/x86_64-pc-linux-gnu -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/backward -internal-isystem /usr/local/include -internal-isystem /home/george/tasks/tapir/build/lib/clang/5.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -fdeprecated-macro -fdebug-compilation-dir /home/george/tasks/mantevo/miniFE/miniFE-2.0_cilk/src -ferror-limit 19 -fmessage-length 138 -ftapir=cilk -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o main.o -x c++ main.cpp
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'main.cpp'.
4. Running pass 'Loop Spawning' on function '@_ZN6miniFE25generate_matrix_structureINS_9CSRMatrixIdiiEEEEiRKNS_23simple_mesh_descriptionINT_17GlobalOrdinalTypeEEERS4_'
clang-5.0: error: unable to execute command: Aborted (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 5.0.0 ([email protected]:wsmoses/cilk-clang f81bbab46561384a0709c399c4cb0df9e4a3080b) ([email protected]:wsmoses/Parallel-IR.git f9d48f08baf80738b1501aa492df9b8dbd1521e6)
Target: x86_64-unknown-linux-gnu
Thread model: posix
I'm implementing Tapir lowering for a new backend. Found a case where the Global Value Numbering (GVN) optimization breaks my code by hoisting a load above a lowered call to cilk_sync
. I see there is Tapir-specific code in the GVN pass to block this optimization when a load depends on a detach. For example, this block of code activates when GVN runs before Tapir lowering:
Tapir-LLVM/lib/Transforms/Scalar/GVN.cpp
Lines 1335 to 1347 in 9fa482d
In my case, GVN runs again after lowering, and by this point there's nothing special about the sync or detach blocks. What constraint is supposed to prevent this? Or is it just not safe to do GVN after lowering?
Probably you would like to see an example, will post later.
The code can be found at https://github.com/wheatman/extended-csr/tree/another_issue
make clean; make should cause the issue
I am still running on aws0 and I am not sure if Tim updated with the past fixes so this might already be fixed.
The change in the code that cause the issue was
adding the cilk_spawn and cilk_sync to
cilk_spawn memset((void*)&vals[new_N/2], 0, new_N*2);
memset((void*)&dests[new_N/2], NULL_VAL, new_N*2);
cilk_sync;
The error message is as follows
#0 0x000000000152cbda llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152cbda)
#1 0x000000000152ae2e llvm::sys::RunSignalHandlers() (/efs/tools/tapir-6/build/bin/clang-6.0+0x152ae2e)
#2 0x000000000152af6a SignalHandler(int) (/efs/tools/tapir-6/build/bin/clang-6.0+0x152af6a)
#3 0x00002acbb07f8330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00000000017fdf1f clang::CodeGen::CodeGenFunction::DetachScope::FinishDetach() (/efs/tools/tapir-6/build/bin/clang-6.0+0x17fdf1f)
#5 0x00000000017fe7c1 clang::CodeGen::CodeGenFunction::EmitCilkSpawnStmt(clang::CilkSpawnStmt const&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x17fe7c1)
#6 0x00000000017029ec clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/efs/tools/tapir-6/build/bin/clang-6.0+0x17029ec)
#7 0x0000000001702e53 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1702e53)
#8 0x000000000173733e clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&, clang::Stmt const*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x173733e)
#9 0x00000000017417b0 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x17417b0)
#10 0x000000000175de68 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x175de68)
#11 0x000000000176e494 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x176e494)
#12 0x000000000176f330 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/efs/tools/tapir-6/build/bin/clang-6.0+0x176f330)
#13 0x000000000176fbc5 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) [clone .part.5223] (/efs/tools/tapir-6/build/bin/clang-6.0+0x176fbc5)
#14 0x0000000001e59b53 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e59b53)
#15 0x0000000001e53801 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e53801)
#16 0x0000000002025496 clang::ParseAST(clang::Sema&, bool, bool) (/efs/tools/tapir-6/build/bin/clang-6.0+0x2025496)
#17 0x0000000001e58014 clang::CodeGenAction::ExecuteAction() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1e58014)
#18 0x0000000001a5fbfe clang::FrontendAction::Execute() (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a5fbfe)
#19 0x0000000001a37d6d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1a37d6d)
#20 0x0000000001aeb2c4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/efs/tools/tapir-6/build/bin/clang-6.0+0x1aeb2c4)
#21 0x0000000000a75c98 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/efs/tools/tapir-6/build/bin/clang-6.0+0xa75c98)
#22 0x0000000000a12401 main (/efs/tools/tapir-6/build/bin/clang-6.0+0xa12401)
#23 0x00002acbb16edf45 __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#24 0x0000000000a71357 _start (/efs/tools/tapir-6/build/bin/clang-6.0+0xa71357)
Stack dump:
0. Program arguments: /efs/tools/tapir-6/build/bin/clang-6.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -flto -flto-unit -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test_no_locks.cpp -static-define -mrelocation-model static -mthread-model posix -menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros -mreassociate -freciprocal-math -fno-trapping-math -ffp-contract=fast -ffast-math -ffinite-math-only -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu haswell -target-feature +sse2 -target-feature +cx16 -target-feature -tbm -target-feature -avx512ifma -target-feature -gfni -target-feature -sha -target-feature -fma4 -target-feature -vpclmulqdq -target-feature -prfchw -target-feature +bmi2 -target-feature -xsavec -target-feature +fsgsbase -target-feature +popcnt -target-feature +aes -target-feature -avx512bitalg -target-feature -xsaves -target-feature -avx512er -target-feature -avx512vnni -target-feature -avx512vpopcntdq -target-feature -clwb -target-feature -avx512f -target-feature -clzero -target-feature -pku -target-feature +mmx -target-feature -lwp -target-feature -xop -target-feature -rdseed -target-feature -ibt -target-feature -sse4a -target-feature -avx512bw -target-feature -clflushopt -target-feature +xsave -target-feature -avx512vbmi2 -target-feature -avx512vl -target-feature -avx512cd -target-feature +avx -target-feature -vaes -target-feature -rtm -target-feature +fma -target-feature +bmi -target-feature +rdrnd -target-feature -mwaitx -target-feature +sse4.1 -target-feature +sse4.2 -target-feature +avx2 -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -prefetchwt1 -target-feature +f16c -target-feature +ssse3 -target-feature -sgx -target-feature -shstk -target-feature +cmov -target-feature -avx512vbmi -target-feature +movbe -target-feature +xsaveopt -target-feature -avx512dq -target-feature -adx -target-feature -avx512pf -target-feature +sse3 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /efs/tools/tapir-6/build/lib/clang/6.0.0 -c-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -cxx-isystem /efs/tools/tapir-6/build/lib/clang/5.0.0/include/ -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/x86_64-linux-gnu/c++/5.4.1 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1/backward -internal-isystem /usr/local/include -internal-isystem /efs/tools/tapir-6/build/lib/clang/6.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /efs/home/wheatman/extended-csr -ferror-limit 19 -fmessage-length 0 -fcilkplus -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /tmp/test_no_locks-e983a5.o -x c++ test_no_locks.cpp
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test_no_locks-b17b09.cpp
clang-6.0: note: diagnostic msg: /tmp/test_no_locks-b17b09.sh
clang-6.0: note: diagnostic msg:
make[1]: *** [.run.cilkscale] Error 254
make[1]: *** Waiting for unfinished jobs....
clang-6.0: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/test_no_locks-f6363a.cpp
clang-6.0: note: diagnostic msg: /tmp/test_no_locks-f6363a.sh
clang-6.0: note: diagnostic msg:
make[1]: *** [run] Error 254
make: *** [all] Error 2
After manually in-lining a single function inside of a cilk_for loop the compiler no longer terminates.
The code can be found here https://github.com/wheatman/extended-csr/tree/compilier-spin
If you change OFM.cpp: 1615 - 1660 to add_edge_update_fast
Which is the same thing just in its own function with a no inline attribute then the compiler will terminate with correct results.
Note look at CPack in LLVM and integrate with GH actions for macos/linux.
In extractDetachBodyToFunction()
, early on, the reattaches for the current detach are changed to branches:
Tapir-LLVM/lib/Transforms/Tapir/TapirUtils.cpp
Lines 258 to 263 in 1482504
ReattachInst
s for determining the exit points of the task needed for a call to MoveStaticAllocasInBlock()
:Tapir-LLVM/lib/Transforms/Tapir/TapirUtils.cpp
Lines 352 to 366 in 1482504
ReattachPoints
will always be empty. Surely this is not what is intended? It seems there aren't any tests that verify whether this call to MoveStaticAllocasInBlock()
actually performs all its intended effects.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.