OSDN Git Service

[llvm-extract] Support extracting basic blocks
authorVolkan Keles <vkeles@apple.com>
Tue, 23 Jan 2018 21:51:34 +0000 (21:51 +0000)
committerVolkan Keles <vkeles@apple.com>
Tue, 23 Jan 2018 21:51:34 +0000 (21:51 +0000)
commit22b256458103d7713e31e993fef847e63d9b487a
treef3e02ee9f412a79c3540388eb272dc21003a461b
parentc05d316517cf8fd64b173e00cd4ed85765d4b0b3
[llvm-extract] Support extracting basic blocks

Summary:
Currently, there is no way to extract a basic block from a function easily. This patch
extends llvm-extract to extract the specified basic block(s).

Reviewers: loladiro, rafael, bogner

Reviewed By: bogner

Subscribers: hintonda, mgorny, qcolombet, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323266 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/InitializePasses.h
include/llvm/Transforms/IPO.h
lib/Transforms/IPO/BlockExtractor.cpp [new file with mode: 0644]
lib/Transforms/IPO/CMakeLists.txt
lib/Transforms/IPO/IPO.cpp
lib/Transforms/IPO/LoopExtractor.cpp
test/Transforms/BlockExtractor/extract-blocks.ll [new file with mode: 0644]
test/Transforms/BlockExtractor/invalid-block.ll [new file with mode: 0644]
test/Transforms/BlockExtractor/invalid-function.ll [new file with mode: 0644]
test/tools/llvm-extract/extract-block.ll [new file with mode: 0644]
test/tools/llvm-extract/extract-invalid-block.ll [new file with mode: 0644]
test/tools/llvm-extract/extract-multiple-blocks.ll [new file with mode: 0644]
tools/bugpoint/ExtractFunction.cpp
tools/llvm-extract/llvm-extract.cpp