6 research outputs found

    Feasibility of Optimizations Requiring Bounded Treewidth in a Data Flow Centric Intermediate Representation

    Get PDF
    Data flow analyses are instrumental to effective compiler optimizations, and are typically implemented by extracting implicit data flow information from traversals of a control flow graph intermediate representation. The Regionalized Value State Dependence Graph is an alternative intermediate representation, which represents a program in terms of its data flow dependencies, leaving control flow implicit. Several analyses that enable compiler optimizations reduce to NP-Complete graph problems in general, but admit linear time solutions if the graph’s treewidth is limited. In this paper, we investigate the treewidth of application benchmarks and synthetic programs, in order to identify program features which cause the treewidth of its data flow graph to increase, and assess how they may appear in practical software. We find that increasing numbers of live variables cause unbounded growth in data flow graph treewidth, but this can ordinarily be remedied by modular program design, and monolithic programs that exceed a given bound can be efficiently detected using an approximate treewidth heuristic

    RVSDG: An Intermediate Representation for Optimizing Compilers

    Full text link
    Intermediate Representations (IRs) are central to optimizing compilers as the way the program is represented may enhance or limit analyses and transformations. Suitable IRs focus on exposing the most relevant information and establish invariants that different compiler passes can rely on. While control-flow centric IRs appear to be a natural fit for imperative programming languages, analyses required by compilers have increasingly shifted to understand data dependencies and work at multiple abstraction layers at the same time. This is partially evidenced in recent developments such as the MLIR proposed by Google. However, rigorous use of data flow centric IRs in general purpose compilers has not been evaluated for feasibility and usability as previous works provide no practical implementations. We present the Regionalized Value State Dependence Graph (RVSDG) IR for optimizing compilers. The RVSDG is a data flow centric IR where nodes represent computations, edges represent computational dependencies, and regions capture the hierarchical structure of programs. It represents programs in demand-dependence form, implicitly supports structured control flow, and models entire programs within a single IR. We provide a complete specification of the RVSDG, construction and destruction methods, as well as exemplify its utility by presenting Dead Node and Common Node Elimination optimizations. We implemented a prototype compiler and evaluate it in terms of performance, code size, compilation time, and representational overhead. Our results indicate that the RVSDG can serve as a competitive IR in optimizing compilers while reducing complexity

    Методи оптимізації при трансляції на графі залежностей станів та значень

    Get PDF
    Актуальність теми. Сучасні мови програмування надають все більше можливостей для абстрагування створюваного програмного забезпечення від деталей оточення, в якому воно буде працювати. Разом з цим вимоги до швидкодії цих програм не зменшуються, що є мотивацією для дослідження нових шляхів оптимізації програм у процесі їх трансляції у машинні інструкції. Транслятори є одною з найважливіших ланок у сучасній розробці програмного забезпечення, і вже сьогодні здатні у деяких випадках покращити швидкодію програм на порядки без втручання зі сторони розробника. Важливим фактором при виборі сучасного транслятору для розробників програмного забезпечення є швидкість компіляції вихідного коду, тому дослідження таких методів оптимізації, які дозволять прискорити процес трансляції, при цьому отримувати на виході програми, що не поступаються по швидкодії програмам, отриманим стандартними методами, є актуальною темою. Об’єктом дослідження є процеси оптимізації коду, що генерується, в трансляторах. Предметом дослідження є методи оптимізації в трансляторах з використанням графу залежності станів та значень у якості внутрішнього подання програми. Мета роботи: прискорення процесів оптимізації у трансляторах, розробка більш швидких методів оптимізації у трансляторах на основі графу залежності станів та значень у якості внутрішнього подання програми.Topicality. Modern programming languages provide more and more opportunities for abstracting the generated software from the details of the environment in which it will work. Along with this, the requirements for the speed of these programs do not decrease, which is a motivation for exploring new ways of optimizing programs in the process of their translation into machine instructions. Translators are one of the most important links in modern software development, and already today in some cases are able to improve the speed of programs on orders without the intervention of the developer. An important factor in choosing a modern translator for software developers is the speed of compiling the source code, so the study of such optimization methods that will speed up the translation process, while getting programs that are not inferior in speed to programs obtained by standard methods is an actual topic. The object of the study are the processes of optimizing the code generated in translators. The study examines methods of optimization in translators using the value state dependence graph as an internal representation of the program. Objective: acceleration of optimization processes in translators, development of faster optimization methods in translators based on the graph of the dependence of states and values as an internal representation of the program.Актуальность темы. Современные языки программирования предоставляют все больше возможностей для абстрагирования создаваемого программного обеспечения от деталей окружения, в котором оно будет работать. Вместе с этим требования к быстродействию этих программ не уменьшаются, что является мотивацией для исследования новых путей оптимизации программ в процессе их трансляции в машинные инструкции. Трансляторы являются одним из важнейших звеньев в современной разработке программного обеспечения, и уже сегодня способны в некоторых случаях улучшить быстродействие программ на порядки без вмешательства со стороны разработчика. Важным фактором при выборе современного транслятора для разработчиков программного обеспечения является скорость компиляции исходного кода, поэтому исследование таких методов оптимизации, которые позволят ускорить процесс трансляции, при этом получать на выходе программы, не уступающие по быстродействию программам, полученным стандартными методами, является актуальной темой. Объектом исследования являются процессы оптимизации кода, генерируемого в трансляторах. Предметом исследования являются методы оптимизации в трансляторах с использованием графу зависимости состояний и значений в качестве внутреннего представления программы. Цель работы: ускорение процессов оптимизации в трансляторах, разработка более быстрых методов оптимизации в трансляторах на основе графу зависимости состояний и значений в качестве внутреннего представления программы

    Combined Code Motion and Register Allocation using the Value State Dependence Graph

    No full text
    We define the Value State Dependence Graph (VSDG). The VSDG is a form of the Value Dependence Graph (VDG) extended by the addition of state dependence edges to model sequentialised computation. These express store dependencies and loop termination dependencies of the original program. We also exploit them to express the additional serialization inherent in producing final object code

    Combined Code Motion and Register Allocation Using the Value State Dependence Graph

    No full text
    We define the Value State Dependence Graph (VSDG). The VSDG is a form of the Value Dependence Graph (VDG) extended by the addition of state dependence edges to model sequentialised computation
    corecore