Commits

Chris Lattner committed 13e805218da
delete the VarRefInst class and instruction - variable references are now represented as uses of the lvalue that defines their location. For example, we compile: var local_var : Int = 4 var defaulted_var : Int return local_var + defaulted_var into: %5 = alloc_var local_var, type=[byref(heap)] Int %6 = store %4 -> %5 [initialization] %7 = alloc_var defaulted_var, type=[byref(heap)] Int %8 = zerovalueinst Int %9 = store %8 -> %7 [initialization] %10 = constantref +, type=(lhs : Int64, rhs : Int64) -> Int64 * %11 = load %5 * %12 = load %7 %13 = apply %10(%11, %12) %14 = return (%13) The two *'d loads are loading the location of the two variables. Some of the sanity checking this change includes now causes us to die on uses of arguments (whose locations we don't emit yet) and in foreach loops, which aren't emitting their patterns yet. Always more to do. Swift SVN r2978