Commit Graph

13 Commits

Author SHA1 Message Date
Nadav Rotem
a3020a82fe [AliasAnalysis] Make the dependence on SideEffectsAnalysis internal.
This commit removes the public method for fetching SideEffectsAnalysis. The
dependency on SEA is now an implementation detail of AliasAnalysis and
computeMemoryBehavior.
2015-11-23 19:31:05 -08:00
Nadav Rotem
96ab8d88a0 [AliasAnalysis] Rename getMemoryBehavior.
getMemoryBehavior is also used by SILInstruction. This commit renames
getMemoryBehavior to computeMemoryBehavior and cleans some of the code
that touches it.
2015-11-22 19:38:09 -08:00
Nadav Rotem
3be2be585c [MemoryBehavior] Cleanup and document logic for access to readonly memory location. 2015-11-22 19:37:01 -08:00
Ted Kremenek
3e779dbc66 Revert "Revert "Safely implement strict TBAA rules.""
We believe the failure now may be in the setup of the test harness.
Re-applying this change, since the tests passed in our other
configurations.
2015-11-20 15:08:58 -08:00
Ted Kremenek
ddc9c52d5a Revert "Safely implement strict TBAA rules."
This reverts commit 3d5c4969a0.

This is breaking the iOS device tests.
2015-11-20 14:51:25 -08:00
Andrew Trick
3d5c4969a0 Safely implement strict TBAA rules.
This fixes type punning issues with unsafeBitCast.

The optimizer is still too aggressive with UnsafePointer. To fix that,
we first need an explicit API for circumventing type safety
(rdar://23406272).

I should be able to fix the following regressions by migrating the
stdlib away from unsafeBitCast to unsafeReferenceCast (~2 weeks).

Slowdowns:
|.Benchmark.................|..Before.|...After.|.Speedup|
|.ArrayInClass..............|...49.00.|...78.00.|.-37.2%.|
|.Sim2DArray................|..471.00.|..549.00.|.-14.2%.|
|.PrimeNum..................|.1876.00.|.1980.00.|..-5.3%.|

Speedups:
|.Benchmark.................|..Before.|...After.|.Speedup|
|.HeapSort..................|.2962.00.|.2663.00.|..11.2%.|
|.StdlibSort................|.2672.00.|.2537.00.|...5.3%.|
2015-11-20 09:59:56 -08:00
Nadav Rotem
cc2ca083ee Change the bool that represents the property of observing or ignoring retains in Alias Analysis into an enum.
We had a true/false bug in this flag. Let's not have another bug with this flag.
2015-11-18 17:02:27 -08:00
Andrew Trick
59882ff04b NFC: In MemoryBehaviorVisitor, don't do use-list iteration within the visitor.
It's generally bad practice to assume use lists are small. I think
part of MemoryBehaviorVisitor's contract is that the Value being
queried has the same level of type information across visits.
2015-11-12 10:41:19 -08:00
Xin Tong
f9e30b5111 More conservative about what StrongRelease can do about AllocStack
Swift SVN r32369
2015-10-01 16:07:16 +00:00
Xin Tong
83abc5cbe3 More accurate side effect for allocstack and tryapply/applyinst. rdar://22892564
Swift SVN r32335
2015-09-30 03:40:24 +00:00
Xin Tong
85ff60d7dd Revert "More accurate side effect for allocstack and applyinst. rdar://22892564"
This reverts commit fa6ab55593ee0112ad3ae8522dc1a94a85f9b747.

Benchmark times out.

Swift SVN r32304
2015-09-29 19:44:16 +00:00
Xin Tong
beaa92417a More accurate side effect for allocstack and applyinst. rdar://22892564
Swift SVN r32302
2015-09-29 18:56:00 +00:00
Michael Gottesman
39aeac882b Refactor MemoryBehavior into its own file from AliasAnalysis.cpp.
This code is self contained was almost 1/2 of all of the code in
AliasAnalysis.cpp. This combined with the fact that we are most likely going to
add more code suggests that it should be refactored out.

Swift SVN r32284
2015-09-28 22:26:01 +00:00