US 7,478,377 B2
SIMD code generation in the presence of optimized misaligned data reorganization
Alexandre E. Eichenberger, Chappaqua, N.Y. (US); Kai-Ting Amy Wang, North York (Canada); and Peng Wu, Mt. Kisco, N.Y. (US)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Aug. 16, 2004, as Appl. No. 10/918,996.
Application 10/918996 is a continuation in part of application No. 10/862483, filed on Jun. 07, 2004, granted, now 7,386,842.
Prior Publication US 2005/0283774 A1, Dec. 22, 2005
Int. Cl. G06F 9/45 (2006.01)
U.S. Cl. 717—150  [717/160] 5 Claims
OG exemplary drawing
 
1. A computer-implemented method comprising:
identifying a loop, which includes original operations, iterating over a plurality of continuous streams of memory in a stride-one fashion;
generating a data reorganization graph from the loop, wherein the data reorganization graph tracks an absolute alignment of data for the plurality of continuous streams of memory, and wherein the data reorganization graph includes nodes and edges, the nodes being vector representations of the original operations and the edges representing operation results of the vector representations of the original operations;
applying a shift placement policy to the data reorganization graph by inserting stream shift nodes in the data reorganization graph so as to satisfy alignment constraints of simdized operations, wherein the shift placement policy is selected from the group consisting of an eager shift policy, a lazy shift policy, and a dominant shift policy, the shift placement policy further comprising:
wherein the eager shift policy shifts an output stream of each load operation directly to an alignment of a store operation using stream shift operations inserted in proximity to the load operation;
wherein the lazy shift policy shifts the output stream of each of the load operations directly to the alignment of the store operation using the stream shift operations inserted in proximity to a root of the data reorganization graph while still adhering to the alignment constraints of each of the simdized operations; and
wherein the dominant shift policy shifts the output stream of each of the load operations to a most dominant alignment in the data reorganization graph using the shift stream operations, and shifts data streams going into the store operation directly to the alignment of the store operation using the stream shift operations inserted in proximity to the store operation;
identifying, at compile time, that one or more of the stream shift operations included in the data reorganization graph is configured to shift data in a direction that is based upon a runtime input; and
in response to identifying that one or more of the stream shift operations included in the data reorganization graph is configured to shift the data in the direction that is based upon the runtime input, transforming, at compile time, the data reorganization graph into to a different data reorganization graph, the different data reorganization graph including modified stream shift operations that correspond to the one or more identified stream shift operations, wherein the modified stream shift operations shift the data in a direction independent of the runtime input.