CN101076776A - Method and structure for explicit software control of data speculation - Google Patents

Method and structure for explicit software control of data speculation Download PDF

Info

Publication number
CN101076776A
CN101076776A CN 200580009867 CN200580009867A CN101076776A CN 101076776 A CN101076776 A CN 101076776A CN 200580009867 CN200580009867 CN 200580009867 CN 200580009867 A CN200580009867 A CN 200580009867A CN 101076776 A CN101076776 A CN 101076776A
Authority
CN
China
Prior art keywords
speculative
data
carry out
state
computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200580009867
Other languages
Chinese (zh)
Inventor
克里斯托夫·布朗
奎因·A·雅各布森
沙伊伦德尔·乔杜里
马克·特伦布莱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Microsystems Inc
Original Assignee
Sun Microsystems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Microsystems Inc filed Critical Sun Microsystems Inc
Publication of CN101076776A publication Critical patent/CN101076776A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)

Abstract

Explicit software control is used for data speculations. The explicit software control (140) is applied at selected locations in a computer program (130) to provide the benefit of data speculation while eliminating the need for hardware to perform data speculation. A computer-based method first determines, via explicit software control, whether data speculation for an item, a variable, a pointer, an address, etc., is needed (310). Upon determining that data speculation for the item is needed, the data speculation (320) is performed under explicit software control. Conversely, if the explicit software control determines that data speculation is not needed, e.g., the value of the item typically obtained by execution of a long latency instruction, is available, an original code segment is executed using an actual value of the item (330).

Description

The method and structure of the explicit software control of data-speculative
Related application
The application's case advocates that on March 31st, 2004, the title of application was that " Method And Structure For ExplicitSoftware Control Of Data Speculation " and inventor are the U.S. Provisional Application case the 60/558th of Christof Braun, Quinn A.Jacobson, Shailender Chaudhry and Marc Tremblay, No. 377 benefit, the mode that described application case is quoted is in full incorporated this paper into.
Technical field
The present invention relates generally to the performance of enhancement process device, and relates to the method for data-speculative or rather.
Background technology
For strengthening the performance of modern processors, use various technology to increase the number of instructions of carrying out in cycle preset time.A kind of in these technology is data-speculative.
Data-speculative relates generally to the form of supposition, wherein data value (source of computing or result) is predicted to destroy data dependency.By destroying data dependency, can issue more multiple instruction concurrently.Use the check of certain form to guarantee to predict to be correct, and under the situation that mistake is inferred, back up.If infer correctly, so just carry out the operation of potential dependence concurrently, thereby reduce the absolute execution time.
The data-speculative that has proposed various ways increases instruction-level parallelism (ILP), and proposes many hardware mechanisms and come number of support by inference.For the operation of high latency, data-speculative is most important.
To be prediction one be written into the value that instruction is returned near what miss in the storer cache memory of processor to the application example of hardware based data-speculative.If measurable, being written into still, carry out the successor instruction of depending on described value so finishing when middle by being written into the value of returning.When being written into when finishing, supposition is tested, and will be considered as correct for the work that successor instruction is finished and it is submitted to, perhaps must discard the work of being finished.
Need two kinds of basic things to carry out data-speculative work.At first, must there be a kind of good method to come predict command will use maybe with the data value that produces.Prediction can be from observing previous behavior and using the hardware mechanisms of previous behavior prediction behavior in the future.Prediction also can be incorporated in the software application itself.
Data value infers that second kind of required things is the hardware supported that is used to infer execution.Must can submit to architecture states after a while or all successor instructions (its use predicted data value) after carrying out future position of the mode that under the situation that does not influence architecture states, goes out of use with instruction.Must exist the actual data value of supporting to write down employed predicted data value and predicted data value and instruction being returned to compare, and the submission of initial successor instruction or discarded.
Summary of the invention
According to one embodiment of present invention, use explicit software control to carry out data-speculative.Select location in computer program is used explicit software control so that the benefit of data-speculative to be provided, and eliminates simultaneously by hardware actual figure needs by inference.
Therefore, in one embodiment, a kind of computer-based method determines whether and need carry out data-speculative to project, variable, pointer, address etc. by explicit software control.In case determine and need carry out data-speculative to described project, just actual figure is by inference under explicit software control.On the contrary,, for example instruct the item value that obtains to use by carrying out a high latency usually, carry out a source code section with regard to the actual value of using described project so if explicit software control do not need to determine data-speculative.
In an example, determine whether that need carry out data-speculative to project comprises execution one buffer status instruction branch.This instruction appears a processor scoring plug, and allows software to determine the state of project in the described scoring plug.
In an example, under explicit software control actual figure comprise by inference the guiding hardware to a state fix a point the check to obtain a snapshot state.Item value is set at the predicted value of described project, and uses described predicted value to replace actual value to carry out the source code section subsequently.In case finish the execution of described source code section, just the predicted value of project and the actual value of project compared.If two values equate, just submit the result of the predicted value execution source code section of use project to.On the contrary,, just make state be retracted into snapshot state, and use actual value to carry out the source code section if two values are unequal.
For this embodiment, a kind of structure comprises: the member that is used for determining whether to carry out a project data-speculative under explicit software control; Be used in case when determining to need data-speculative actual figure member by inference under explicit software control just.Described structure also comprises and is used for carrying out the member of source code section with regard to the actual value of using project when in a single day determining not need data-speculative.
In one embodiment, the described actual figure member by inference that is used for comprises and is used to guide hardware that one state is fixed a point to check to obtain the member of a snapshot state.The described actual figure member by inference that is used for also comprises: the member that is used for item value is set at the predicted value of project; The member of carrying out the source code section with being used to use predicted value to replace actual value.The described actual figure member by inference that is used for further comprises: be used for member that predicted value and actual value are compared; Be used in case described predicted value when equaling described actual value, is just submitted the member that uses predicted value to carry out the result of source code section to.
For example, carry out the processor of these instructions in computer executable instructions that can be by using storage and the computer system and implement these members.Described computer system can be workstation, portable computer, client-server system, or the combination of Net-connected computer, medium etc.
A kind of computer system comprises that a processor and is coupled to described processor and wherein stores the storer of instruction.When carrying out described instruction on described processor, a kind of method comprises:
Under explicit software control, determine whether and to carry out data-speculative to a project; With
In case need to determine data-speculative, just under explicit software control, carry out data-speculative for described project.
A kind of computer program comprises that one is configured to store or transmit the medium of the computer-readable code that is used for a method, and described method comprises:
Under explicit software control, determine whether and to carry out data-speculative to a project; With
In case need to determine data-speculative, just under explicit software control, carry out data-speculative for described project.
In another embodiment, a kind of computer-based method comprises: carry out buffer status instruction branch; In case buffer status is first state, carries out the source code section with regard to the actual value of using register; In case with buffer status be second state that is different from described first state, just under explicit software control, alternatively carry out data-speculative for the source code section.
For this embodiment, a kind of structure comprises: the member that is used to carry out buffer status instruction branch; In case be used for when buffer status is first state, carrying out the member of source code section with regard to the actual value of using register; In case with being used at buffer status is when being different from second state of described first state, just alternatively carries out the member for the data-speculative of described source code section under explicit software control.
For example, carry out the processor of these instructions in computer executable instructions that can be by using storage and the computer system and implement these members.Described computer system can be workstation, portable computer, client-server system, or the combination of Net-connected computer, medium etc.
For this embodiment, a kind of computer system comprises that a processor and is coupled to described processor and wherein stores the storer of instruction.When carrying out described instruction on described processor, a kind of method comprises:
Carry out buffer status instruction branch;
In case buffer status is first state, carries out the source code section with regard to the actual value of using register; With
In case buffer status is second state that is different from described first state, just under explicit software control, alternatively carry out data-speculative for described source code section.
A kind of computer program comprises that one is configured to store or transmit the medium of the computer-readable code that is used for a method, and described method comprises:
Carry out buffer status instruction branch;
In case buffer status is first state, carries out the source code section with regard to the actual value of using register; With
In case described buffer status is second state that is different from described first state, just under explicit software control, alternatively carry out data-speculative for described source code section.
In another embodiment, whether a kind of method: determining needs a project is carried out data-speculative in a computer source program if comprising; With in described computer source program, insert computer program code, described computer program code is in case the explicit software control just provide described data-speculative is provided.
For this embodiment, a kind of structure comprises: the member that is used for determining whether needing a project is carried out in a computer source program data-speculative; With the member that is used for inserting in described computer source program computer program code, described computer program code is in case the explicit software control that just provides described data-speculative is provided.
For example, carry out the processor of these instructions in computer executable instructions that can be by using storage and the computer system and implement these members.Described computer system can be workstation, portable computer, client-server system, or the combination of Net-connected computer, medium etc.
For this embodiment, a kind of computer system comprises: a processor and is coupled to described processor and wherein stores the storer of instruction.When carrying out described instruction on described processor, a kind of method comprises:
Whether determine needs a project is carried out data-speculative in a computer source program; With in described computer source program, insert computer program code, described computer program code is in case the explicit software control just provide described data-speculative is provided.
A kind of computer program comprises that one is configured to store or transmit the medium of the computer-readable code that is used for a method, and described method comprises:
Whether determine needs a project is carried out data-speculative in a computer source program; With
Insert computer program code in described computer source program, described computer program code is in case the explicit software control that just provides described data-speculative is provided.
In another embodiment, a kind of structure comprises: be used to carry out the member of an instruction with the fixed point check of executing state; With the member that is used to begin at least one supposition execution of instructing.Described structure further comprises: be used for the member in the work of finishing in case described supposition is carried out with regard to described supposition for ratification when running succeeded; With the member that is used for when in a single day described supposition work is failed, just discarding described work and is retracted into described state.
Description of drawings
Fig. 1 comprises that one contains the block scheme of system of the source program of single-threaded data-speculative code sequence, and described single-threaded data-speculative code sequence provides the explicit software control according to the data-speculative of first embodiment of the invention.
Fig. 2 is for the suitable some insertion in a source machine program is used for the processing flow chart of an embodiment of the single-threaded data-speculative code sequence of the explicit software control of data-speculative according to one embodiment of the invention.
Fig. 3 is the processing flow chart of the explicit software control of data-speculative according to an embodiment of the invention.
Fig. 4 is the processing flow chart of the explicit software control of data-speculative according to another embodiment of the present invention.
Fig. 5 uses the advanced network system figure of some alternate embodiments of the source program of the single-threaded data-speculative code sequence comprise the explicit software control that data-speculative is provided for explanation.
In graphic, the element with same reference numbers is identical or like.Equally, first numerical digit of reference number is indicated graphic number, and the element that wherein is associated with described reference number occurs first.
Embodiment
According to one embodiment of present invention, under explicit software control, carry out data-speculative for project.A series of software instructions on the processor 170 of computer system 100 in fill order's thread-data speculated code sequence 140.
Execution to the software instruction series in the single-threaded data-speculative code sequence 140 causes computer system 100:(i) determine whether and need carry out data-speculative project, and cause computer system when needing data-speculative: (ii) the state to computer system 100 carries out snapshot (snapshot) and keeps the ability that is retracted into described snapshot state, (iii) carry out data-speculative for project, (iv) carry out the code segment that uses the data-speculative result, (v) whether specified data is inferred effective, if (vi) data-speculative is effective, just submit supposition work to and continue and carry out, or (, just be retracted into snapshot state and continue and carry out if vii) data-speculative is invalid.
The user can use explicit software control to control use for the data-speculative of project in source program 130.Perhaps, for example, a compiler or optimization interpreter can exist the some place of high latency instruction to insert the instruction that explicit software control is provided the data-speculative about project in expection when process source program 130.
Or rather, in one embodiment, use and handle 200 update routine codes, so that use explicit software control to come control data to infer.Operate in 201 in the high latency instruction check, whether execution command is expected will need a large amount of processor cycle to determine.If the instruction expection can not need a large amount of processor cycles, handle normal the continuation so, and code can not comprise the explicit software control to the data-speculative of the project relevant with the high latency instruction through modification.On the contrary, if instruction expection will need a large amount of processor cycles, handle the explicit software control operation 202 that forwards data-speculative to so, wherein the explicit software control instruction for the data-speculative of project is contained in the source program 130.
In this embodiment, add instruction to source program 130, in a single day described instruction carries out just actual figure checked operation 210 by inference.Explain more fully that as following the execution of this instruction provides the explicit control whether data-speculative is carried out to program.If do not need data-speculative, promptly item value can be used, and handles normal the continuation so.On the contrary, data-speculative if desired, data-speculative checked operation 210 forwards processing to the data-speculative operations 211 of software control so.
In this embodiment, in the data-speculative operations 211 of software control, make aforesaid operations (ii) to (vii) carrying out in response to the execution of software code sections thereby comprise instruction.Exactly, 170 pairs of states of software instruction bootstrap processor carry out snapshot and management to all follow-up changes of described state, thus the state when processor 170 can be returned to snapshot where necessary.
The snapshot that is obtained depends on the state of being caught.In one embodiment, described state is a system state.In another embodiment, described state is a machine state, and in another embodiment, described state is a processor state.In each case, successor operation is identical.
After the snapshot, the value of actual figure project by inference is set at the predicted value that equals described project.Subsequently, use described project forecast value to carry out the source code sequence.
After the execution of completion code sequence, the predicted value of project and the actual value of project are compared.If two values are identical, so just submit result calculated to, just otherwise make state be retracted into snapshot state, and continue to carry out with the actual value of project.
For the explicit software control of favourable data-speculative, software application has three kinds of features ideally.The first, the operation that can utilize described result is necessarily arranged after high latency.Prevailing reason is the high latency operation similar with frequently missing being written into of cache memory.The second, the result of operation is predictable.The 3rd, successor operation depends on the result of high latency operation.
In one embodiment, use software to implement to handle 200, and the identification of described software will be carried out each instruction that the value that produced is inferred to instruction.This can be indicated by the programmer, compiler analysis or analyzer (profiler) feedback and finishing.Be independent of the processing in order to recognition instruction, described processing determines that it is potential favourable destroying data dependency by the end value of speculative operations.
In the title of Quinn A.Jacobson No. the 10/349th, 425, the United States Patent (USP) sequence number of amortizing jointly, disclosed and be used for determining where the explicit software control of data-speculative being inserted in other embodiment of (for example insertion point) at source program 130 for " METHOD AND STRUCTURE FOR CONVERTINGDATA SPECULATION TO CONTROL SPECULATION ".The mode that the summary of the invention that No. the 10/349th, 425, the U.S. patent application case sequence number, description of drawings, embodiment and graphic, claims of wherein quoting and specification digest are quoted is in full incorporated this paper into.The code segment that inserts in No. the 10/349th, 425, the U.S. patent application case sequence number will be replaced by the following explicit software control of describing more fully.Equally, the embodiment that please notes No. the 10/349th, 425, U.S. patent application case sequence number is the example of other embodiment of the explicit software control of data-speculative.
Fig. 3 is to use method 200 to add so that the more detailed processing flow chart to the method 300 of an embodiment of the instruction of the explicit software control of the data-speculative of project to be provided.For further specifying method 300, below list the pseudo-code that is used for various examples.List choosing in the table 1 and carry out the example false code section of data-speculative.
Table 1
1?Producer_OP?A,B->%rZ
2?Consumer_OP%rZ,C->D
The 1st row (line number is not the part of pseudo-code, and only is used for reference) is operation Producer_OP, and its result who uses project A and B also will operate places register%rz.Operation Producer_OP can be any operation of supporting in the instruction set.Project A and B only need two inputs as placeholder to indicate this specific operation.Various embodiment of the present invention also is applicable to have single input or more than the operation of two inputs.Register %rZ can be any register.The result of operation Producer_OP is just available up to high latency after, and expected results is for being worth N, and wherein N is a value available in an absolute value or the register.
The 2nd row is operation Consumer_OP.Operation Consumer_OP uses the result who is stored in the operation Producer_OP among the register %rZ.Project C and D only need two input %RZ and C as placeholder to indicate this specific operation, and have output D.Though operate Consumer_OP in this embodiment by the pseudo-representation of single file, operation Consumer_OP represents a code segment that uses the result of operation Producer_OP.Described code segment can comprise the delegation in the multirow software code more.
List during the Insert_21 to Insert_30 of table 2 is capable by use and be used for the pseudo-code that the method 200 of the pseudo-code of table 1 produces.
Table 2
1?Producer_OP?A,B->%rZ
Insert_21?if?data_speculation,branch?predict
Insert_22?original:
2?Consumer_OP%rZ,C->D
Insert_23?continue:
Insert_24<update?prediction?for?result?of?Producer-OP>
Insert_25?predict;
Insert_26?checkpoint,original
Insert?27<Compute?or?use?prediction?for?result?of
Producer_OP?and?store?in%rZl>
Insert?28?Consumer_OP%rZl,C->D
Insert_29?If%rZ==%rZl,commit,else?fail
Insert_30?ba?continue
Equally, line number is not the part of pseudo-code, and only is used for reference.
In this example, the 1st row is identified as an insertion point, and therefore using method 200 is inserted the code segment that comprises each row of Insert_21, Insert_22, Insert_23, Insert_24, Insert_25, Insert_26, Insert_27, Insert_28, Insert_29 and Insert_30.The particular implementation of this instruction sequence depends on and comprises following some or all factor: (i) is used for the computer programming language of source program 130, (ii) is used for the operating system of computer system 100, and the (iii) instruction set of processor 170.By this announcement, the those skilled in the art can implement conversion in any related system.
The row that inserts at first is discussed, is considered method 300 subsequently in more detail.Insert_21 is capable to be current control statement with good conditionsi, and it is in case execution need just to determine whether data-speculative, and whether the actual result of for example operating Producer_OP is available.Data-speculative if desired, the result who for example operates Producer_OP is unavailable, handles just being branched off into label predict so, and it is that Insert_25 is capable.Otherwise processing is proceeded, and arrives the 2nd row by label original (Insert_22 is capable).
Insert_23 behavior label continue.After the result who submits data-speculative to, handle forwarding label continue to.When not needing data-speculative, or when data-speculative is failed, handle also and shift by label continue.
Insert_24 behavior one code segment, it upgrades the prediction of the value of operation Producer_OP.Here the type of value prediction is depended in the instruction that comprises.If use the definite value prediction, this instruction is non-operation instruction so.In other embodiments, can implement art value (last-value) or cross over predicted value.Substantially, the those skilled in the art can use suitable value prediction mechanism in software.
Insert_26 is capable to be that bootstrap processor is carried out the state snapshot and kept the instruction that makes state be retracted into the ability of snapshot state.In this example, use certain some check instruction.
Marc Tremblay, Quinn A.Jacobson, Shailender Chaudhry, Mark S.Moir and MauriceP.Herlihy in the title of on January 23rd, 2004 application for No. the 10/764th, 412, the U.S. patent application case sequence number of amortizing jointly of " Selectively Unmarking Load-Marked CacheLines During Transactional Program Execution " in explanation about the method for fixed point check command and the more detailed description of structure.The mode that the summary of the invention that No. the 10/764th, 412, the U.S. patent application case sequence number, description of drawings, embodiment and graphic, claims of wherein quoting and specification digest are quoted is in full incorporated this paper into.
In this embodiment, the grammer of fixed point check command is:
checkpoint,<label>
Wherein instruct the execution of checkpoint to cause that processor carries out snapshot to the state of this thread.Label<label〉be when fixed point check (implicitly or explicitly) failure, to handle with the position that forwards to.
After processor carried out snapshot to state, processor (for example) buffering was used for the new data of each position of snapshot state.Processor monitors also whether another thread execution will influence the operation of inferring the state of carrying out, and for example the position in the fixed point test status writes, or storage one value in the position in the fixed point test status.If detect this operation, so just remove supposition work, recover snapshot state, and processing is branched off into label<label 〉.This is the implicit expression failure of data-speculative.
The explicit failure of fixed point check is caused by the execution of statement Fail.The execution of statement Fail causes that processor abandons supposition work, makes recovering state to snapshot state, and is branched off into label<label 〉.The execution of statement Commit causes all supposition work that processor submits to certainly the most last fixed point check to finish later.
In case Insert_27 is capable is to carry out the predicted value of just determining operation Producer_OP and predicted value is stored in instruction or code segment among the register %rZl.For instance, if use the definite value prediction, just definite value is moved among the register %rZl.
During Insert_28 was capable, the code segment of the 2nd line display was replaced by a similar code segment, wherein used the actual value of predicted value rather than operation Producer_OP,, replaced register %rz at source code Duan Zhongyong register %rzl that is.
During Insert_29 is capable, the predicted value of operation Producer_OP and the actual value of operation Producer_OP are compared.If two values equate that the work of inferring is so submitted to by the execution of instruction commit.If two values do not wait, so just remove supposition work, make state be back to snapshot state, and the execution of handling by instruction fail forward label original to.Therefore, if it is capable to arrive Insert_30, the work of inferring is so submitted to, and therefore processing always is branched off into label continue.
When the code segment in the execution list 2 on processor 170, manner of execution 300.In data-speculative checked operation 310, test to determine whether instruction needs data-speculative for high latency.For instance, if the result of high latency instruction is available, data-speculative will can not strengthened the property so.Therefore, but when result's time spent of high latency instruction, checked operation 310 forwards processing to the operation 330 of using actual value to carry out the source code section.Otherwise when the result of high latency instruction was unavailable, checked operation 310 forwarded processing under the explicit software control data-speculative operations 320.
Among the embodiment of the data-speculative operations 320 under explicit software control, the operation 321 of guiding hardware fixed point test status causes the snapshot (snapshot state) of the current state of will be undertaken by processor 170.In case finish fixed point test status operation 321, just handle from operating 321 and forward actual figure by inference 322 to.
Actual figure 322 will instruct the item value that obtains to be set at a predicted value by executive chairman's stand-by period by inference.In case complete operation 322 is just handled and is forwarded the operation 323 of using predicted value to carry out the source code section to from operating 322.
In the operation 323, in the source code section, replace actual value to carry out the source code section with predicted value.If the term of execution have implicit expression fixed point check failure, data-speculative stops so, and handles from operating 323 and forward the operation 325 that is retracted into the fixed point test status to.On the contrary, in case complete successfully execution, just handle and forward the checked operation 324 that prediction equals reality to from operating 323.
Prediction equals actual checked operation 324 predicted value and the actual value that high latency instructs is compared.If two values equate, it is effective to operate 323 result so, and handles to forward to and submit the operation of inferring 326 to, and it submits the result based on the execution of data-speculative successively to.If two values do not wait, it is invalid to operate 323 result so, and handles and forward the operation 325 that is retracted into the fixed point test status to.
In the operation 325 of returning the fixed point test status, recover snapshot state as virtual condition, and handle the operation 330 that forwards use actual value execution source code to.The operation 330 of using actual value to carry out source code uses the actual value of high latency instruction to carry out the source code section.
Method 400 is another embodiment of the processing flow chart of the data-speculative under the explicit software control.In this embodiment, use novel data ready checked operation 410.The embodiment of one branch of user mode instruction (for example branch of buffer status instruction) implements checked operation 410.When the branch of buffer status instruction is scheduled, the scoring plug 173 of the execution test processor 170 of buffer status instruction branch.If buffer status is ready, carries out so and proceed.If buffer status for not ready, is carried out a label of appointment in the branch that just is branched off into the buffer status instruction so.The form of an embodiment of the branch of buffer status instruction is:
Branch_if_not_ready%reg?label
Wherein
%reg is the register in the scoring plug 173, and scoring plug 173 is the hardware instruction scoring plug in this embodiment, and label is the label in the data-speculative code segment.
By this instruction, the pseudo-code of table 2 becomes:
Table 3
1?Producer_OP?A,B->%rZ
Insert_31?Branch_if_not_ready%rZ?predict
Insert_22?original:
2?Consumer_OP%rZ,C->D
Insert_23?continue:
Insert_24<update?prediction?for?result?of?Producer?OOP>
Insert_25?predict;
Insert_26?checkpoint,original
Insert?27<Compute?or?use?prediction?for?result?of
Producer_OP?and?store?in%rZl>
Insert?28?Consumer_OP%rZl,C->D
Insert_29?If%rZ==%rZl,commit,else?fail
Insert_30?ba?continue
Importantly, utilize the code of buffer status instruction branch to understand schedule rule and the expection stand-by period of operating.If after one is written into instruction, issue the not branch of ready instruction immediately, so the instruction will be written into usually be considered as not ready, because (for example) even, be written into the minimum latency that still has three cycles for one-level data cache hit (cache hit).
At Marc Tremblay, the title of Shailender Chaudhry and Quinn A.Jacobson (attorney docket SUN040062) is the co-applications of " METHOD AND STRUCTURE FOR EXPLICIT SOFTWARE CONTROLUSING SCOREBOARD STATUS INFORMATION ", the U.S. patent application case sequence number 11/xxx that amortizes jointly, novel branch to the status information instruction in xxx number has carried out more detailed description, the summary of the invention of described U.S. patent application case, embodiment, claims, the mode that the graphic and relevant drawings explanation of quoting in specification digest and these parts is quoted is in full incorporated this paper into.
Therefore, by carrying out the branch of buffer status instruction, the state of data ready checked operation 410 register %rZ in scoring plug 173 forwards operation 330 to when being ready, and forwards to when not ready at the state of register %rz and to operate 320.Operation 310 is identical with operation described above with 320, and this paper is incorporated in described description by reference into.
The those skilled in the art understands easily, and in this embodiment, the individual operation that previous associated methods 300 and 400 is mentioned is to instruct by computer program on the processor 170 of computer system 100 to carry out.In one embodiment, the computer readable program code (Fig. 5) that is used for method 540 is installed on one medium, wherein method 540 is the one or both in method 300 and 400, and the execution of described computer readable program code causes the above operation of explaining of processor 170 execution.
In one embodiment, computer system 100 is for being similar to the hardware configuration of personal computer or workstation.Yet in another embodiment, computer system 100 is the part of client-server computer system 500.For client-server computer system 500 or stand alone computer system 100, storer 120 comprises volatile memory (for example primary memory 510) and nonvolatile memory 511 (for example hard disk drive) usually.
Though storer 120 is illustrated as unified structure in Fig. 1, this should not be construed as all storeies that require in the storer 120 and all is in identical physical location.Storer 120 all or part of is in the physical location different with processor 170.For instance, method 540 can be stored in the storer that is physically located at the position different with processor 170.
Processor 170 should be coupled to the storer that contains method 540.This can be at a client-server system or by finishing with being connected of another computing machine with the digital carrier circuit with analog line or digital interface via modulator-demodular unit.For instance, all or part of of storer 120 is arranged in WWW (World Wide Web) inlet, and processor 170 is arranged in (for example) personal computer.
Or rather, in one embodiment, computer system 100 can be portable computer, workstation, server computer, or any other equipment of executing method 540.Similarly, in another embodiment, computer system 100 can comprise a plurality of various computing machines, wireless device, server computer, or by any required combination of interconnection with these equipment of execution methods described herein 540.
Herein, computer program comprises medium, and it is configured to store or transmit the computer-readable code that is used for method 540, or has wherein stored the computer-readable code that is used for method 540.Some examples of computer program are the server on CD-ROM laser disc, ROM card, floppy disk, tape, computer hard-drive machine, the network, and at the signal of the expression computer readable program code of transmission over networks.
Herein, computer memory refers to volatile memory, nonvolatile memory or both combinations.Similarly, computing machine input block (for example keyboard 515 and/or mouse 518) and display unit 516 refers to input information described herein is provided respectively and show the required functional characteristic of information described herein in any one of above-mentioned or the equipment that is equal to.
Consider this announcement, interested operating system of available user and computer programming language come implementation method 540 with many kinds of computer system configurations.In addition, method 540 can be used as different module stores in the storer of distinct device.For instance, originally method 540 can be stored in the server computer 580, and subsequently where necessary, the module of method 540 can be sent to a client device and carry out on described client device.Therefore, the part of method 540 will be carried out on processor-server, and another part of method 540 will be carried out on the processor of client device.
In another embodiment, method 540 is stored in the storer of another computer system.The method 540 of being stored is sent to storer 120 in the system 100 by network 504.
In one embodiment, the source program 130 that uses a computer comes implementation method 540.Computer program can be stored on any general data carrier that is similar to (for example) floppy disk or CD (CD), and is similar on the memory device of any general-purpose computing system of hard disk.Therefore, one embodiment of the present of invention also relate to the data carrier that is used to store in order to the computer source program of carrying out property method of the present invention.Another embodiment of the present invention also relates to the method that a kind of system of using a computer comes manner of execution 540.Another embodiment of the present invention relates to a kind of computer system with medium, stores the computer program that is used for manner of execution 540 on the described medium.
Though explained in conjunction with one embodiment of the present of invention to it will be apparent to those skilled in the art that above method 540 under the situation that does not depart from spirit of the present invention and scope, can make modification to this embodiment.
Functional unit, register file 171 and scoring plug 173 only are illustrative, and do not wish the present invention is limited to specified arrangement illustrated in fig. 1.Processor 170 can comprise a plurality of processors on the single chip.In described a plurality of processor each all can have independently a register file and a scoring plug, or can share in some way or be coupled described register file and scoring plug.Similarly, register file 171 can be made up of one or more register files.Equally, many kinds of known methods of available those skilled in the art are implemented the functional of scoring plug 173, for example, can replace the scoring plug hardware state bit of taking a sample.Therefore, use scoring plug to obtain status information, and do not wish to limit the invention to only use scoring plug only for illustrative.

Claims (31)

1. computer-based method, it comprises:
Under explicit software control, determine whether and to carry out data-speculative to a project; With
In case need to determine data-speculative, just under explicit software control, carry out data-speculative for described project.
2. computer-based method according to claim 1, it further comprises:
In case determining does not need data-speculative, just uses an actual value of described project to carry out a source code section.
3. computer-based method according to claim 1, wherein said actual figure further comprises by inference:
Guiding hardware is fixed a point check to obtain a snapshot state to a state.
4. computer-based method according to claim 3, wherein said state comprises a processor state.
5. computer-based method according to claim 3, wherein said actual figure further comprises by inference:
One value of described project is set at a predicted value of described project.
6. computer-based method according to claim 5, wherein said actual figure further comprises by inference:
Use the described predicted value of described project to replace an actual value of described project to carry out a source code section.
7. computer-based method according to claim 6, wherein said actual figure further comprises by inference:
Described predicted value and described actual value are compared.
8. computer-based method according to claim 7, wherein said actual figure further comprises by inference:
In case described predicted value equals described actual value, just submit a result who uses described predicted value to carry out described source code section to.
9. computer-based method according to claim 7, wherein said actual figure further comprises by inference:
Make described state be retracted into described snapshot state.
10. computer-based method according to claim 9, it further comprises:
Use described actual value to carry out described source code section.
11. computer-based method according to claim 1 wherein saidly need to determine whether data-speculative to comprise:
Carry out buffer status instruction branch.
12. computer-based method according to claim 11, the instruction of wherein said buffer status branch into a ready instruction branch.
13. a structure, it comprises:
Be used under explicit software control, determining whether to carry out a project member of data-speculative; With
Be used for when in a single day determining to carry out data-speculative to described project, just actual figure member by inference under explicit software control.
14. structure according to claim 13, it further comprises:
Be used in case when determining not need data-speculative, just use an actual value of described project to carry out the member of a source code section.
15. structure according to claim 13, the wherein said actual figure member by inference that is used for further comprises:
Be used to guide hardware that one state is fixed a point to check to obtain the member of a snapshot state.
16. structure according to claim 15, wherein said state comprises a processor state.
17. structure according to claim 15, the wherein said actual figure member by inference that is used for further comprises:
Be used for a value of described project is set at the member of a predicted value of described project.
18. structure according to claim 17, the wherein said actual figure member by inference that is used for further comprises:
Be used to use described predicted value to replace an actual value to carry out the member of a source code section.
19. structure according to claim 18, the wherein said actual figure member by inference that is used for further comprises:
Be used for member that described predicted value and described actual value are compared.
20. structure according to claim 19, the wherein said actual figure member by inference that is used for further comprises:
Be used in case described predicted value when equaling described actual value, is just submitted the member that uses described predicted value to carry out a result of described source code section to.
21. structure according to claim 19, the wherein said actual figure member by inference that is used for further comprises:
Be used to make described state to be retracted into the member of described snapshot state.
22. structure according to claim 21, it further comprises:
Be used to use described actual value to carry out the member of described source code section.
23. structure according to claim 13, wherein said being used to need to determine whether the member of data-speculative further to comprise:
Be used to carry out the member of buffer status instruction branch.
24. a computer system, it comprises:
One processor; With
One storer, it is coupled to described processor and wherein stores instruction, wherein in case when carrying out described instruction on described processor, a method comprises:
Under explicit software control, determine whether and to carry out data-speculative to a project; With
In case need to determine data-speculative, just actual figure is by inference under explicit software control.
25. a computer program, it comprises that one is configured to store or transmit the medium of the computer-readable code that is used for a method, and described method comprises:
Under explicit software control, determine whether and to carry out data-speculative to a project; With
In case need to determine data-speculative, just under explicit software control, carry out data-speculative for described project.
26. computer program according to claim 25, wherein said method further comprises:
In case determining does not need data-speculative, just uses an actual value of described project to carry out a source code section.
27. a computer-based method, it comprises:
Carry out buffer status instruction branch;
In case described buffer status is one first state, just use an actual value of described register to carry out a source code section; With
In case described buffer status is one to be different from second state of described first state, just alternatively carries out the data-speculative for described source code section under explicit software control.
28. a structure, it comprises:
Be used to carry out the member of buffer status instruction branch;
Be used in case described buffer status when being one first state, just uses an actual value of described register to carry out the member of a source code section; With
Be used for just under explicit software control, alternatively carrying out member for the data-speculative of described source code section in case described buffer status is one when being different from second state of described first state.
29. a computer system, it comprises:
One processor; With
One storer, it is coupled to described processor and wherein stores instruction, wherein in case when carrying out described instruction on described processor, a method comprises:
Carry out buffer status instruction branch;
In case described buffer status is one first state, just use an actual value of described register to carry out a source code section; With
In case described buffer status is one to be different from second state of described first state, just alternatively carries out the data-speculative for described source code section under explicit software control.
30. a computer program, it comprises that one is configured to store or transmit the medium of the computer-readable code that is used for a method, and described method comprises:
Carry out buffer status instruction branch;
In case described buffer status is one first state, just use an actual value of described register to carry out a source code section; With
In case described buffer status is one to be different from second state of described first state, just alternatively carries out the data-speculative for described source code section under explicit software control.
31. a method, it comprises:
Determine in a computer source program, whether to need data-speculative; With
Insert computer program code in described computer source program, described computer program code is in case the explicit software control that just provides described data-speculative is provided.
CN 200580009867 2004-03-31 2005-03-29 Method and structure for explicit software control of data speculation Pending CN101076776A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US55837704P 2004-03-31 2004-03-31
US60/558,377 2004-03-31
US11/082,281 2005-03-16

Publications (1)

Publication Number Publication Date
CN101076776A true CN101076776A (en) 2007-11-21

Family

ID=38977071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200580009867 Pending CN101076776A (en) 2004-03-31 2005-03-29 Method and structure for explicit software control of data speculation

Country Status (1)

Country Link
CN (1) CN101076776A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110595930A (en) * 2019-10-18 2019-12-20 青岛锦钻针业有限公司 Needle wear resistance testing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110595930A (en) * 2019-10-18 2019-12-20 青岛锦钻针业有限公司 Needle wear resistance testing device
CN110595930B (en) * 2019-10-18 2024-04-19 青岛锦钻针业有限公司 Needle wear resistance testing device

Similar Documents

Publication Publication Date Title
CN1191524C (en) Pretaking using future branch-path information obtained by predicting from branch
CN100340975C (en) Computer system,compiling apparatus device and operating system
CN1141647C (en) Method and apparatus for aliasing memory data in advanced microprocessor
CN1161691C (en) Memory controller for detecting failure of speculation of component being addressed
US7865702B2 (en) Stall prediction thread management
CN1174313C (en) Multiple instruction set data process
JP6095670B2 (en) Maintenance of operand activity information in computer systems
US8250557B2 (en) Configuring a dependency graph for dynamic by-pass instruction scheduling
CN1127016C (en) Realizing self deserialization by register rename
CN1677364A (en) Method and apparatus for autonomic test case feedback using hardware assistance for code coverage
US20130086365A1 (en) Exploiting an Architected List-Use Operand Indication in a Computer System Operand Resource Pool
US9690589B2 (en) Computer instructions for activating and deactivating operands
US20110099550A1 (en) Analysis and visualization of concurrent thread execution on processor cores.
CN1742257A (en) Data speculation based on addressing patterns identifying dual-purpose register
CN1726469A (en) Processor virtualization mechanism via an enhanced restoration of hard architected states
US20090144528A1 (en) Method for running native code across single or multi-core hybrid processor achitecture
CN1506809A (en) Analog device, analoy method and program
CN1016383B (en) Microcard jump based on operand length and polarization
CN1143213C (en) Compiler and processor for processing loops at high speed
JP2014038408A (en) Stole reduction methods on pipeline of processor with simultaneous multi-threading capability, reduction device and reduction program
CN1604044A (en) Method and apparatus for selectively counting instructions and data accesses
CN101076776A (en) Method and structure for explicit software control of data speculation
CN1068445C (en) Superscalar microprocessor instruction pipeline including instruction dispatch and release control
CN1959630A (en) Microprocessor
CN100343799C (en) Apparatus and method for generating early status flags of pipelined microprocessor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication