02-03-2017 дата публикации
Номер: US20170060594A1
Принадлежит:
A method for combining instructions, performed by a compiler, containing at least the following steps. First instructions are obtained, where each performs one of a calculation operation, a comparison operation, a logic operation, a selection operation, a branching operation, a LD/ST (Load/Store) operation, a SMP (sampling) operation and a complicated mathematics operation. The first instructions are combined as one combined instruction according to data dependencies between the first instructions. The combined instruction is sent to a SP (Stream Processor). 1. A method for combining instructions , performed by a compiler , the method comprising:obtaining a plurality of first instructions, wherein each first instruction performs one of a calculation operation, a comparison operation, a logic operation, a selection operation, a branching operation, a LD/ST (Load/Store) operation, a SMP (sampling) operation and a complicated mathematics operation;combining the first instructions as one combined instruction according to data dependencies between the first instructions; andsending the combined instruction to a SP (Stream Processor).2. The method of claim 1 , wherein the first instructions are combined according to the following rules:ALG+CMP+SEL;ALG+CMP+SEL+SFU/LS/SMP;ALG+CMP+Branch;ALG+LGC+SEL;ALG+LGC+SEL+SFU/LS/SMP; orALG+LGC+Branch,ALG indicates a calculation instruction, CMP indicates a comparison instruction, LGC indicates a logic instruction, SEL indicates a selection instruction, Branch indicates a branching instruction, SFU indicates a mathematics computation instruction, LS indicates a Load/Store instruction and SMP indicates a sampling instruction.3. The method of claim 1 , further comprising:obtaining a second instruction, wherein the second instruction is used for sending data from a CR (Common Register) or a CB (Constant Buffer) to another CR or a post-processing unit; andcombining the combined result for the first instructions with the second instruction ...
Подробнее