Efficiently computing static single assignment form and the control dependence graph
ACM Transactions on Programming Languages and Systems (TOPLAS)
The Generation of Optimal Code for Arithmetic Expressions
Journal of the ACM (JACM)
On programming of arithmetic operations
Communications of the ACM
Java Virtual Machine Specification
Java Virtual Machine Specification
A Retargetable C Compiler: Design and Implementation
A Retargetable C Compiler: Design and Implementation
CC '98 Proceedings of the 7th International Conference on Compiler Construction
Optimizing Java Bytecode Using the Soot Framework: Is It Feasible?
CC '00 Proceedings of the 9th International Conference on Compiler Construction
Optimal code generation for expression trees
STOC '75 Proceedings of seventh annual ACM symposium on Theory of computing
LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation
Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization
VMSTAR: synthesizing scalable runtime environments for sensor networks
Proceedings of the 3rd international conference on Embedded networked sensor systems
Java™ on the bare metal of wireless sensor devices: the squawk Java virtual machine
Proceedings of the 2nd international conference on Virtual execution environments
Compilers: Principles, Techniques, and Tools (2nd Edition)
Compilers: Principles, Techniques, and Tools (2nd Edition)
Reducing stack usage in Java bytecode execution
ACM SIGARCH Computer Architecture News
An embedded systems programming environment for c
Euro-Par'06 Proceedings of the 12th international conference on Parallel Processing
TinyVM: an energy-efficient execution infrastructure for sensor networks
Software—Practice & Experience
Hi-index | 0.00 |
Given the growing interest in the JVM and Microsoft@?s CLI as programming language implementation targets, code generation techniques for efficient stack-code are required. Compiler infrastructures such as LLVM are attractive for their highly optimizing middleend. However, LLVM@?s intermediate representation is register-based, and an LLVM code generator for a stack-based virtual machine needs to bridge the fundamental differences of the register and stack-based computation models. In this paper we investigate how the semantics of a register-based IR can be mapped to stack-code. We introduce a novel program representation called treegraphs. Treegraph nodes encapsulate computations that can be represented by DFS trees. Treegraph edges manifest computations with multiple uses, which is inherently incompatible with the consuming semantics of stack-based operators. Instead of saving a multiply-used value in a temporary, our method keeps all values on the stack, which avoids costly store and load instructions. Code-generation then reduces to scheduling of treegraph nodes in the most cost-effective way. We implemented a treegraph-based instruction scheduler for the LLVM compiler infrastructure. We provide experimental results from our implementation of an LLVM backend for TinyVM, which is an embedded systems virtual machine for C.