mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
NOTE: I also added a partial_apply [guaranteed] test. Whats interesting about these is that we only ever perform allocbox_to_stack if we know that we are going to eliminate the allocbox completely. So if we break dominance among some uses of the alloc box or insert destroy_value when we are in non-ossa... it doesn't matter since we will eliminate the box and these uses before the pass is done running. This will harmless on the surface is an instance of the compiler being in a "fixed point of correctness". This occurance is when the compiler implementation is incorrect but the incorrectness is being hidden in the final output. If the output of the compiler changes or the code in question is changed, new bugs can be introduced due to the lack of preserving of standard invariants like dominance. I also added an additional helper: SILBuilder::insertAfter(SILValue). This builds on Erik's commit that gave us insert(SILInstruction *). I wanted this functionality, but additionally I wanted to make it so that if I had an argument, I got back the first instruction in the block. So it was natural to extend this to values.
41 KiB
41 KiB