OSDN Git Service

[TargetPassConfig] Feature generic options to setup start/stop-after/before
authorQuentin Colombet <qcolombet@apple.com>
Mon, 31 Jul 2017 18:24:07 +0000 (18:24 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Mon, 31 Jul 2017 18:24:07 +0000 (18:24 +0000)
commit6131fb56ca3388f5e7161c3687718d994b2378f6
treea28736d7359a3a5726b0c78d8ae9d697f98fb73e
parent8209d78723a6fed0daa5c0ee786ed44c376dc134
[TargetPassConfig] Feature generic options to setup start/stop-after/before

This patch refactors the code used in llc such that all the users of the
addPassesToEmitFile API have access to a homogeneous way of handling
start/stop-after/before options right out of the box.

In particular, just invoking addPassesToEmitFile will set the proper
pipeline without additional effort (modulo parsing a .mir file if the
start-before/after options are used.

NFC.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309599 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/TargetPassConfig.h
include/llvm/Target/TargetMachine.h
lib/CodeGen/LLVMTargetMachine.cpp
lib/CodeGen/TargetPassConfig.cpp
test/CodeGen/Generic/llc-start-stop.ll
tools/llc/llc.cpp