The presentation can be downloaded here.
Compiler translates the entire
The main objective of
From a developer point of view, the program must be:
A developer needs
An
To use features of the compiler successfully, the programmer must:
Intel provides C/C++ and Fortran compilers for Windows, Linux and Mac OS operating systems.
For Windows INTEL compiler is made as plug-in for the Microsoft Visual Studio.
The important purposes of the Intel compilers are well-timed support of all new
(рис 3.1)
http://www.intel.com/software/products
(рис 3.2)
(рис 3.3)
Parsing is the process of input characters analysis, usually in accordance with a given
During parsing the source code is converted into a
At the output we get FE related tables, which are called the
(рис 3.4) Internal representation
The statements are usually presented in a list and can be linked in two ways:
struct Stmt {
common_members:
int type;
Stmt * pred;
Stmt *succ;
Basic_Block bblock;
…
}
Some simple scalar optimizations based on
For_All_Subroutine_Stmt(subroutine,stmt) {
if(Stmt_type(stmt) == Stmt_Assign {
//assignment processing
}
}
(рис 3.5) Expressions
A
The CFG is essential to many
(рис 3.6) CFG example
(рис 3.7)
There are well-known scalar optimizations such as
(рис 3.8)
(рис 3.9)
Search for identical
(рис 3.10)
Removal of code that does not change the output of the program.
(рис 3.11)
There are many cases when
Sometimes
(рис 3.12)
(рис 3.13)
When we can propagate the information about the values of X? For straight-line piece of code the answer is trivial. CFG resolves
A definition-use graph is a graph that contains the edges from each variable definition point in the program to every point of its use.
Construction of def-use chain for the base block is trivial. Each variable definition is associated with all subsequent uses of it. Each subsequent
In order to use this local graph CFG computed using several sets those
To understand what definition will be used in our
It can be constructed via an iterative process that will calculate the reaches (b) through the sets of previous blocks.
Reaches (b) = U for all predecessors (defsout (p) U (reaches (p) ? ¬ killed (p))
The problem is that in the presence of loops, the set reaches(b) may depend on the reaches (b). If we will repeat this equation many times for each
Constructed sets are used for many scalar optimizations such as
(рис 3.14)
This example illustrates the problem. Definitions of S1, S2, S3 pass through the top of S4. Since each definition
reaches every use, there are nine edges. Static single assignment form (SSA) was proposed to simplify DEF/USE chain.
SSA form proposes unique name for each variable definition and introduction of special pseudo-assignments.
(рис 3.15)
SSA is designed to save developers from building complex use / def chains for local variables. Power of SSA is that each variable has only one definition in the program. Therefore, use / def chain is trivial.
SSA introduces special presentation of Phi-functions in places with uncertainty, to create a new variable. This so-called pseudo-assignment. In the construction is necessary to place Phi - functions and create new unique variables.
The new variables are generated by completing the variable name with a unique option. In order to correctly insert the Phi function is necessary to consider some of the concepts of graph theory.
(рис 3.16)
(рис 3.17)
Node N dominates node M if all ways to M pass through N. A node is an immediate dominator of node M if it is the last dominator on any path from entry node to M.
(рис 3.18)
Dominance frontier of node x is set w of all nodes where x dominates all predecessors nodes from w, but doesn’t dominates nodes from w.
Example:
Dom[5] = {5,6,7,8}
DF[5] ={5,4,12,11}
In SSA form, each variable definition must dominate the use of this variable.
Construction of the dominators set for each
The set of dominators for a node N is the intersection of the dominators set of all his predecessors, and the node itself.
Strict dominator N, this dominator!= N. Immediate dominator – the closest node from the set of dominators.
idom (N) - the immediate dominator for N
children (N) - the set of basic blocks for N, which it dominates
(рис 3.19)
Criterion of dominance frontier: if the N contains a definition of variable A, then every node on the dominance frontier of node N requires Phi function for A. Each Phi function is also the definition, so you must apply the criterion while there are nodes which requires Phi function.
(рис 3.20)
Inserting ? functions for the node 5 of the scheme on slide 25
Optimization using the SSA form:
a_ver is not used than it should be removed.a_ver = const, then all of a_ver should be replaced by consta_next = Phi (c, c) than Phi should be replaced by c.a_n = b_k than all usages of a_n should be replaced with b_k.a_n = Phi (b_k, b_k) than Phi should be replaced with b_k.Для получения официальных документов о завершении программы дополнительного профессионального образования (удостоверения о повышении квалификации, дипломов о профессиональной переподготовке и MBA) необходимо предоставить:
Внимание! Вы можете не заказывать доставку бумажной версии официального документы, а скачать его в электронном виде и распечатать самостоятельно. Информация о выданном документе в течение 1 месяца загружается в Федеральную информационную систему «Федеральный реестр сведений о документах об образовании и (или) о квалификации, документах об обучении» - ФИС ФРДО.
Доступ на новый сайт осуществляется с использованием адреса электронной почты, который был указан вами при регистрации на "старом". Мы постарались перенести все ваши данные с прежнего ресурса, однако не исключена вероятность потери части информации.
При возникновении проблемы со входом, воспользуйтесь функцией сброса пароля
Если вы обнаружите несоответствия, пожалуйста, сообщите нам.