Cesar J. Philippidis

Email: cphilipp [at] engr [dot] scu [dot] edu
Disclaimer: The content of these web pages is not generated by and does not represent the views of Santa Clara University or any of its departments or organizations.

C. J. Philippidis, Reducing register pressure using linear scheduling. PhD thesis, Santa Clara University, 2011. (PDF)
C. J. Philippidis and W. Shang, On minimizing register usage of linearly scheduled algorithms with uniform dependencies. In Journal of Computer Languages, Systems and Structures, 36:250-267, October 2010. (PDF, DOI)

MAXLIVE compiler
GCC value splitting patch
Initial SimpleScalar PISA port to LLVM-2.8
Image Sharpening
MAXLIVE compiler (Source Code)

Project Description:

This compiler, named MAXLIVE, was developed as part of my thesis research to help me investigate the register requirements of subscripted variables in loop nests. MAXLIVE takes as input a Fortran-like syntax of DO-loops along with a wavefront schedule parameter PI. It can output anything from the latex register live-range figures used in my thesis, to providing detailed register usage reports, or emitting a C program with the original loop nest transformed about the specified wavefront parameter. Recently, it has been extended to support loop unrolling.

The MAXLIVE compiler is not particularly robust. The parser lacks strong syntax checking, and its capabilities were implemented in an as needed basis. The programs used to generate the experimental result data in my thesis are included as .reg files inside the tarball containing the source code. The source code is distributed under GPLv3.

Dependencies: The C code generator depends on the cloog version 0.15.9.

GCC value splitting patch (Source Code)

Project Description:

This gcc patch implements an optimization pass that splits immediate constant values within a program into lower and upper halves when it is profitable to do so. The end result is more compact assembly code with fewer instructions required to load values with common halves. Currently, each gcc backend needs to specify how values are loaded into registers. For many RISC architectures (with notably ARM excluded), a large word-size value may require two instructions to load. This patch places the splitting pass into GIMPLE level, thereby eliminating N target specific passes.

As an example, consider the following code sequence.

void foo()
unsigned int a, b, c;

a = 0xabcd0064 + 1;
b = 0xabcd0064 + 2;
c = 0xabcd0064 + 3;

bar(a, b, c);

GCC-4.5.0 yields the following PowerPC assembly code:

.globl foo
.type foo, @function
mflr 0
stwu 1,-16(1)
lis 3,0xdead
lis 4,0xdead
lis 5,0xdead
ori 3,3,48865
ori 4,4,48866
ori 5,5,48867
stw 0,20(1)
crxor 6,6,6
bl bar
lwz 0,20(1)
addi 1,1,16
mtlr 0

Notice that the three lis instructions are redundant. If the values were split early before the code generation pass, then gcc would yield an equivalent sequence of code with two fewer instructions. Not all constant benefit from early splitting. For instance, splitting constant values involved in bitwise arithmetic with generate one more instruction had the value not been split. See the chapter 6 in the thesis for more details.

This project has been abandoned due to the lack of split-able values in present in programs.

Dependencies: GCC version 4.5.0.

Initial SimpleScalar PISA port to LLVM (Source Code)

Project Description:

This is an incomplete, alpha quality, port of LLVM to the SimpleScalar PISA architecture. I wanted to test my register analysis project on a machine with a huge register file, so I tweaked the SimpleScalar simulator to have a larger register file. My results were mixed. While LLVM generated far superior spilling code compared the the ancient version of gcc supplied with SimpleScalar, I decided to concentrate on real world hardware instead. This project has long been abandoned. It still may be used as an initial starting point for an PISA port to LLVM. Note that this backend assumes PISA has a larger register file.

Dependencies: LLVM version 2.8 and SimpleScalar version 3.0.

Image Sharpening

Project Description:

In this project I am developing an image sharpening program based on Laplacian wavelets. Such a program would have applications in conventional photography, but it is crucial for astrophotography. While there are many program that are already capable this type image processing, I wanted a practical application to test my research on. In particular, the image convolution phase is directly applicable to the work done for my thesis. Preliminary results indicate a sizable speedup over conventional image processing programs such as ImageMagick.

The image of Jupiter above demonstrates the before and after of this image processing technique. The original image is on the left, and the sharpened version is on the right. Unfortunately, this aggressive application of the sharpening technique generates a little moire pattern on the top and the bottom of the processed image.