4,465 research outputs found

    Alocação global de registradores de endereçamento para referencias a vetores em DSPs

    Get PDF
    Orientador: Guido Costa Souza de AraujoDissertação (mestrado) - Universidade Estadual de Campinas, Instituto de ComputaçãoResumo: O avanço tecnológico dos sistemas computacionais tem proporcionado o crescimento do mercado de sistemas dedicados, cada vez mais comuns no dia-a-dia das pessoas, como por exemplo em telefones celulares, palmtops e sistemas de controle automotivo. Devido às suas características, estas novas aplicações requerem sistemas que aliem baixo custo, alto desempenho e baixo consumo de potência. Uma das maneiras de atender a estes requisitos é utilizando processadores especializados. Contudo, a especialização na arquitetura dos processadores impõe novos desafios para o desenvolvimento de software para estes sistemas. Em especial, os compiladores - geralmente responsáveis pela otimização de código - precisam ser adaptados para produzir código eficiente para estes novos processadores. Na área de processamento de sinais digitais, como em telefonia celular, processadores especializados, denominados DSPs2, são amplamente utilizados. Estes processadores tipicamente possuem poucos registradores de propósito geral e modos de endereçamento bastante limitados. Além disso, muitas das suas aplicações envolvem o processamento de grandes seqüências de dados, as quais são geralmente armazenadas em vetores. Como resultado, o estudo de técnicas de otimização de referências a vetores tornou-se um problema central em compilação para DSPs. Este problema, denominado Global Array Reference Allocation (GARA), é o objeto central desta dissertação. O sub-problema central de GARA consiste em se determinar, para um dado conjunto de referências a vetores que serão alocadas a um mesmo registrador de endereçamento, o menor custo das instruções que são necessárias para manter este registrador com o endereço adequado em cada ponto do programa. Nesta dissertação, este sub-problema é modelado como um problema em grafos, e provado ser NP-difícil. Além disso, é proposto um algoritmo eficiente, baseado em programação dinâmica, para resolver este sub-problema de forma exata sob certas restrições. Com base neste algoritmo, duas técnicas são propostas para resolver o problema de GARA. Resultados experimentais, obtidos pela implementação destas técnicas no compilador GCC, comparam-nas com outros resultados da literatura. Os resultados demonstram a eficácia das técnicas propostas nesta dissertaçãoAbstract: The technological advances in computing systems have stimulated the growth of the embedded systems market, which is continuously becoming more ordinary in people's lives, for example in mobile phones, palmtops and automotive control systems. Because of their characteristics, these new applications demand the combination of low cost, high performance and low power consumption. One way to meet these constraints is through the design of specialized processors. However, processor specialization imposes new challenges to the development of software for these systems. In particular, compilers - generally responsible for code optimization - need to be adapted in order to produce efficient code for these new processors. In the digital signal processing arena, such as in cellular telephones, specialized processors, known as DSPs (Digital Signal Processors), are largely used. DSPs typically have few general purpose registers and very restricted addressing modes. In addition, many DSP applications include large data streams processing, which are usually stored in arrays. As a result, studing array reference optimization techniques became an important task in compiling for DSPs. This work studies this problem, known as Global Array Reference Allocation (GARA). The central GARA subproblem consists of determining, for a given set of array references to be allocated to the same address register, the minimum cost of the instructions required to keep this register with the correct address at alI program points. In this work, this subproblem is modeled as a graph theoretical problem and proved to be NP-hard. In addition, an efficient algorithm, based on dynamic programming, is proposed to optimally solve this subproblem under some restrictions. Based on this algorithm, two techniques to solve GARA are proposed. Experimental results, from the implementation of these techniques in the GCC compiler, compare them with previous work in the literature. The results show the effectiveness of the techniques proposed in this workMestradoMestre em Ciência da Computaçã

    Static optimization in PHP 7

    Get PDF
    PHP is a dynamically typed programming language commonly used for the server-side implementation of web applications. Approachability and ease of deployment have made PHP one of the most widely used scripting languages for the web, powering important web applications such as WordPress, Wikipedia, and Facebook. PHP's highly dynamic nature, while providing useful language features, also makes it hard to optimize statically. This paper reports on the implementation of purely static bytecode optimizations for PHP 7, the last major version of PHP. We discuss the challenge of integrating classical compiler optimizations, which have been developed in the context of statically-typed languages, into a programming language that is dynamically and weakly typed, and supports a plethora of dynamic language features. Based on a careful analysis of language semantics, we adapt static single assignment (SSA) form for use in PHP. Combined with type inference, this allows type-based specialization of instructions, as well as the application of various classical SSA-enabled compiler optimizations such as constant propagation or dead code elimination. We evaluate the impact of the proposed static optimizations on a wide collection of programs, including micro-benchmarks, libraries and web frameworks. Despite the dynamic nature of PHP, our approach achieves an average speedup of 50% on micro-benchmarks, 13% on computationally intensive libraries, as well as 1.1% (MediaWiki) and 3.5% (WordPress) on web applications

    Why is child malnutrition lower in urban than rural areas?

    Get PDF
    "While ample evidence documents that urban children generally have better nutritional status than their rural counterparts, recent research suggests that urban malnutrition is on the rise. The environment, choices, and opportunities of urbanites differ greatly from those of rural dwellers' from employment conditions to social and family networks to access to health care and other services. Given these differences, understanding the relative importance of the various determinants of child malnutrition in urban and rural areas and especially whether they differ is key to designing context-relevant, effective program and policy responses for stemming malnutrition. This study uses Demographic and Health Survey data from 36 developing countries to address the question of whether the socioeconomic determinants of child nutritional status differ across urban and rural areas. The purpose is to answer the broader question of why child malnutrition rates are lower in urban areas. The socioeconomic determinants examined are women's education, women's status, access to safe water and sanitation, and household economic status. The analysis finds little evidence of differences in the nature of the socioeconomic determinants or in the strength of their associations with child nutritional status across urban and rural areas. As expected, however, it documents marked differences in the levels of these determinants in favor of urban areas. Large gaps in favor of urban areas are also found in the levels of key proximate determinants of child nutritional status, especially maternal prenatal and birthing care, quality of complementary feeding, and immunization of children. The conclusion is that better nutritional status of urban children is probably due to the cumulative effect of a series of more favorable socioeconomic conditions, which, in turn, seems to lead to better caring practices for children and their mothers. Given that the nature of the determinants of child nutritional status is largely the same across urban and rural areas, the same program and policy framework can be used to stem malnutrition in both. Efforts to alleviate the most critical socioeconomic constraints specific to the different environments should continue to be prioritized." Authors' Abstractmalnutrition ,Demographic and Health Survey ,

    The inter-linkages between rapid growth in livestock production, climate change, and the impacts on water resources, land use, and deforestation

    Get PDF
    Livestock systems globally are changing rapidly in response to human population growth, urbanization, and growing incomes. This paper discusses the linkages between burgeoning demand for livestock products, growth in livestock production, and the impacts this may have on natural resources, and how these may both affect and be affected by climate change in the coming decades. Water and land scarcity will increasingly have the potential to constrain food production growth, with adverse impacts on food security and human well-being. Climate change will exacerbate many of these trends, with direct effects on agricultural yields, water availability, and production risk. In the transition to a carbon-constrained economy, livestock systems will have a key role to play in mitigating future emissions. At the same time, appropriate pricing of greenhouse gas emissions will modify livestock production costs and patterns. Health and ethical considerations can also be expected to play an increasing role in modifying consumption patterns of livestock products, particularly in more developed countries. Livestock systems are heterogeneous, and a highly differentiated approach needs to be taken to assessing impacts and options, particularly as they affect the resource-poor and those vulnerable to global change. Development of comprehensive frameworks that can be used for assessing impacts and analyzing trade-offs at both local and regional levels is needed for identifying and targeting production practices and policies that are locally appropriate and can contribute to environmental sustainability, poverty alleviation, and economic development.Livestock&Animal Husbandry,Wetlands,Wildlife Resources,Agricultural Knowledge&Information Systems,Rural Development Knowledge&Information Systems

    Model-driven Code Optimization

    Get PDF
    Although code optimizations have been applied by compilers for over 40 years, much of the research has been devoted to the development of particular optimizations. Certain problems with the application of optimizations have yet to be addressed, including when, where and in what order to apply optimizations to get the most benefit. A number of occurring events demand these problems to be considered. For example, cost-sensitive embedded systems are widely used, where any performance improvement from applying optimizations can help reduce cost. Although several approaches have been proposed for handling some of these issues, there is no systematic way to address the problems.This dissertation presents a novel model-based framework for effectively applying optimizations. The goal of the framework is to determine optimization properties and use these properties to drive the application of optimizations. This dissertation describes three framework instances: FPSO for predicting the profitability of scalar optimizations; FPLO for predicting the profitability of loop optimizations; and FIO for determining the interaction property. Based on profitability and the interaction properties, compilers will selectively apply only beneficial optimizations and determine code-specific optimization sequences to get the most benefit. We implemented the framework instances and performed the experiments to demonstrate their effectiveness and efficiency. On average, FPSO and FPLO can accurately predict profitability 90% of the time. Compared with a heuristic approach for selectively applying optimizations, our model-driven approach can achieve similar or better performance improvement without tuning the parameters necessary in the heuristic approach. Compared with an empirical approach that experimentally chooses a good order to apply optimizations, our model-driven approach can find similarly good sequences with up to 43 times compile-time savings.This dissertation demonstrates that analytic models can be used to address the effective application of optimizations. Our model-driven approach is practical and scalable. With model-driven optimizations, compilers can produce higher quality code in less time than what is possible with current approaches

    Pointer Disambiguation via Strict Inequalities

    Get PDF
    International audienceThe design and implementation of static analyses that disambiguate pointershas been a focus of research since the early days of compiler construction.One of the challenges that arise in this context is the analysis of languagesthat support pointer arithmetics, such as C, C++ and assembly dialects.This paper contributes to solve this challenge.We start from an obvious, yet unexplored, observation: if a pointeris strictly less than another, they cannot alias.Motivated by this remark, we use the abstract interpretation framework tobuild strict less-than relations between pointers.To this end, we construct a program representation that bestows the StaticSingle Information (SSI) property onto our dataflow analysis.SSI gives us an efficient sparse algorithm, which, once seen as aform of abstract interpretation, is correct by construction.We have implemented our static analysis in LLVM.It runs in time linear on the number of program variables, and, depending onthe benchmark, it can be as much as six times more precise than the pointerdisambiguation techniques already in place in that compiler

    An efficient algorithm for pointer-to-array access conversion for compiling and optimizing DSP applications

    Full text link
    • …
    corecore