New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Adele Schaden MD


Adele Schaden MD
GPA 3.88

Rajiv Gupta

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Rajiv Gupta
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 11 page Class Notes was uploaded by Adele Schaden MD on Thursday October 29, 2015. The Class Notes belongs to CS 201 at University of California Riverside taught by Rajiv Gupta in Fall. Since its upload, it has received 19 views. For similar materials see /class/231744/cs-201-university-of-california-riverside in ComputerScienence at University of California Riverside.

Similar to CS 201 at UCR

Popular in ComputerScienence




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/29/15
CS 201 Compiler Cons rruc rion LecTure 13 InsTrucTion Scheduling Trace Scheduler InsTrucTion Scheduling Modern processors can exploi r Ins rruc rion Level Parallelism ILP by simul raneously execu ring mul riple ins rruc rions Ins rruc rion scheduling influences effec riveness wi rh which ILP is exploi red Pipelined processors eg ARM reordering of ins rruc rions avoids delays due hazards EPICVLIW processors eg I ranium a single long ins rruc rion is packed wi rh mul riple opera rions conven rional ins rruc rions rha r can be simul raneously execu red 5809 Compiler Support Analyze dependences and rearrange the order of instructions ie perform instruction scheduling Pipelined limited amount of ILP is required can be uncovered by reordering instructions within each basic block EPICVLIW much more ILP is required can be uncovered by examining code from multiple basic blocks Compiler Support Two techniques that go beyond basic block boundaries to uncover ILP Acyclic Schedulers Trace Scheduling examines a trace a sequence of basic blocks along an acyclic program path instruction scheduling can result in movement of instructions across basic block boundaries Cyclic Schedulers Software Pipelining examines basic blocks corresponding to consecutive loop iterations instruction scheduling can result in movement of instructions across loop iterations 4 5809 Trace Scheduling A Trace is a sequence of basic blocks ThaT does noT exTend across loop boundaries quot SelecT a Trace DeTermine The insTrucTion schedule for The Trace InTroduce compensaTion code To preserve program semanTics RepeaT The above sTeps Till some parT of The program is yeT To be scheduled 5 Trace SelecTion SelecTion of Traces is exTremely imporTanT for overall performance Traces should represenT paThs ThaT are execuTed frequenle A fasT insTrucTion schedule for one paTh is obTained aT The expense of a slower schedule for The oTher paTh due To specuafl39ve code mofion 6 5809 Picking Traces O operaTioninsTrucTion CounTo number of Times 0 is expecTed To be execuTed during an enTire program run Probe probabiliTy ThaT an edge e will be execuTed imporTanT for condiTional branches CounTe CounTbranch x Probe o Coum s are esTmafed using pro fiI39ng measure coum s by running The program on a represenTaTve input AlgoriThm for Trace ConsTrucTion 1 Pick an operaTion wiTh The largesT execuTion counT as The seed of The Trace 2 Grow The Trace backward from The seed 3 Grow The Trace forward from The seed Given ThaT p is in The Trace include 5 in The Trace iff 1 Of all edges leaving p e has The largesT execuTion counT 2 Of all edges enTering s e has The highesT execuTion counT Same approach Taken To grow The Trace backward 5809 5809 AlgoriThm Coan Trace sTops growing forward when CounTe1 lt counTe2 PremaTure TerminaTion of Trace can occur in The above algoriThm To prevenT This a slighT modificaTion is required AlgoriThm Coan LeTs say ABC D has been included in The currenT Trace CounTDE gt CounTDF gt add E CounTCE gt CounTDE gt do noT add E PremaTure TerminaTion occurs because The Trace ThaT can include CE can no longer be formed because C is already in The currenT Trace ModificaTion consider only edges PE sT G P is noT already parT of he currenT Trace10 5809 AlgoriThm Coan Trace cannoT cross loop boundaries if The edge encounTered is a loop back edge or if edge enTers inTo a loop Then sTop growing The Trace 1 amp 2 cannoT be placed in The same Trace because The edge direchy connecTing Them is a loop back edge and edges indirechy connecTing Them cross loop boundaries InsTrucTion Scheduling ConsTrucT a DAG for The selecTed Trace GeneraTe an insTrucTion schedule using a scheduling heurisTic lisT scheduling wiTh criTical paTh firsT Following generaTion of The insTrucTion schedule inTroducTion of compensaTion code may be required To preserve program semanTics CompensaTion Code Consider movemen r of ins rruc rions across basic block boundaries ie pas r spli rs and merges in The con rrol flow graph 1 Movemen r of a s ra remen r pas r below a Spli r We CO myensahw Code 13 CompensaTion Code Coan 2 Movemen r of a s ra remen r above a Join Clad e 14 5809 CompensoTion Code Coan 3 Movemen r of o s ro remen r above a Spli r No compenso rion code in rr39oduced speculo rion No re Tho r ilt i2 can be moved above spil r if i is dead along The off Trace po rh 15 CompensoTion Code Coan 4 Movemen r of o s ro remen r below 1 Join w illegal uniQSi In ts W This case will no r or39ise assuming dead code has been removed 16 5809 5809 Compenso rion Code Con rd 5 Movemen r of a branch across a spli r Compenso rion Code Con rd 6 Movemen r of a branch above I join 5809 CompensaTion Code Coan 6 Movemen r of a branch above I join CompensaTion Code Coan 7 Packing mul riple branches in a long ins rr39uc rion 10 Code Explosion Ch An 3gt Cn W n A n quot 01 Q mug C A 21 Code ExploSIon Coan 6 Ha A o I f 0 om HM A x1 quot OCHquot u aw I quot WWWHquot r at W m Nam I M wgrm 7 2 aquot I quotY Ox i len m n I h outth haul 39 d J 3 13 M4 04 cmde 5 q each W04 laxLi M 9M mfg IoImam T v 7 0 Ply 111 y T hr I MMer w 0 22 5809 11


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.