[cfe-dev] Is there a way to let the AST matcher run on multiple files in parallel?

Han Wang wanghan02 at gmail.com
Wed Jul 22 05:27:56 PDT 2015


Hi Manuel,

Thank you for your answer. The goal is to do refactoring to the project and
apply the replacements to the original files. For the option (a), could you
describe more specifically how to do it? Thanks. I checked the run function
of clang::tooling::ClangTool, but it's just a for loop over all the source
files.

Best regards,
Han

On Wed, Jul 22, 2015 at 12:33 PM, Manuel Klimek <klimek at google.com> wrote:

> You can use
> a) a compilation database
> b) find . -name '*.cc' |xargs -n1 -P32
> depending on the output data you want to produce, you'll need to pass an
> additional flag to your tool to get the shard number...
>
> On Tue, Jul 21, 2015 at 6:20 PM Han Wang <wanghan02 at gmail.com> wrote:
>
>> Hi all,
>>
>> Is there a way to let the AST matcher run on multiple files in parallel?
>> I'm working on Mac. I have some old windows code which may slow down the
>> compiling time (maybe for some other reasons I don't know exactly). So this
>> makes it necessary for me to analyze each translation unit in parallel.
>>
>> At the moment I have only one mac which has 32 cores. I can live with
>> that if it could be fully parallel.
>>
>> Thanks!
>> Best regards,
>> Han
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150722/3165a53c/attachment.html>


More information about the cfe-dev mailing list