]> granicus.if.org Git - llvm/commit
[llvm-extract] Add option for recursive extraction
authorKeno Fischer <keno@alumni.harvard.edu>
Thu, 6 Apr 2017 20:51:40 +0000 (20:51 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Thu, 6 Apr 2017 20:51:40 +0000 (20:51 +0000)
commit1f6fa0f45ad50b9de70df7ddc046cc8ff8c76369
tree99f5d63b1f02d57f3efb3d0f8eef295705a15b4c
parentff802834d5427bc2179fcc74c3ea641c1e7b3f58
[llvm-extract] Add option for recursive extraction

Summary:
Particularly, with --delete, this can be very useful for testing
new optimizations on some hotspots, without having to run it on the whole
application. E.g. as such:
```
llvm-extract app.bc --recursive --rfunc .*hotspot.* > hotspot.bc
llvm-extract app.bc --recursive --delete --rfunc .*hotspot.* > residual.bc
llc -filetype=obj residual.bc > residual.o
llc -filetype=obj hotspot.bc > hotspot.o
cc -o app residual.o hotspot.o
```

Reviewed By: davide
Differential Revision: https://reviews.llvm.org/D31722

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299706 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-extract/recursive.ll [new file with mode: 0644]
tools/llvm-extract/llvm-extract.cpp