aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2021-11-24 09:23:52 +0000
committerFlorian Hahn <flo@fhahn.com>2021-11-24 09:23:52 +0000
commit8ef460fc5137816c0bcc9ec471e7d60d3cc2f5ee (patch)
treefc0cac72f7db5c2963c0da78bb703fc5c0f8f764 /llvm/lib/CodeGen/MachineFunction.cpp
parent6f82264dbb02028d4ec4940aeb6d716dded6e879 (diff)
downloadllvm-8ef460fc5137816c0bcc9ec471e7d60d3cc2f5ee.zip
llvm-8ef460fc5137816c0bcc9ec471e7d60d3cc2f5ee.tar.gz
llvm-8ef460fc5137816c0bcc9ec471e7d60d3cc2f5ee.tar.bz2
[llvm-reduce] Add parallel chunk processing.
This patch adds parallel processing of chunks. When reducing very large inputs, e.g. functions with 500k basic blocks, processing chunks in parallel can significantly speed up the reduction. To allow modifying clones of the original module in parallel, each clone needs their own LLVMContext object. To achieve this, each job parses the input module with their own LLVMContext. In case a job successfully reduced the input, it serializes the result module as bitcode into a result array. To ensure parallel reduction produces the same results as serial reduction, only the first successfully reduced result is used, and results of other successful jobs are dropped. Processing resumes after the chunk that was successfully reduced. The number of threads to use can be configured using the -j option. It defaults to 1, which means serial processing. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D113857
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions