Patent ID: 7730463
Filing Date: 2010-06-01
Classification: G06F

Abstract:
1. A computer implemented method for automatically generating SIMD code, comprising: analyzing, by a processing unit, data to be accessed by a targeted loop, the targeted loop comprising at least one statement, each at least one statement having at least one memory reference, to determine whether memory accesses are both memory protection system safe and false sharing safe; responsive to a determination that memory accesses are both memory protection system safe and false sharing safe, simdizing the targeted loop; responsive to a determination that memory accesses are not both memory protection system safe and false sharing safe, determining whether a scheme can be applied in which safety does not need to be guaranteed; responsive to a determination that a scheme in which safety does not need to be guaranteed can be applied, applying the scheme and simdizing the targeted loop according to the applied scheme; responsive to a determination that a scheme in which safety does not need to be guaranteed cannot be applied, determining whether padding is appropriate; responsive to a determination that padding is appropriate, padding the data and simdizing the targeted loop; and responsive to a determination that padding is not appropriate, generating non-simdized code based on the targeted loop for handling boundary conditions, simdizing the targeted loop, and combining the simdized targeted loop with the non-simdized code.