Stable transitions in the presence of conditionals for an advanced dual-representation polyhedral loop transformation framework
First Claim
1. A method, in a data processing system, for optimizing program code, comprising:
- receiving source code for a program in a compiler executed by at least one processor of the data processing system;
transforming, by the at least one processor, the source code into a first program statement view of the source code;
transforming, by the at least one processor, the first program statement view of the source code into a program loop view of the source code;
applying, by the at least one processor, one or more code generation optimizations to the program loop view of the source code to generate first optimized code;
generating, by a polyhedral rescan module of a re-entrance path executed by the at least one processor, a second program statement view of the source code based on the first optimized code and information maintained for each statement in the first program statement view, describing how the source code was transformed into the first program statement view;
generating, by the at least one processor, second optimized code based on the second program statement view of the source code; and
outputting, by the at least one processor, optimized code, based on the second optimized code, to the compiler for use in generating executable code for execution on a computing device, wherein generating the second program statement view via the re-entrance path comprises recombining instances of statements in the program loop view prior to a polyhedral rescan operation of the re-entrance path being performed on the program loop view of the source code.
2 Assignments
0 Petitions
Accused Products
Abstract
Mechanisms for stable transitions in the presence of conditionals for an advanced dual-representation polyhedral loop transformation framework are provided. The mechanisms of the illustrative embodiments address the weaknesses of the known polyhedral loop transformation based approaches by providing mechanisms for performing code generation transformations on individual statement instances in an intermediate representation generated by the polyhedral loop transformation optimization of the source code. These code generation transformations have the important property that they do not change program order of the statements in the intermediate representation. This property allows the result of the code generation transformations to be provided back to the polyhedral loop transformation mechanisms in a program statement view, via a new re-entrance path of the illustrative embodiments, for additional optimization. In addition, mechanisms are provided for ensuring code stabilization in the presence of conditions such that code bloat is not encountered during re-entrance.
-
Citations
20 Claims
-
1. A method, in a data processing system, for optimizing program code, comprising:
-
receiving source code for a program in a compiler executed by at least one processor of the data processing system; transforming, by the at least one processor, the source code into a first program statement view of the source code; transforming, by the at least one processor, the first program statement view of the source code into a program loop view of the source code; applying, by the at least one processor, one or more code generation optimizations to the program loop view of the source code to generate first optimized code; generating, by a polyhedral rescan module of a re-entrance path executed by the at least one processor, a second program statement view of the source code based on the first optimized code and information maintained for each statement in the first program statement view, describing how the source code was transformed into the first program statement view; generating, by the at least one processor, second optimized code based on the second program statement view of the source code; and outputting, by the at least one processor, optimized code, based on the second optimized code, to the compiler for use in generating executable code for execution on a computing device, wherein generating the second program statement view via the re-entrance path comprises recombining instances of statements in the program loop view prior to a polyhedral rescan operation of the re-entrance path being performed on the program loop view of the source code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer program product comprising a computer readable storage medium having a computer readable program stored thereon, wherein the computer readable program, when executed on a computing device, causes the computing device to:
-
receive source code for a program in a compiler; transform the source code into a first program statement view of the source code; transform the first program statement view of the source code into a program loop view of the source code; apply one or more code generation optimizations to the program loop view of the source code to generate first optimized code; generate, by a polyhedral rescan module of a re-entrance path, a second program statement view of the source code based on the first optimized code and information maintained for each statement in the first program statement view, describing how the source code was transformed into the first program statement view; generate second optimized code based on the second program statement view of the source code; and output optimized code, based on the second optimized code, to the compiler for use in generating executable code for execution on a computing device, wherein generating the second program statement view via the re-entrance path comprises recombining instances of statements in the program loop view prior to a polyhedral rescan operation of the re-entrance path being performed on the program loop view of the source code. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A system, comprising:
-
a processor; and a memory coupled to the processor, wherein the memory comprises instructions which, when executed by the processor, cause the processor to; receive source code for a program in a compiler; transform the source code into a first program statement view of the source code; transform the first program statement view of the source code into a program loop view of the source code; apply one or more code generation optimizations to the program loop view of the source code to generate first optimized code; generate, by a polyhedral rescan module of a re-entrance path, a second program statement view of the source code based on the first optimized code and information maintained for each statement in the first program statement view, describing how the source code was transformed into the first program statement view; generate second optimized code based on the second program statement view of the source code; and output optimized code, based on the second optimized code, to the compiler for use in generating executable code for execution on a computing device, wherein generating the second program statement view via the re-entrance path comprises recombining instances of statements in the program loop view prior to a polyhedral rescan operation of the re-entrance path being performed on the program loop view of the source code. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification