[SIL] Let alloc_box return a single value.

And use project_box to get to the address value.
SILGen now generates a project_box for each alloc_box.
And IRGen re-uses the address value from the alloc_box if the operand of project_box is an alloc_box.
This lets the generated code be the same as before.

Other than that most changes of this (quite large) commit are straightforward.
This commit is contained in:
Erik Eckstein
2016-01-19 08:59:24 -08:00
parent ac5c0d04d4
commit 8110b1ebc8
109 changed files with 2424 additions and 1896 deletions

View File

@@ -215,8 +215,7 @@ protected:
}
// An alloc_box returns its address as the second value.
assert((PI.Aggregate == V || PI.Aggregate == SILValue(V, 1)) &&
"Expected unary element addr inst.");
assert(PI.Aggregate && "Expected unary element addr inst.");
// Recursively check for users after stripping this component from the
// access path.