<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I'm trying to autotune a good sequence of IR optimization passes and I seem to run into segfaults in opt (in LLVM5) with certain pass orderings. </div><div class=""><br class=""></div><div class="">Is this expected behavior? If so, what would be the recommended way of determining pass dependencies so that I can encode them into the tuner?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The test program can be found here: <a href="https://gist.github.com/kavon/92d153cdd54ce9b77162af3af47d4c95" class="">https://gist.github.com/kavon/92d153cdd54ce9b77162af3af47d4c95</a> </div><div class=""><br class=""></div><div class="">Here's what happens:</div><div class=""><pre style="word-wrap: break-word; white-space: pre-wrap;" class="">kavon@cronus:~/m/autotune|master⚡*?
➤ /Users/kavon/msr/llvm5/bin/opt -inline -mem2reg -inferattrs -ipconstprop -gvn -simplifycfg -bdce -sink -dse -adce -instcombine -early-cse-memssa -early-cse-memssa -dse -adce -simplifycfg -sink -ipconstprop -gvn -bdce -instcombine -jump-threading -inline -sroa ./src/apps/raytracer.bc -o ./out/raytracer_opt1043.bc
0 opt 0x000000010ebd4498 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 opt 0x000000010ebd4a46 SignalHandler(int) + 342
2 libsystem_platform.dylib 0x00007fff8ce5352a _sigtramp + 26
3 opt 0x000000010eb8ef4f llvm::StringMapImpl::FindKey(llvm::StringRef) const + 303
4 opt 0x000000010e770235 llvm::PMDataManager::add(llvm::Pass*, bool) + 917
5 opt 0x000000010e76d6ef llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 2367
6 opt 0x000000010d755c9e main + 8846
7 libdyld.dylib 0x00007fff8c0c85ad start + 1
8 libdyld.dylib 0x000000000000001c start + 1945336432
Stack dump:
0. Program arguments: /Users/kavon/msr/llvm5/bin/opt -inline -mem2reg -inferattrs -ipconstprop -gvn -simplifycfg -bdce -sink -dse -adce -instcombine -early-cse-memssa -early-cse-memssa -dse -adce -simplifycfg -sink -ipconstprop -gvn -bdce -instcombine -jump-threading -inline -sroa ./src/apps/raytracer.bc -o ./out/raytracer_opt1043.bc
fish: “/Users/kavon/msr/llvm5/bin/opt…” terminated by signal SIGSEGV (Address boundary error)</pre><div class=""><br class=""></div><div class="">Thanks,</div></div><div class="">Kavon</div></body></html>