swift
cac03a6e - [SIL] Let addArgumentToBranch accept plural args.

Commit
4 years ago
[SIL] Let addArgumentToBranch accept plural args. Previously, the addArgumentToBranch only allowed one to add a single additional argument to a branch. It then verified the argument count. That is a problem if multiple arguments have to be added to arrive at the correct argument count. Specifically, that was a problem when running Mem2Reg on a lexical alloc_stack, where three new phi arguments are added. Here, the function name is changed to addArgumentsToBranch (plural arguments) and the function accepts a SmallVector<SILValue> rather than a single SILValue, allowing one to add all the arguments that are necessary in order to verify that the resulting number of arguments is correct.
Author
Committer
Parents
Loading