]> granicus.if.org Git - llvm/commit
[CodeGen] Pass SDAG an ORE, and replace FastISel stats with remarks.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 30 Mar 2017 17:49:58 +0000 (17:49 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 30 Mar 2017 17:49:58 +0000 (17:49 +0000)
commit04dea7e0881ae280e77decce78081b08748009d8
tree198afc4fcaf9722c6b18fe67d005a8ca76c2f860
parentaf5759db4770046668402752dc20d29bf6795749
[CodeGen] Pass SDAG an ORE, and replace FastISel stats with remarks.

In the long-term, we want to replace statistics with something
finer-grained that lets us gather per-function data.
Remarks are that replacement.

Create an ORE instance in SelectionDAGISel, and pass it to
SelectionDAG.

SelectionDAG was used so that we can emit remarks from all
SelectionDAG-related code, including TargetLowering and DAGCombiner.
This isn't used in the current patch but Adam tells me he's interested
for the fp-contract combines.

Use the ORE instance to emit FastISel failures as remarks (instead of
the mix of dbgs() dumps and statistics that we currently have).

Eventually, we want to have an API that tells us whether remarks are
enabled (http://llvm.org/PR32352) so that we don't emit expensive
remarks (in this case, dumping IR) when it's not needed.  For now, use
'isEnabled' as a crude replacement.

This does mean that the replacement for '-fast-isel-verbose' is now
'-pass-remarks-missed=isel'.  Additionally, clang users also need to
enable remark diagnostics, using '-Rpass-missed=isel'.

This also removes '-fast-isel-verbose2': there are no static statistics
that we want to only enable in asserts builds, so we can always use
the remarks regardless of the build type.

Differential Revision: https://reviews.llvm.org/D31405

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299093 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGISel.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
test/CodeGen/AArch64/fast-isel-tail-call.ll
test/CodeGen/Mips/Fast-ISel/check-disabled-mcpus.ll
test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll
test/CodeGen/X86/fast-isel-x86-64.ll
test/CodeGen/X86/fast-isel-x86.ll