text
stringlengths 1
21.4k
|
---|
You should hurry up and go to the bathroom.
|
Is this okay?
|
Here...
|
Here.
|
I feel much better.
|
What a pretty flower.
|
The two of you were here?
|
Are you okay?
|
Yes, I feel much better now.
|
Did you really cause trouble here?
|
Let's see, we're all together here.
|
What if we celebrate this occasion?
|
What can we do with him like that?
|
I like it here.
|
He's really unique.
|
I feel like it's going to get interesting.
|
We'll see if it'll be interesting or a disaster.
|
The sky seems so close from here.
|
I feel like I can touch it.
|
Reverend Mother, I had a strange dream.
|
It was a very beautiful place.
|
And I was there with David, Julian, and Thomas of our garden.
|
Reverend Mother, have I been in heaven?
|
Reverend Mother, am I still in Heaven?
|
What did you do with that?
|
Here or there?
|
Do you remember?
|
Do you?
|
Let go of me.
|
You can't fall from there.
|
It's dangerous.
|
Did you really spit in my room?
|
Stop it.
|
I didn't do anything.
|
Are you hurt?
|
Okay, I will wait outside.
|
Why are you going out?
|
Did you see that motion picture on the Internet?
|
No Minam Goh.
|
I'm much better than a biological mother.
|
Please don't pretend to know me.
|
He is so strange.
|
He is not a girl.
|
Everyone will find out.
|
I know who you are.
|
Excuse me?
|
I know who you are.
|
In this video, we're going to look at another global analysis called liveness analysis.
|
So, in the past several videos we've looked at a procedure for globally propagating constants through a control flow graph And let's, here's, here's one of the control flow graphs we've been looking at and recall that this algorithm that we discussed would be sufficient to show that we could replace this use of x here by the constant three.
|
And once we do that.
|
This assignment x might no longer be useful.
|
It might not be used anywhere And so we could potentially delete this statement from the program And that would be a real optimization, an important optimization to do.
|
However, we can only do that if x is not used elsewhere in the program.
|
So let's be a little more careful about what we mean by saying that x is not used.
|
So down here is a use of x, a reference to x, in a statement.
|
And, clearly this particular reference to x, is, use, picking up the value that's defined by this right x here.
|
So, we say that the right of x here, is live.
|
This one is live.
|
Okay, And what that means is that the value may be used in the future.
|
So, live, equals, may be used.
|
In the future, Okay?
|
So the value written to x at this line of code maybe used by some subsequent instruction And here it's not just that it may be used.
|
It's actually guaranteed to be used because there's only one path.
|
And that one path has a reference to x on it before there's another assignment to x.
|
Okay?
|
So this particular value of x as written here is guaranteed to be used.
|
But in general we don't require that.
|
We just mean there has to be a possibility that it will be used.
|
Now in contrast let's take a look at this.
|
Other statement in this example, Here, we assign x a value three but this assignment x, this value of x is never used.
|
This one, is dead.
|
Alright?
|
Because the value three here is overwritten by the value four before there's any use of, the variable x, Okay?
|
So this particular right to x will never see the light of day.
|
It'll never get used by any part of the program.
|
And we say that it is dead.
|
So, to summarize a variable x is live as a statement S if, there exist some statement that uses x.
|
Okay.
|
So, some other statement S prime that uses x, and there is some path from S to S prime and there is no intervening assignments on that path to x.
|
Alright?
|
So, there needs to be an assignment to x, at some statement S there is some path through the program that reaches a read of x.
|
Add sum statement to
|
S prime, and along that path, there is no right to x, Okay?
|
And if this situation arises, then we say that this value written in this first statement s is live.
|
Now if a value is not live, then it is dead.
|
And a statement that assigns to x is going to be dead code if x is dead after the assignment.
|
So, if we know that immediately after the assignment, immediately after this assignment to x, there is no possibility that a value of x will be used in the future.
|
Well then the assignment was useless, and the entire statement can be removed.
|
Alright, So dead assignments can be deleted from the program, But notice that in order to do that we have to have the liveness information.
|
We need to know whether x is dead at this point.
|
So, once again, what we want to do is to have global information about the control flow graph.
|
In this case, the property is whether x will be used in the future.
|
We want to make that information local to a specific point in the program, so we can make a local optimization decision.
|
Alright, And just like for constant propagation, we're going to define in a, an algorithm for performing liveness analysis And it's going to follow the same framework.
|
If we're going to express liveness in terms of information transferred between adjacent statements, just as we did for copy of constant propagation And it's gonna turn out that liveness is actually quite, If it's simpler, or somewhat simpler, than constant propagation, since it's just a Boolean property.
|
Eh, you know, it's either true of false.
|
Alright So let's take a look at some of the rules for liveness.
|
So here, we're defining what it means for x to be live at this point here.
|
So we're immediately after p is x live And it's going to be live.
|
Remember what the intuition is.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.