Commit Graph

11 Commits

Author SHA1 Message Date
Michael Gottesman
7b34373bf4 [aa] Add PartialAlias. This currently is not returned by any routine or used anywhere.
rdar://18831605

Swift SVN r23059
2014-11-02 00:41:12 +00:00
Michael Gottesman
2c84a0ac82 [sil-aa] Typed Based TBAA with all the necessary fixes.
This commit fixes a bunch of problems I found in TBAA. Some fun
examples:

1. We were not handling protocols correctly.
2. We were not handling enums correctly.
3. We were not handling builtins correctly all the time.
...
And much more.

I also added a fairly exhaustive test.

Additionally I checked the benchmarks and did not see any regressions.

rdar://16651852

Swift SVN r18148
2014-05-16 00:21:41 +00:00
Michael Gottesman
32dee228f8 [sil-aa] Change TBAA to use type oracle instructions instead of the raw types of instructions.
The reason that this is important is that we *ARE* allowing the stdlib
to perform certain types of type punning for efficiency implying we need
to have a type oracle instruction to have safety.

A type oracle instruction is an instruction which implies undefined behavior
unless its operand/result is of a certain type (allowing us to ignore that
possibility).

In a following commit I am going to go over and fix any problems in the
actual TBAA implementation and give all the various checks tests.

rdar://16651852

Swift SVN r18090
2014-05-15 00:59:55 +00:00
Michael Gottesman
8ffc0f10a3 [sil-aa] AA::may{Read,Write,ReadOrWrite}FromMemory do not care about ref counts. Add a flag to ignore ref counts during such a query.
This is due to MayHaveSideEffects encompassing ref count effects and a
myriad of other effects. If/when we separate the two concepts (which is
cleaner IMHO), the flag will no longer be necessary.

Swift SVN r16807
2014-04-25 06:37:02 +00:00
Nadav Rotem
1bfa103362 Add a basic TBAA rule.
Swift SVN r15358
2014-03-22 01:12:09 +00:00
Michael Gottesman
fbe2ccf0d6 [sil-aa] Add in convenience methods for querying AliasAnalysis::getMemoryBehavior.
The methods are:

 * mayWriteToMemory()
 * mayReadFromMemory()
 * mayReadOrWriteMemory()
 * mayHaveSideEffects() [Side effects + writing to memory]
 * mayHavePureSideEffects() [Only side effects, ignores writes to memory]

Swift SVN r13791
2014-02-12 00:14:29 +00:00
Michael Gottesman
9453993493 [sil-aa] Create convenience methods isMustAlias, isNoAlias, isMayAlias and update AA uses to use these instead.
Swift SVN r13788
2014-02-11 22:56:56 +00:00
Nadav Rotem
27a1a63134 Remove unneeded empty virtual destructors.
Swift SVN r13599
2014-02-06 22:24:33 +00:00
Michael Gottesman
9a297333f9 Enable printing of AliasAnalysis::AliasResult and SILValues.
Swift SVN r13577
2014-02-06 10:06:20 +00:00
Michael Gottesman
098fda670f [sil-aa] Change SIL AliasAnalysis into an Analysis.
Swift SVN r13550
2014-02-06 02:29:41 +00:00
Michael Gottesman
7461dbd70a Now that we have a PM, separate passes from analyses by creating a separate library swiftSILAnalysis and a separate folder/etc.
Swift SVN r13511
2014-02-05 22:17:50 +00:00