2020 · 29 citations · 26 references
ComputingComputer EngineeringComputer ScienceAlgorithmsCompilersComputer ArchitectureControl-flow AnalysisData-flow AnalysisInstruction SchedulingInstruction SelectionInstruction Set ArchitectureInstruction-level ParallelismCode Size OptimizationCommon Subexpression EliminationState-of-the-art Review
Function merging is an important optimization for reducing code size. This technique eliminates redundant code across functions by merging them into a single function. While initially limited to identical or trivially similar functions, the most recent approach can identify all merging opportunities in arbitrary pairs of functions. However, this approach has a serious limitation which prevents it from reaching its full potential. Because it cannot handle phi-nodes, the state-of-the-art applies register demotion to eliminate them before applying its core algorithm. While a superficially minor workaround, this has a three-fold negative effect: by artificially lengthening the instruction sequences to be aligned, it hinders the identification of mergeable instruction; it prevents a vast number of functions from being profitably merged; it increases compilation overheads, both in terms of compile-time and memory usage.
26
An efficient method of computing static single assignment form
Ron K. Cytron, Jeanne Ferrante, Barry K. Rosen et al. · 1989 · 465 citations
SourcererCC: Scaling Code Clone Detection to Big Code
Hitesh Sajnani, Vaibhav Saini, Jeffrey Svajlenko et al. · arXiv (Cornell University) · 2015 · 294 citations · Full text