Commit Graph

77 Commits

Author SHA1 Message Date
swift-ci
6b8c0aa04a Merge remote-tracking branch 'origin/master' into master-next 2017-04-11 20:28:32 -07:00
Saleem Abdulrasool
cfb9da8dfe Adjust for SVN r299899 2017-04-11 18:19:49 -07:00
Erik Eckstein
f3a7824028 MergeFunctions: now really handle self recursions correctly.
fixes rdar://problem/31519893
2017-04-11 13:57:29 -07:00
Bob Wilson
701ed9d907 Merge remote-tracking branch 'origin/master' into master-next 2017-04-07 15:36:24 -07:00
Erik Eckstein
2584078e3c MergeFunctions: handle self recursive functions correctly.
First, it fixes a crash where the eliminated function is still referenced.
This shows up if two equivalent self-recursive functions are merged and those functions are internal.
Fixes SR-4514, rdar://problem/31479425

Second, it avoids creating a not needed parameter for really equivalent self recursive functions.
2017-04-07 14:21:26 -07:00
Saleem Abdulrasool
15565c116a Adjust for SVN r298393 2017-03-22 07:44:03 -07:00
practicalswift
65b0219f7b [gardening] Fix typos 2017-02-14 20:04:08 +01:00
practicalswift
0193f2b872 [gardening] Fix typos 2017-02-04 09:22:38 +01:00
Erik Eckstein
36c807b0d1 LLVM passes: use new FunctionComparator utility in the SwiftMergeFunctions pass.
Now that the FunctionComparator is a separate utility in LLVM, the SwiftMergeFunctions pass can use it instead of duplicating the code.
This is pure refactoring. NFC.
2017-01-27 13:53:13 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
practicalswift
4552fc8f88 [gardening] Use American English: "behaviour" → "behavior" 2016-11-05 20:33:57 +01:00
Saleem Abdulrasool
8e1a88e985 LLVMPasses: fix DLL storage for merged functions
When constructing the body of the merged function, the internal function is
given internal linkage always.  It is only accessible through the adjusting
thunks which retain the original DLL storage.  Ensure that we reset the DLL
storage which it inherited from the first function.
2016-10-06 08:09:23 -07:00
Michael Gottesman
fa1bb95923 Merge remote-tracking branch 'origin/master' into master-next 2016-08-30 19:50:12 -07:00
Mark Lacey
4b826b1e2e Silence a few release-build warnings. 2016-07-23 18:33:45 -07:00
Saleem Abdulrasool
3ad600faa6 MergeFunctions: use a custom ordering comparator
This updates MergeFunctions with a custom ordering comparator for the
AtomicOrdering.  This is needed after a LLVM API change which changes the
AtomicOrdering to a strongly typed enumeration.
2016-06-25 01:57:24 -07:00
practicalswift
5a3067e24e [gardening] Fix plural issues. 2016-05-21 18:45:31 +02:00
Mark Lacey
da9c346444 Functions with differing phis should not be merged.
Check that the incoming blocks of phi nodes are identical, and block
function merging if they are not.

rdar://problem/26387654
2016-05-20 08:58:43 -07:00
eeckstein
951086f62e Merge pull request #2531 from practicalswift/fix-llvmmergefunctions-header
[gardening] Add licensing preamble.
2016-05-16 13:49:52 -07:00
practicalswift
e6e360bcfb Merge pull request #2535 from practicalswift/code-whitespace
[gardening] Add missing whitespace.
2016-05-15 07:46:22 +02:00
practicalswift
54427ca61e [gardening] Add missing whitespace. 2016-05-15 07:45:52 +02:00
swift-ci
04f44e22f9 Merge pull request #2533 from practicalswift/remove-unused-var 2016-05-14 18:27:53 -07:00
practicalswift
21c872c590 [gardening] Fix recently introduced typos. 2016-05-14 20:33:28 +02:00
practicalswift
6cc92e78b4 [gardening] Remove unused variable FuncsInCallCycleToMerge. 2016-05-14 19:49:48 +02:00
practicalswift
db585be16f [gardening] Add licensing preamble. 2016-05-14 19:25:50 +02:00
Erik Eckstein
cbe78e0839 fix build error in LLVMMergeFunctions caused by upstream llvm changes
(cherry picked from commit 610996a71fade98ea43d9047740feb02b8d4eac3)
2016-05-13 22:04:50 -07:00
Erik Eckstein
f0022a5aac Add an LLVM pass to merge similar functions.
It's like LLVM's MergeFunctions pass, except that it can also merge functions which differ by some constants.
The intention is to merge specialized functions which only differ by metadata lookups. But it can also merge other types of functions.
It gives ~7% code size reducation for the stdlib.

There are still some open TODOs, e.g. to share common code with LLVM's MergeFunctions pass (currently much code is just copied).
2016-05-11 09:46:46 -07:00