Open Quuxplusone opened 3 years ago
Bugzilla Link | PR50518 |
Status | REOPENED |
Importance | P enhancement |
Reported by | haijunz (haijunz@sina.com) |
Reported on | 2021-05-28 05:50:41 -0700 |
Last modified on | 2021-05-28 20:36:20 -0700 |
Version | unspecified |
Hardware | PC Linux |
CC | llvm-bugs@lists.llvm.org, llvm@meinersbur.de |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Thank you for the report.
However, it gives the reason for the crash:
Reading JScop '%for.cond1.preheader---%for.end19' in function 'init_array' from './init_array___%for.cond1.preheader---%for.end19.jscop.interchanged'
File could not be read: No such file or directory
If you are trying to run certain regression tests manually, either ensure that you are in the same current directory, or copy the json files over from where you are running it.
JSON import is primarily intended for testing, it does not necessarily degrade gracefully when something goes wrong (malformed or not existing).
Hello Michael:
Thank you for this . the root cuase is :how to generate
"main___%for.cond1.preheader---%for.end30.jscop.interchanged"
It seems no problem if you run under folder "
https://github.com/llvm/llvm-project/tree/main/polly/docs/experiments/matmul",
that is becuase someone already generated " main___%for.cond1.preheader---
%for.end30.jscop.interchanged" here .
how to reproduce :
(1) but if you create new folder and just has "matmul.c" without other files ,
this is how customer/polly user will to do .
Then you follow " How to manually use the Individual pieces of Polly"
(https://polly.llvm.org/docs/HowToManuallyUseTheIndividualPiecesOfPolly.html#execute-the-individual-polly-passes-manually)
or
(2) "rm main*; rm init* ;rm *.ll" and run "https://github.com/llvm/llvm-
project/blob/main/polly/docs/experiments/matmul/runall.sh" in this folder
You will find problem still exists. This is fundenmatal issue need to solve .
Thanks,
Haijun
same issue with " how to generate './init_array___%for.cond1.preheader---
%for.end19.jscop.interchanged" ?
Becuase someone already generate it and upload at folder :
https://github.com/llvm/llvm-project/tree/main/polly/docs/experiments/matmul"
if you remove it before run " opt -basic-aa -polly-import-jscop -polly-ast -
analyze matmul.preopt.ll -polly-import-jscop-postfix=interchanged -polly-
process-unprofitable -polly-use-llvm-names" . Problem still exists.
(base) haijunz3@haijunz3:~/polly/llvm_git/polly/docs/experiments/matmul$ rm
init_array___%for.cond1.preheader---%for.end19.jscop.interchanged
(base) haijunz3@haijunz3:~/polly/llvm_git/polly/docs/experiments/matmul$ opt -
basic-aa -polly-import-jscop -polly-ast -analyze matmul.preopt.ll -polly-import-
jscop-postfix=interchanged -polly-process-unprofitable -polly-use-llvm-names
Printing analysis 'Basic Alias Analysis (stateless AA impl)' for function
'init_array':
Pass::print not implemented for pass: 'Basic Alias Analysis (stateless AA
impl)'!
Printing analysis 'Polly - Import Scops from JSON (Reads a .jscop file for each
Scop)' for region: 'for.body3 => for.inc17' in function 'init_array':
Printing analysis 'Polly - Generate an AST from the SCoP (isl)' for region:
'for.body3 => for.inc17' in function 'init_array':
Reading JScop '%for.cond1.preheader---%for.end19' in function 'init_array' from
'./init_array___%for.cond1.preheader---%for.end19.jscop.interchanged'.
File could not be read: No such file or directory
LLVM ERROR: Tried to import a malformed jscop file.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: opt -basic-aa -polly-import-jscop -polly-ast -analyze
matmul.preopt.ll -polly-import-jscop-postfix=interchanged -polly-process-
unprofitable -polly-use-llvm-names
1. Running pass 'Function Pass Manager' on module 'matmul.preopt.ll'.
2. Running pass 'Region Pass Manager' on function '@init_array'
3. Running pass 'Polly - Import Scops from JSON (Reads a .jscop file for each
Scop)' on basic block '%for.cond1.preheader'
#0 0x000055b0a2c211e6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/haijunz3/polly/llvm_git/llvm/lib/Support/Unix/Signals.inc:565:0
#1 0x000055b0a2c2129d PrintStackTraceSignalHandler(void*) /home/haijunz3/polly/llvm_git/llvm/lib/Support/Unix/Signals.inc:632:0
#2 0x000055b0a2c1ef51 llvm::sys::RunSignalHandlers() /home/haijunz3/polly/llvm_git/llvm/lib/Support/Signals.cpp:76:0
#3 0x000055b0a2c20b67 SignalHandler(int) /home/haijunz3/polly/llvm_git/llvm/lib/Support/Unix/Signals.inc:407:0
#4 0x00007f7b6adee980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#5 0x00007f7b69a9ffb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007f7b69aa1921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#7 0x000055b0a2b5704b llvm::install_bad_alloc_error_handler(void (*)(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool), void*) /home/haijunz3/polly/llvm_git/llvm/lib/Support/ErrorHandling.cpp:130:0
#8 0x000055b0a2b56e07 llvm::report_fatal_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) /home/haijunz3/polly/llvm_git/llvm/lib/Support/ErrorHandling.cpp:86:0
#9 0x000055b0a384d89d (anonymous namespace)::JSONImporter::runOnScop(polly::Scop&) /home/haijunz3/polly/llvm_git/polly/lib/Exchange/JSONExporter.cpp:784:0
#10 0x000055b0a382e5df polly::ScopPass::runOnRegion(llvm::Region*,
llvm::RGPassManager&)
/home/haijunz3/polly/llvm_git/polly/lib/Analysis/ScopPass.cpp:33:0
#11 0x000055b0a1625b55 llvm::RGPassManager::runOnFunction(llvm::Function&)
/home/haijunz3/polly/llvm_git/llvm/lib/Analysis/RegionPass.cpp:98:0
#12 0x000055b0a2093e12 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/haijunz3/polly/llvm_git/llvm/lib/IR/LegacyPassManager.cpp:1439:0
#13 0x000055b0a20940bb llvm::FPPassManager::runOnModule(llvm::Module&)
/home/haijunz3/polly/llvm_git/llvm/lib/IR/LegacyPassManager.cpp:1485:0
#14 0x000055b0a20944e3 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/haijunz3/polly/llvm_git/llvm/lib/IR/LegacyPassManager.cpp:1554:0
#15 0x000055b0a208f5af llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/haijunz3/polly/llvm_git/llvm/lib/IR/LegacyPassManager.cpp:542:0
#16 0x000055b0a2094d6d llvm::legacy::PassManager::run(llvm::Module&)
/home/haijunz3/polly/llvm_git/llvm/lib/IR/LegacyPassManager.cpp:1682:0
#17 0x000055b09f955965 main
/home/haijunz3/polly/llvm_git/llvm/tools/opt/opt.cpp:1069:0
#18 0x00007f7b69a82bf7 __libc_start_main /build/glibc-S9d2JN/glibc-
2.27/csu/../csu/libc-start.c:344:0
#19 0x000055b09f918dfa _start
(/home/haijunz3/polly/llvm_build/bin/opt+0x1f8cdfa)
Aborted (core dumped)
(base) haijunz3@haijunz3:~/polly/llvm_git/polly/docs/experiments/matmul$
Thanks,
Haijun