Commit Graph

14 Commits

Author SHA1 Message Date
Nadav Rotem
d78b376d07 [passes] Replace the old invalidation lattice with a new invalidation scheme.
The old invalidation lattice was incorrect because changes to control flow could cause changes to the
call graph, so we've decided to change the way passes invalidate analysis.  In the new scheme, the lattice
is replaced with a list of traits that passes preserve or invalidate. The current traits are Calls and Branches.
Now, passes report which traits they preserve, which is the opposite of the previous implementation where
passes needed to report what they invalidate.

Node: I tried to limit the changes in this commit to mechanical changes to ease the review. I will cleanup some
of the code in a following commit.

Swift SVN r26449
2015-03-23 21:18:58 +00:00
Arnold Schwaighofer
951dc2875a Nuke isSideEffectFree
We can now compute the same result with Inst.mayHaveSideEffects(). NFC.

Swift SVN r25742
2015-03-04 05:03:44 +00:00
Dmitri Hrybenko
61286f0260 Fix warnings produced by a newer version of Clang
Swift SVN r25257
2015-02-12 23:50:47 +00:00
Michael Gottesman
fae31cbaa2 [dead-object-elim] Add SILInstruction::mayTrap(), change SILInstruction::mayHaveSideEffects() to call it, and change dead object elimination to call mayHaveSideEffects().
Note that I did not change any actual memory behavior. That will come via a
later cleanup phase. Since this is a correctness fix I wanted to only make
things more conservative.

rdar://18568601

Swift SVN r23311
2014-11-14 00:05:15 +00:00
Joe Groff
e3f9a2035c SIL: Move SILGen and passes over to use "builtin" instead of "apply (builtin_function_ref)".
Swift SVN r22785
2014-10-15 23:37:22 +00:00
Chris Lattner
001c1890e5 put all the SIL*Transform classes in anonymous namespaces, there is
no need for their symbols to be exported out of their implementation
file.


Swift SVN r14714
2014-03-06 01:49:53 +00:00
Michael Gottesman
8e60748959 Fix up two pass names.
Swift SVN r14244
2014-02-21 23:39:01 +00:00
John McCall
3d5d8fdc03 Resilience expansion is really an aspect of a SILDeclRef.
We should also remove it from IRGen's Explosion API; IRGen
should always use maximal explosion, and SILGen will tell us
whether or not we need to put that in memory somewhere.
But that can be a later commit.

Swift SVN r14242
2014-02-21 23:28:43 +00:00
Nadav Rotem
56ada4983e Allow the removal of stack allocation of trivial types that are used by destroy_addr.
Swift SVN r14237
2014-02-21 23:09:31 +00:00
Nadav Rotem
c3a74586a3 Delete unused stack allocations of trivial types.
Swift SVN r14232
2014-02-21 22:47:49 +00:00
Nadav Rotem
af33bfd135 Refactor the code for finding the destructor.
Swift SVN r14219
2014-02-21 19:16:08 +00:00
Nadav Rotem
0d6bbf7409 Move the code in processFunction into the class. NFC.
Swift SVN r14218
2014-02-21 19:04:19 +00:00
Nadav Rotem
f5e828bda7 Rename functions and variables. NFC.
Swift SVN r14191
2014-02-21 00:44:58 +00:00
Nadav Rotem
d52cbc89dd Rename AllocRefElim -> DeadObjectElim. NFC.
Swift SVN r14179
2014-02-20 23:14:59 +00:00