288 research outputs found

    Revisiting Out-of-SSA Translation for Correctness, Code Quality, and Efficiency

    Get PDF
    Compared to the previous versions, the only change is correcting an awful typo that made Algorithm 1 wrong. Line 18 is not "if b = loc(pred(b))" but simply "if b = loc(b)".Static single assignment (SSA) form is an intermediate program representation in which many code optimizations can be performed with fast and easy-to-implement algorithms. However, some of these optimizations create situations where the SSA variables arising from the same original variable now have overlapping live ranges. This complicates the translation out of SSA code into standard code. There are three issues to consider: correctness, code quality (elimination of copies), and algorithm efficiency (speed and memory footprint). Briggs et al. proposed patches to correct the initial approach of Cytron et al. A cleaner and more general approach was proposed by Sreedhar et al., along with techniques to reduce the number of generated copies. We propose a new approach based on coalescing and a precise view of interferences, in which correctness and optimizations are separated. Our approach is provably correct and simpler to implement, with no patches or particular cases as in previous solutions, while reducing the number of generated copies. Also, experiments with SPEC CINT2000 show that it is 2x faster and 10x less memory-consuming than the Method~III of Sreedhar et al., which makes it suitable for just-in-time compilation

    Parallel Copy Motion

    Get PDF
    International audienceRecent results on the static single assignment (SSA) form open promising directions for the design of new register allocation heuristics for just-in-time (JIT) compilation. In particular, heuris- tics based on tree scans with two decoupled phases, one for spilling, one for splitting/coloring/coalescing, seem good candidates for de- signing memory-friendly, fast, and competitive register allocators. Another class of register allocators, well-suited for JIT compilation, are those based on linear scans. Most of them perform coalesc- ing poorly but also do live-range splitting (mostly on control-flow edges) to avoid spilling. This leads to a large amount of register-to- register copies inside basic blocks but also, implicitly, on critical edges, i.e., edges that flow from a block with several successors to a block with several predecessors. This paper presents a new back-end optimization that we call parallel copy motion. The technique is to move copy instructions in a register-allocated code from a program point, possibly an edge, to another. In contrast with a classical scheduler that must preserve data dependences, our copy motion also permutes register assign- ments so that a copy can "traverse" all instructions of a basic block, except those with conflicting register constraints. Thus, parallel copies can be placed either where the scheduling has some empty slots (for multiple-issues architectures), or where fewer copies are necessary because some variables are dead at this point. Moreover, to the cost of some code compensations (namely, the reverse of the copy), a copy can also be moved out from a critical edge. This pro- vides a simple solution to avoid critical-edge splitting, especially useful when the compiler cannot split it, as it is the case for abnor- mal edges. This compensation technique also enables the schedul- ing/motion of the copy in the successor or predecessor basic block. Experiments with the SPECint benchmarks suite and our own benchmark suite show that we can now apply broadly an SSA-based register allocator: all procedures, even with abnormal edges, can be treated. Simple strategies for moving copies from edges and locally inside basic block show significant average improvements (4% for SPECint and 3% for our suite), with no degradation. It let us believe that the approach is promising, and not only for improving coalescing in fast register allocators

    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

    Optimizing Local Memory Allocation and Assignment Through a Decoupled Approach

    Get PDF
    International audienceSoftware-controlled local memories (LMs) are widely used to provide fast, scalable, power efficient and predictable access to critical data. While many studies addressed LM management, keeping hot data in the LM continues to cause major headache. This paper revisits LM management of arrays in light of recent progresses in register allocation, supporting multiple live-range splitting schemes through a generic integer linear program. These schemes differ in the grain of decision points. The model can also be extended to address fragmentation, assigning live ranges to precise offsets. We show that the links between LM management and register allocation have been underexploited, leaving much fundamental questions open and effective applications to be explored

    Preference-Guided Register Assignment

    Full text link
    Abstract. This paper deals with coalescing in SSA-based register allo-cation. Current coalescing techniques all require the interference graph to be built. This is generally considered to be too compile-time intensive for just-in-time compilation. In this paper, we present a biased coloring approach that gives results similar to standalone coalescers while signif-icantly reducing compile time.

    Interpreter-Assisted Investigative Interviews: Needs, Challenges and Quality

    Get PDF
    This thesis researches the yet to be fully explored dynamic of interpretation services needs and interpretation service optimisation (i.e., interview and interpretation quality assurance). The research began with an exploratory analysis of factors affecting interpreter-assisted investigative interviews and then took a subtle experimental swipe at factors affecting intelligibility and informativeness of translation. Recognition of the importance of the context in which interpretation currently takes place led to the addition of a wider range of approaches. This informed a broad review of relevant literature. The empirical work is presented as follows. First, is a Study Space Analysis (SSA) of policy-relevant research, which provides a base for determining the adequacy and depth of the existing body of knowledge. The results show that interpretation service needs and planning appear mildly or infrequently researched, and there exists little or no studies investigating police diversity effects on interpretation service needs. Also, studies investigating cognitive load, language and gender effects on interpreting accuracy are sparse. Finally, this study shows that the literature focuses on interpretation as a service for offenders rather than for victims and witnesses. The implications of this for social harmony are discussed. The second study concerns the optics of a police service that does not resemble the population policed. In a convenience sample of 104 ethnic minority individuals, the descriptive and thematic analysis indicates that police diversity tends to improve trust and impact the need for interpretation service. These findings bring to the fore the benign potency of language education. The third study explores the opinions of 66 International Law Enforcement Agency (ILEA) investigators and 40 interpreters on factors affecting investigative interviews involving the assistance of interpreters. Using descriptive and thematic analysis, it was shown that investigators plan only occasionally with interpreters. The seldom planning practise is found to occur because of investigator’s role perception of interpreters and individualistic culture of investigators. Additionally, interpreter presence is observed to impact rapport building, and the effect of interruption is manageable with the right skills and experience combination. The fourth study uses a complex design to determine factors relevant to the intelligibility and informativeness of translations of witness accounts of a sample of audio depictions of non-violent offences. The study employed 240 aggregated ratings from 4 volunteer assessors of 60 textual interpretation of 15mins, 10mins and 5mins witness accounts using Tiselius (2009) 6-points Intelligibility and informativeness scale. Log-linear analysis revealed a surprising lack of consensus of assessments of intelligibility and informativeness across assessors, but judgements of informativeness relative to intelligibility within individual assessors appear coherent and consistent. Length of audio was not associated with intelligibility or informativeness. A small exploratory follow up to the study investigated what seemed to make translations unintelligible. The next study mapped the opinions of a sample of 51 expert interpreters with a range of experience about the perception of their work and its challenges. This shows consistency with existing literature and studies investigated in the thesis except for opinions on the role of police diversity which is found to increase trust and interpretation service needs

    Proceedings of the 21st Conference on Formal Methods in Computer-Aided Design – FMCAD 2021

    Get PDF
    The Conference on Formal Methods in Computer-Aided Design (FMCAD) is an annual conference on the theory and applications of formal methods in hardware and system verification. FMCAD provides a leading forum to researchers in academia and industry for presenting and discussing groundbreaking methods, technologies, theoretical results, and tools for reasoning formally about computing systems. FMCAD covers formal aspects of computer-aided system design including verification, specification, synthesis, and testing

    A Formal Verification Environment for Use in the Certification of Safety-Related C Programs

    Get PDF
    In this thesis the design of an environment for the formal verification of functional properties of safety-related software written in the programming language C is described. The focus lies on the verification of (primarily) geometric computations. We give an overview of the applicable regulations for safety-related software systems. We define a combination of higher-order logic as formalised in the theorem prover Isabelle and a specification language syntactically based on C expressions. The language retains the mathematical character of higher-level specifications in code specifications. A memory model for C is formalised which is appropriate to model low-level memory operations while keeping the entailed verification overhead in tolerable bounds. Finally, a Hoare style proof calculus is devised so that correctness proofs can be performed in one integrated framework. The applicability of the approach is demonstrated by describing its use in an industrial project
    • …
    corecore