Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue to fix non-deterministic behaviors of parallel parsing
1. Force two rules to simplify the interactions between threads 1.A. Each basic block should be parsed and created only by one thread. 1.B. Each edge should be parsed and created only by one thread. To do this, we add edges source address into the ParseWorkElem. We also need to adjust non-returning function analysis because only one of shared functions will continue parsing and have the return status. All other functions should be delayed and wait for the winning function to finish parsing These two rules ensure that we do not need a large critical section when we look for the correct source block of an edge during parsing (See 2 for more detail) 2. When parsing an edge, the source block of the edge could have been split by the same thread. We need to follow the fallthrough edge to find the correct Block object that contains the edge. The two rules above ensure that the source block would not be split by a different thread, thus we do not need to build a large critical for when following the fall-through edges. 3. At finalizing time, fix the block spliting implementiation caused by functions sharing code. During parallel parsing, there is no range lookup because building a range lookup would cause mutual exclusion for threads. So, during parallel parsing, we only split blocks within a thread. For functions sharing code, this means overlapping blocks in separate functions.
- Loading branch information
Showing
7 changed files
with
321 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.