Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

queens.c (From the testsuite) crashes with frontend PGO + new pass manager #32745

Open Quuxplusone opened 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR33773
Status NEW
Importance P enhancement
Reported by Davide Italiano (ditaliano@apple.com)
Reported on 2017-07-13 13:43:44 -0700
Last modified on 2017-07-14 09:30:06 -0700
Version trunk
Hardware PC All
CC anemet@apple.com, chandlerc@gmail.com, davidxl@google.com, hfinkel@anl.gov, llvm-bugs@lists.llvm.org, silvasean@google.com, simon.f.whittaker@gmail.com, xinliangli@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Source:

https://github.com/llvm-mirror/test-suite/blob/master/SingleSource/Benchmarks/McGill/queens.c

/home/davide/work/llvm/build-release/bin/clang -fprofile-instr-generate -
fexperimental-new-pass-manager -O3 queens.c
instrprof failed to lower an increment
UNREACHABLE executed at
../lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5804!

I'll try to reduce if I get a chance, but reporting sooner rather than later so
that I don't forget.
Quuxplusone commented 7 years ago

The testcase works fine with IR based instrumentation: -fprofile-generate

Quuxplusone commented 7 years ago

For FE instrumentation, the lowering pass is not added with new PM, thus it would fail for any small trivial test case.

Quuxplusone commented 7 years ago
(In reply to Xinliang David Li from comment #2)
> For FE instrumentation, the lowering pass is not added with new PM, thus it
> would fail for any small trivial test case.

Yeah, we added the pass hooks to Clang for LLVM-based PGO, but not for Clang-
based.

That said, we also didn't have the extension point patch landed then. Now we
do, so it should be an especially ripe time to add this functionality.