LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1775 - ExtractMappedBlocksFromModule discards the "blocks to not extract" list
Summary: ExtractMappedBlocksFromModule discards the "blocks to not extract" list
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: bugpoint (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Nick Lewycky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-04 19:38 PST by Gordon Henriksen
Modified: 2007-11-14 00:49 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
adds a command-line option to block extractor and makes bugpoint use it (10.36 KB, patch)
2007-11-11 04:45 PST, Nick Lewycky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Henriksen 2007-11-04 19:38:25 PST
In tools/bugpoint/ExtractFunction.cpp:ExtractMappedBlocksFromModule, bugpoint is discarding the "blocks to not extract" list since it's doing a fork+exec to run the block extractor pass. bugpoint used to just fork, so it used to work.
Comment 1 Nick Lewycky 2007-11-11 04:45:41 PST
Created attachment 1211 [details]
adds a command-line option to block extractor and makes bugpoint use it

This proposed patch should improve the situation.

This modifies bugpoint to write out the (Function, BasicBlock) names to a file, then passing the name of that file over to the extract basic blocks pass. It isn't perfect, as function and BB names might have spaces, newlines, etc. in them. It'd be cool if that could be fixed by leveraging the .ll parser/printer bits.
Comment 2 Chris Lattner 2007-11-13 23:45:11 PST
Patch looks great to me, please apply!
Comment 3 Nick Lewycky 2007-11-14 00:49:50 PST
Applied. The bug for the possible things it won't handle is PR1797.