Compiler retargeting based on instruction semantic models
First Claim
1. A computer implemented method for generating a description of compiler code selector rules from an architecture description, the compiler code selector rules for use in a compiler that translates source code into machine instructions of a target processor, the method comprising:
- accessing a target processor architecture model of the target processor, the target processor architecture model described in a processor architecture description language, the target processor architecture model comprising semantic information and syntax information for the machine instructions, and description of non-terminals of the target processor;
generating a plurality of semantic statements from semantic information included in the processor architecture model;
applying, to said semantic information, at least one semantic transformation from a library of pre-defined semantic transformations to generate a single semantic statement from a sequence of at least two of said plurality of semantic statements;
generating a plurality of basic rules that map from source code operations to machine instructions comprising;
accessing rules that map from source code operations to semantic patterns,searching said semantic statements for matches to said semantic patterns, andmapping a sequence of two or more source code operations to a single machine instruction based on the accessed rules that matches from semantic statements to semantic patterns; and
permuting said basic rules with non-terminals to generate a plurality of mappings that serve as said description of said compiler code selector rules.
5 Assignments
0 Petitions
Accused Products
Abstract
Generating a description of compiler code selector rules from an architecture description. A method comprises accessing a target architecture model written in an architecture description language (ADL) and extracting semantic information therefrom to generate a plurality of semantic statements. Rules that map from source code operations to semantic patterns are accessed. The semantic statements are searched for matches for the semantic patterns to generate mappings that serve as a description of compiler code selector rules.
-
Citations
19 Claims
-
1. A computer implemented method for generating a description of compiler code selector rules from an architecture description, the compiler code selector rules for use in a compiler that translates source code into machine instructions of a target processor, the method comprising:
-
accessing a target processor architecture model of the target processor, the target processor architecture model described in a processor architecture description language, the target processor architecture model comprising semantic information and syntax information for the machine instructions, and description of non-terminals of the target processor; generating a plurality of semantic statements from semantic information included in the processor architecture model; applying, to said semantic information, at least one semantic transformation from a library of pre-defined semantic transformations to generate a single semantic statement from a sequence of at least two of said plurality of semantic statements; generating a plurality of basic rules that map from source code operations to machine instructions comprising; accessing rules that map from source code operations to semantic patterns, searching said semantic statements for matches to said semantic patterns, and mapping a sequence of two or more source code operations to a single machine instruction based on the accessed rules that matches from semantic statements to semantic patterns; and permuting said basic rules with non-terminals to generate a plurality of mappings that serve as said description of said compiler code selector rules. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory computer readable medium configured to store instructions for generating a description of compiler selector rules from an architecture description, the compiler selector rules for use in a compiler that translates source code into machine instructions of a target processor, the instructions when executed by a processor cause the processor to:
-
access a target processor architecture model of the target processor, the target processor architecture model written in a processor architecture description language, the target processor architecture model comprising semantic information and syntax information for the machine instructions, and description of non-terminals of the target processor; generate a plurality of semantic statements from semantic information included in the processor architecture model; apply, to said semantic information, at least one semantic transformation from a library of pre-defined semantic transformations to generate a single semantic statement from a sequence of at least two of said plurality of semantic statements; generate a plurality of basic rules that map from source code operations to machine instructions comprising; accessing rules that map from source code operations to semantic patterns, searching said semantic statements for matches, and mapping a sequence of two or more source code operations to a single machine instruction based on the accessed rules that matches from semantic statements to semantic patterns; and permute said basic rules with said non-terminals to generate a plurality of mappings that serve as said description of said compiler code selector rules. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer implemented method for generating compiler code selector rules from an architecture description, the compiler code selector rules for use in a compiler that translates source code into machine instructions of a target processor, the method comprising:
-
generating a plurality of semantic statements from semantic information included in a target processor architecture model of a target processor, the target processor architecture model described in a processor architecture description language, said semantic information describing an instruction set, wherein said target processor architecture model comprises semantic information and syntax information for the machine instructions, and description of non-terminals of the target processor; associating assembly syntax with semantic information; applying, to said semantic information, at least one semantic transformation from a library of pre-defined semantic transformations to generate a single semantic statement from a sequence of at least two of said plurality of semantic statements; accessing basic rules having tree patterns that map from source code operations to semantic patterns; permuting said basic rules based on said non-terminals to form set of permuted mapping rules; and matching semantic patterns of said permuted mapping rules to said semantic statements to form a description of said complier code selector rules comprising mappings from source code operations to associated assembly syntax; and mapping a sequence of two or more source code operations to a single machine instruction based on the accessed rules that matches from semantic statements to semantic patterns. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
Specification