SIL: Add a "builtin" instruction to represent builtin invocations.

Modeling builtins as first-class function values doesn't really make sense because there's no real function value to emit, and modeling them this way complicates passes that work with builtins because they have to invent function types for builtin invocations. It's much more straightforward to have a single instruction that references the builtin by ID, along with the type information for the necessary values, type parameters, and results, so add a new "builtin" instruction that directly represents a builtin invocation. NFC yet.

Swift SVN r22690
This commit is contained in:
Joe Groff
2014-10-11 20:34:24 +00:00
parent 9f8641f90e
commit a60a52d72e
22 changed files with 387 additions and 83 deletions

View File

@@ -54,6 +54,7 @@ static bool isTransitiveEscapeInst(SILInstruction *Inst) {
case ValueKind::AllocRefInst:
case ValueKind::AllocRefDynamicInst:
case ValueKind::AllocStackInst:
case ValueKind::BuiltinInst:
case ValueKind::ApplyInst:
case ValueKind::WitnessMethodInst:
case ValueKind::BuiltinFunctionRefInst: