This is an archive of the discontinued LLVM Phabricator instance.

Dump function as the only defined function in its module.
Needs ReviewPublic

Authored by yinma on Mar 28 2016, 1:49 PM.

Details

Reviewers
bogner
bkramer
Summary

This procedure could dump the module, where the function becomes the only defined function in its module. This is very useful to debug large code base where reducing from source code is difficult, like LTO.

Diff Detail

Event Timeline

yinma updated this revision to Diff 51833.Mar 28 2016, 1:49 PM
yinma retitled this revision from to Dump function as the only defined function in its module. .
yinma updated this object.
yinma added a subscriber: llvm-commits.

This is the same as llcm-extract, no?

yinma added a comment.EditedMar 28 2016, 5:18 PM

the functionality, it is similar to llvm-extract. however, it provides a runtime solution to extract a function from a debugger from any point in compilation time like LTO, something after inlining. You can extract function right at the assertion point. llvm-extract only can work on a file. We need a runtime solution.

bkramer edited edge metadata.Mar 29 2016, 2:09 AM

We need a runtime solution.

Why? Just dump everything into a file and run llvm-extract on it?

Our code base is huge in LTO, it usually take very very long time to dump into a file. With this function, the process would be dramatically faster. I believe this would also benefit other people.