This is the first stage where the scanner will read the input source files to identify all static and extern usages.
The grammar engine will check patterns of tokens that match with pre-defined rules to identify variables, loops, control statements, functions etc.
These constructs will instruct the scheduler on which core a particular task will execute along with the start and end times.
A cyclic multi-threading parallelizing compiler tries to split up a loop so that each iteration can be executed on a separate processor concurrently.
Data dependence can sometimes be dealt with, but it may incur additional overhead in the form of message passing, synchronization of shared memory, or some other method of processor communication.
The extra overhead that can be associated with using multiple processors can eat into the potential speedup of parallelized code.
There are many pleasingly parallel problems that have such relatively independent code blocks, in particular systems using pipes and filters.
The memory accessed (whether direct or indirect) can be simply marked for different iterations of a loop and can be compared for dependency detection.
Most research compilers for automatic parallelization consider Fortran programs,[citation needed] because Fortran makes stronger guarantees about aliasing than languages such as C. Typical examples are: Recently, Aubert, Rubiano, Rusch, and Seiller[8] used a dependency analysis technique [9] to automatically parallelise loops in C code.