Commit Graph

9459 Commits

Author SHA1 Message Date
Chris Lattner 96dea07bdd Merge pull request #1848 from danra/patch-42
Use auto instead of repeating explicit class names
2016-03-24 22:38:54 -07:00
Chris Lattner a4a0118e38 Merge pull request #1855 from danra/patch-43
Use auto instead of repeating explicit class names
2016-03-24 22:37:40 -07:00
Chris Lattner 2753606c3e Merge pull request #1843 from danra/patch-38
Remove redundant else
2016-03-24 22:37:26 -07:00
Chris Lattner 4d64953776 Merge pull request #1862 from danra/patch-44
Fix includes order
2016-03-24 22:27:17 -07:00
Ted Kremenek 93e518c167 Merge pull request #1839 from danra/patch-34
isInvalid methods DRY
2016-03-24 22:09:21 -07:00
swift-ci ecf1e10e5a Merge pull request #1844 from danra/patch-39
Merge pull request #${ghprbPullId} from ${ghprbPullAuthorLogin}/${ghprbSourceBranch} requested by ${ghprbTriggerAuthorLogin}
2016-03-24 17:33:26 -07:00
John McCall 3561aa5fe0 Support parent types on foreign type metadata.
This will eventually be required for C++.  It is also, apparently,
required for anonymous structs that are used as the type of a
named field.

Should unblock the Linux Foundation build.
2016-03-24 17:01:28 -07:00
Xin Tong f557a3253d Merge pull request #1857 from trentxintong/FSO
Rename FunctionSignatureOptCloner to FunctionSignatureOpts
2016-03-24 15:57:34 -07:00
danra 653b282682 Fix includes order 2016-03-25 00:49:03 +02:00
Dan Raviv 9942cfc6a2 Add missing word in DiverseListImpl comment 2016-03-25 00:42:59 +02:00
John McCall 0ffb7278bc Only use metadata patterns for generic types; perform other
initialization in-place on demand.  Initialize parent metadata
references correctly on struct and enum metadata.

Also includes several minor improvements related to relative
pointers that I was using before deciding to simply switch the
parent reference to an absolute reference to get better access
patterns.

Includes a fix since the earlier commit to make enum metadata
writable if they have an unfilled payload size.  This didn't show
up on Darwin because "constant" is currently unenforced there in
global data containing relocations.

This patch requires an associated LLDB change which is being
submitted in parallel.
2016-03-24 15:10:31 -07:00
Stephen Canon 7b1fddfbc1 Merge pull request #1835 from stephentyrone/simd-uint-vectors
Added uint[2,3,4] to simd, bridged to vector_uintN.
2016-03-24 17:08:26 -04:00
Xin Tong 5907b8a3e2 Rename FunctionSignatureOptCloner to FunctionSignatureOpts
Eventually, we decided to do this

1. Have the function signature opts (used to be called the cloner to create
the optimized function.
2. Mark the thunk as always_inline
3. Rely on the inliner to inline the thunk to get the benefit of calling optimized
function directly.
2016-03-24 12:50:12 -07:00
Xin Tong e0ba695d17 Merge pull request #1852 from trentxintong/FSO
Remove function signature rewriter and make function signature analysis a Util
2016-03-24 12:42:05 -07:00
David Farler 76b31a9343 swift-reflection-test: Increase reading robustness
- Check return values from `read`
- Make the reflstr section optional, as it can be stripped by
  -strip-reflection-names.
2016-03-24 12:05:18 -07:00
David Farler 0dcd813c02 FieldRecord: Guard when field name is null
Field name relative offsets can be null if -strip-reflection-names
is passed to the frontend.
2016-03-24 12:05:18 -07:00
David Farler 23a823a3ed Remote Mirrors: Make MemoryReader a real class
Make the reader a class interface internally, with the
bag-of-function pointers via the eventual C API being the
special case.
2016-03-24 12:05:18 -07:00
Xin Tong 9a3761000c Move function signature analysis to a Util
We really only need this signature analysis in the cloner pass now.
2016-03-24 11:17:47 -07:00
danra 21b0c52ad6 Use auto instead of repeating explicit class names 2016-03-24 20:09:06 +02:00
Chris Lattner 5ab39a8bc4 Merge pull request #1853 from danra/patch-12
Add missing period in end of DiverseStack comment (NFC)
2016-03-24 10:52:52 -07:00
Xin Tong 3f075dfe47 Remove function signature rewriter.
We decided to use the inliner to rewrite the caller's callsites.

And eventually I will turn FunctionSignatureAnalysis into a Utility.
As its data should only be used and kept in the cloner pass.
2016-03-24 10:50:47 -07:00
Xin Tong c44006aa9d Merge pull request #1824 from trentxintong/RLE
Make sure non-epilogue releases do not kill redundant loads
2016-03-24 10:48:21 -07:00
danra b41ccbd58a Add missing period in end of DiverseStack comment (NFC) 2016-03-24 19:41:42 +02:00
Dmitri Gribenko 7907b4b0de Merge pull request #1828 from danra/patch-25
Make nodeToString brief comment clearer (NFC)
2016-03-24 10:24:41 -07:00
danra 9ff4ee43a5 Use auto instead of repeating explicit class names 2016-03-24 18:18:51 +02:00
danra 25bda30cfd Fix DiverseListImpl comment grammar 2016-03-24 18:12:32 +02:00
danra 9cb3e763cd operator!= DRY 2016-03-24 18:07:59 +02:00
danra 2b1d4a763d Remove redundant else 2016-03-24 18:05:06 +02:00
Xin Tong 7ff5156cc2 Merge pull request #1827 from trentxintong/FSO
Minor refactor in Epilogue Retain/Release matchers
2016-03-24 08:48:04 -07:00
danra 21f21e395b isInvalid methods DRY 2016-03-24 16:32:02 +02:00
Stephen Canon 8187dfb140 Added uint[2,3,4] to simd, bridged to vector_uintN. 2016-03-24 07:56:59 -04:00
danra b494ff93d0 Remove superfluous semicolon in comment (NFC) 2016-03-24 13:34:56 +02:00
danra 4f209a4098 Make nodeToString brief comment clearer (NFC)
IIUC this transforms a node representation of a demangled name to the equivalent string representation. It creates the string itself, and doesn't get the string as a parameter to write into. To me "transform in" was confusing, I think the natural language to use is "transform to".
2016-03-24 12:36:06 +02:00
Jordan Rose 9e9c80e090 Add a @_versioned attribute for testing resilience.
This attribute is a stand-in for the versioning annotations
described in docs/LibraryEvolution.rst; right now it's just present
or absent, and its only effect is to make sure versioned internal
decls are treated as public at the SIL level. (This functionality
already existed for -enable-testing, so it can probably be trusted.)

Also, allow inlineable functions to reference transparent and
inline-always functions /if/ they're only called immediately (not used
as values or partial-applied), since they'll be inlined away before
emitting IR. (We should really only allow this /before/ mandatory
inlining, but we don't have a separate SIL stage for that.)
2016-03-24 00:53:35 -07:00
Slava Pestov 3e2d7d40e0 SIL: Serialize bodies of local functions inside @_transparent functions
A transparent function might be deserialized and inlined into a function
in another module, which would cause problems if the function referenced
local functions.

Previously we would force local functions to have public linkage instead,
which worked, but was not resilient if the body of the transparent
function changed in the module that contained it.

Add a library evolution test ensuring that such a change is resilient
now.

Part of https://bugs.swift.org/browse/SR-267.
2016-03-24 00:50:39 -07:00
rjmccall ea0d95ba5d Merge pull request #1808 from danra/patch-18
static_assert that ClusteredBitVector::ChunkType is unsigned instead of just commenting as much.
2016-03-24 00:28:07 -07:00
Xin Tong 524ed34583 Make sure epilogue releases do not kill redundant loads
I did not measure a performance improvements with this.
2016-03-23 23:59:54 -07:00
Xin Tong 9a020c8c7a Minor refactoring in epilogue retain matcher 2016-03-23 22:16:49 -07:00
Xin Tong b1c7bc5e4b Reinstate "Minor refactoring in epilogue retain matcher" 2016-03-23 22:16:34 -07:00
John McCall abba7f0c8b Revert "Only use metadata patterns for generic types; perform other"
This reverts commit 41efb3d4d3.
LLDB has too many tendrils into our metadata.
2016-03-23 20:26:43 -07:00
Chris Lattner c153c3ab7d Merge pull request #1810 from danra/patch-20
[gardening] Improved comments (NFC)
2016-03-23 17:41:36 -07:00
Chris Lattner 9070697cce Merge pull request #1813 from danra/patch-22
Remove redundant parentheses (NFC)
2016-03-23 17:39:48 -07:00
Chris Lattner d6c8318aa2 Merge pull request #1818 from danra/patch-24
Add missing commas to multi-line enums
2016-03-23 17:37:50 -07:00
Xi Ge fda0751cae [SourceKit] In interface-gen request, allow clients to send SourceKit an interested USR from which we can infer the group name. 2016-03-23 17:26:44 -07:00
danra 0623e12452 Add missing commas to multi-line enums
Some of the multi-line enums in the file currently have trailing commas after the last defined value, some don't.
2016-03-24 02:14:17 +02:00
John McCall 41efb3d4d3 Only use metadata patterns for generic types; perform other
initialization in-place on demand.  Initialize parent metadata
references correctly on struct and enum metadata.

Also includes several minor improvements related to relative
pointers that I was using before deciding to simply switch the
parent reference to an absolute reference to get better access
patterns.
2016-03-23 17:04:04 -07:00
John McCall 898e0971d9 Add a convenience getNominalParent() accessor to TypeBase and CanType. 2016-03-23 17:04:04 -07:00
danra 891dea4f70 Fix comment typo (NFC) 2016-03-24 00:45:02 +02:00
Xi Ge b4d0cb4ffe ModulePrinting: Avoid printing duplicated members in synthesized extensions. 2016-03-23 15:19:16 -07:00
danra fec14bfb9f Remove redundant parentheses (NFC) 2016-03-23 23:58:08 +02:00