METHODS TO OPTIMIZE A PROGRAM LOOP VIA VECTOR INSTRUCTIONS USING A SHUFFLE TABLE AND A MASK STORE TABLE
First Claim
1. A computer-implemented method, comprising:
- receiving first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on values of a third array; and
generating second code representing the program loop with vector instructions, the second code includinga shuffle instruction to shuffle elements of the first array based on the third array using a shuffle table in a vector manner, anda store instruction to store the shuffled elements of the first array in the second array using a mask store table in a vector manner.
1 Assignment
0 Petitions
Accused Products
Abstract
According to one embodiment, a code optimizer is configured to receive first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on values of a third array. The code optimizer is configured to generate second code representing the program loop with vector instructions including a shuffle instruction and a store instruction, the store instruction to shuffle using a shuffle table elements of the first array based on the second array in a vector manner, the store instruction to store using a mask store table the shuffled elements in the third array in a vector manner.
47 Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
receiving first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on values of a third array; and generating second code representing the program loop with vector instructions, the second code including a shuffle instruction to shuffle elements of the first array based on the third array using a shuffle table in a vector manner, and a store instruction to store the shuffled elements of the first array in the second array using a mask store table in a vector manner. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer-readable storage medium having instructions stored therein, which when executed by a computer, cause the computer to perform a method, the method comprising:
-
receiving first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on values of a third array; and generating second code representing the program loop with vector instructions, the second code including a shuffle instruction to shuffle elements of the first array based on the third array using a shuffle table in a vector manner, and a store instruction to store the shuffled elements of the first array in the second array using a mask store table in a vector manner. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. An apparatus, comprising:
-
a memory to store a shuffle table and a mask store table; and a code optimizer to receive first code having a program loop implemented with scalar instructions to store values of a first array to a second array based on values of a third array and to generate second code representing the program loop with vector instructions, the second code including a shuffle instruction to shuffle elements of the first array based on the third array using the shuffle table in a vector manner, and a store instruction to store the shuffled elements of the first array in the second array using the mask store table in a vector manner. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification