Insertion of Operation-and-Indicate Instructions for Optimized SIMD Code
First Claim
1. A method, in a data processing system, for inserting instructions into code for checking for in-data path special exception values indicative of deferred exception conditions, comprising:
- analyzing, by a compiler executing on a processor of the data processing system, a portion of first code to identify at least one non-speculative instruction performing a designated non-speculative operation in the first code that is a candidate for replacement by an operation-and-indicate instruction that performs the designated non-speculative operation and further performs an indication operation for indicating any exception conditions corresponding to in-data path special exception values present in vector slots of vector register inputs to the operation-and-indicate instruction;
replacing, by the compiler executing on the processor, the at least one non-speculative instruction performing a designated non-speculative operation in the first code with the operation-and-indicate instruction; and
generating, by the compiler executing on the processor, second code based on the replacement of the at least one non-speculative instruction in the first code.
2 Assignments
0 Petitions
Accused Products
Abstract
Mechanisms are provided for inserting indicated instructions for tracking and indicating exceptions in the execution of vectorized code. A portion of first code is received for compilation. The portion of first code is analyzed to identify non-speculative instructions performing designated non-speculative operations in the first code that are candidates for replacement by replacement operation-and-indicate instructions that perform the designated non-speculative operations and further perform an indication operation for indicating any exception conditions corresponding to special exception values present in vector register inputs to the replacement operation-and-indicate instructions. The replacement is performed and second code is generated based on the replacement of the at least one non-speculative instruction. The data processing system executing the compiled code is configured to store special exception values in vector output registers, in response to a speculative instruction generating an exception condition, without initiating exception handling.
-
Citations
20 Claims
-
1. A method, in a data processing system, for inserting instructions into code for checking for in-data path special exception values indicative of deferred exception conditions, comprising:
-
analyzing, by a compiler executing on a processor of the data processing system, a portion of first code to identify at least one non-speculative instruction performing a designated non-speculative operation in the first code that is a candidate for replacement by an operation-and-indicate instruction that performs the designated non-speculative operation and further performs an indication operation for indicating any exception conditions corresponding to in-data path special exception values present in vector slots of vector register inputs to the operation-and-indicate instruction; replacing, by the compiler executing on the processor, the at least one non-speculative instruction performing a designated non-speculative operation in the first code with the operation-and-indicate instruction; and generating, by the compiler executing on the processor, second code based on the replacement of the at least one non-speculative instruction in the first code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A computer program product comprising a computer readable storage medium having a computer readable program recorded thereon, wherein the computer readable program, when executed on a computing device, causes the computing device to:
-
analyze a portion of first code to identify at least one non-speculative instruction performing a designated non-speculative operation in the first code that is a candidate for replacement by an operation-and-indicate instruction that performs the designated non-speculative operation and further performs an indication operation for indicating any exception conditions corresponding to in-data path special exception values present in vector slots of vector register inputs to the operation-and-indicate instruction; replace the at least one non-speculative instruction performing a designated non-speculative operation in the code with the operation-and-indicate instruction; and generate second code based on the replacement of the at least one non-speculative instruction.
-
-
20. A method, in a data processing system, for inserting instructions into code for checking for special values indicative of deferred exception conditions, comprising:
-
analyzing, by a processor of the data processing system, first code to identify at least one non-speculative instruction performing a designated non-speculative operation in the first code that is a candidate for replacement by an operation-and-indicate instruction that performs the designated non-speculative operation and further performs an indication operation for indicating any exception conditions corresponding to in-data path special exception values present in vector slots of vector register inputs to the operation-and-indicate instruction; replacing, by the processor, the at least one non-speculative instruction performing a designated non-speculative operation in the code with the operation-and-indicate instruction; generating, by the processor, second code based on the replacement of the at least one non-speculative instruction; executing the second code in the processor or another processor of the data processing system, or in another computing device; tracking exception conditions during execution of speculative instructions in the second code using special values indicative of the exception conditions, without invoking an exception handler; and executing the operation-and-indicate instruction in the second code to detect the special values and perform the operation and indication operation, wherein the indication operation causes the exception handler to be invoked.
-
Specification