Code size reduction is ever becoming more important for compilers targeting embedded processors because these processors are often severely limited by storage constraints and thus the reduced code size can have a positively significant impact on their performance. Various code size reduction techniques have different motivations and a variety of application contexts utilizing special hardware features of their target processors. In this work, we propose a novel technique that fully utilizes a set of hardware instructions, called the multiple load/store (MLS) or parallel load/store (PLS), that are specially featured for reducing code size by minimizing the number of memory operations in the code. To take advantage of this feature, many microprocessors support the MLS instructions, whereas no existing compilers fully exploit the potential benefit of these instructions but only use them for some limited cases. This is mainly because optimizing memory accesses with MLS instructions for general cases is an NP-hard problem that necessitates complex assignments of registers and memory offsets for variables in a stack frame. Our technique uses a couple of heuristics to efficiently handle this problem in a polynomial time bound.
[1]
Kurt Keutzer,et al.
Storage assignment to decrease code size
,
1995,
PLDI '95.
[2]
Yunheung Paek,et al.
Case Studies on Automatic Extraction of Target-Specific Architectural Parameters in Complex Code Generation
,
2003,
SCOPES.
[3]
Miodrag Potkonjak,et al.
MediaBench: a tool for evaluating and synthesizing multimedia and communications systems
,
1997,
Proceedings of 30th Annual International Symposium on Microarchitecture.
[4]
Santosh Pande,et al.
Storage assignment optimizations through variable coalescence for embedded processors
,
2003
.
[5]
D. H. Bartley,et al.
Optimizing stack frame accesses for processors with restricted addressing modes
,
1992,
Softw. Pract. Exp..
[6]
Amit Rao,et al.
Storage assignment optimizations to generate compact and efficient code on embedded DSPs
,
1999,
PLDI '99.
[7]
Rainer Leupers,et al.
A uniform optimization technique for offset assignment problems
,
1998,
Proceedings. 11th International Symposium on System Synthesis (Cat. No.98EX210).
[8]
Jens Palsberg,et al.
Efficient spill code for SDRAM
,
2003,
CASES '03.