[PATCH] D31405: [CodeGen] Pass SDAG an ORE, and replace FastISel stats with remarks.

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 13:55:11 PDT 2017


ab created this revision.
Herald added a subscriber: fhahn.

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).

This does mean that the replacement for '-fast-isel-verbose' is now
'-fast-isel-verbose -pass-remarks-missed=isel'.

Having to specify both command line options is awkward, but is only
necessary because we don't currently have a way to only emit a remark
if it's enabled (and we can't afford to emit unnecessary remarks all
the time).

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
'-fast-isel-verbose' regardless of the build type.


Repository:
  rL LLVM

https://reviews.llvm.org/D31405

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31405.93173.patch
Type: text/x-patch
Size: 24026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170327/8f5bbdea/attachment.bin>


More information about the llvm-commits mailing list