Commit Graph

67 Commits

Author SHA1 Message Date
Erik Eckstein
6af5876f72 PerformanceInliner: add the @_semantics("optimize.sil.inline.aggressive") attribute to enable inlining into large functions.
This attribute overrides the limit of maximum number of basic blocks in the caller.
2025-02-13 07:40:24 +01:00
Erik Eckstein
a022457257 docs: update documentation of optimization related semantic attributes 2025-02-13 07:30:44 +01:00
own2pwn
ae7723a618 [Docs] Fix typo in HighLevelSILOptimizations.rst.
`nonelement` -> `non-element`
2019-11-14 11:04:57 -08:00
Slava Pestov
4e0e462d23 Rename a few remaining @_inlineable => @inlinable, @_versioned => @usableFromInline 2018-06-09 22:41:54 -07:00
Erik Little
863f3a19ff Rename @effects to @_effects
@effects is too low a level, and not meant for general usage outside
the standard library. Therefore it deserves to be underscored like
other such attributes.
2018-06-06 12:53:03 -04:00
Arnold Schwaighofer
93ab9302a6 Fix rst error 2018-03-05 09:29:43 -08:00
Arnold Schwaighofer
6fe0633c08 Add @effects(releasenone) documentation. 2018-03-05 07:03:54 -08:00
Erik Eckstein
76f281510f Remove @_semantics("optimize.sil.never")
The replacement is @_optimize(none)
2017-11-16 14:11:52 -08:00
Slava Pestov
c272d41e2f Re-apply "SIL: Remove special meaning for @_semantics("stdlib_binary_only")"
With -sil-serialize-all gone, this no longer means anything; just
don't declare the function as @_inlineable instead.

Fixes <rdar://problem/34564380>.
2017-10-04 14:07:52 -07:00
Jordan Rose
aab5f7aa4f Revert "SIL: Remove special meaning for @_semantics("stdlib_binary_only")" (#12270)
It still affects StdlibUnittest, which is still using -sil-serialize-all.
2017-10-04 12:49:21 -07:00
Slava Pestov
0fad13eeba SIL: Remove special meaning for @_semantics("stdlib_binary_only")
With -sil-serialize-all gone, this no longer means anything; just
don't declare the function as @_inlineable instead.

Fixes <rdar://problem/34564380>.
2017-10-03 13:48:22 -07:00
Roman Levenstein
956c556cb6 [docs] Add the description of @_semantics("optimize.sil.specialize.generic.partial.never") and the new @_specialized syntax 2017-06-03 11:15:21 -07:00
Dave Abrahams
8e1c7bde19 Revert "[docs] Add the description of @_semantics("optimize.sil.specialize.generic.partial.never") and the new @_specialized syntax" 2017-06-02 13:41:36 -07:00
Roman Levenstein
99077692ea [docs] Add the description of @_semantics("optimize.sil.specialize.generic.partial.never") and the new @_specialized syntax 2017-06-02 12:21:08 -07:00
Erik Eckstein
9ce3df106e Add two new array semantics functions.
array.append_element(newElement: Element)
array.append_contentsOf(contentsOf newElements: S)

And allow early inlining of them.
Those functions will be needed to optimize Array.append(contentsOf)
2017-03-31 15:31:57 -07:00
Roman Levenstein
34815ff9ef [sil-generic-specializer] Do not create specializations for functions marked with @_semantics("optimize.sil.specialize.generic.never")
Those functions are not critical for performance, but their specializations result in a stdlib code bloat.
2017-02-24 14:59:44 -08:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
sukolsak
31da929627 Fix formatting in HighLevelSILOptimizations.rst 2016-09-18 00:25:00 -07:00
hitstergtd
1ccca9d0f0 [gardening] Properly capitalise 'swift' to 'Swift' 2016-04-17 20:53:48 +01:00
practicalswift
c760f6dfbf [gardening] Add whitespace: "foo,bar" → "foo, bar" 2016-04-12 22:31:46 +02:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Dmitri Gribenko
f5153572d7 stdlib: rename count labels in underscored protocols
lengthInBytes => utf8CodeUnitCount

numberOfCodeUnits => utf16CodeUnitCount
2016-01-21 17:18:15 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Tomohiro Kumagai
e4bf75fb29 [stdlib] [docs] Re-wrap some paragraphs to fit within 80 characters. #936 2016-01-12 11:09:15 +09:00
Tomohiro Kumagai
01155076fa [stdlib] [docs] Modify Array's type parameter name and rename Slice to ArraySlice in comments.
In swift 1.2, `Slice` has been renamed  `ArraySlice`.
In swift 2.0, type parameter name of `Array` is changed from `T` to `Element`.
Therefore, modified the names which appear in code comments and a document.
2016-01-11 17:04:45 +09:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
practicalswift
07f57246ee Fix documentation typos. 2015-12-28 01:50:14 +01:00
Max Moiseev
200be71583 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-23 10:28:04 -08:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
Dmitri Gribenko
73ce9ae7e9 Collection.count => .length
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
TheGiantPanda
a1c3ebd090 Fixed formatting and spelling
The word “referes” was corrected to “refers”. Formatting for other
lines was also fixed.
2015-12-05 20:53:06 -08:00
Stefan Natchev
5eaa3c43d0 Fix typos in documentation 2015-12-04 09:29:24 -05:00
Johan K. Jensen
fa76656c82 Remove instances of duplicated words 2015-12-03 20:00:29 +01:00
codester
d21d3363eb Fix Typos and spelling
Fixed Typos
2015-12-03 23:30:34 +05:30
Arnold Schwaighofer
5d989c9b98 HighLevelSILOptimizations.rst: change Slice<T> to ArraySlice<T>
Swift SVN r30592
2015-07-24 21:12:33 +00:00
Arnold Schwaighofer
5b7ba8dfb0 HighLevelSILOptimizations docs: Clarify the semantics of check_subscript/get_count
Slices aren't (will not be) zero based instead define check_subscript's
semantics in terms of startIndex/endIndex.

Swift SVN r30591
2015-07-24 20:55:01 +00:00
Erik Eckstein
3ad2b6710b stdlib: add @_semantics("availability.osversion") to _stdlib_isOSVersionAtLeast
Needed by GlobalOpt (rdar://problem/20708979)



Swift SVN r27963
2015-04-30 11:05:31 +00:00
Nadav Rotem
32211041d2 Rename @semantics -> @_semantics.
Swift SVN r27533
2015-04-21 17:10:06 +00:00
Nadav Rotem
0f63546369 Rename the semantics tag name from never to sil.never. NFC.
Swift SVN r27486
2015-04-20 17:27:32 +00:00
Nadav Rotem
926042ff81 Add @semantics("optimize.never") to disable optimizations of a specific function.
This commit adds a flag to disable optimizations on a specific functions. The
primary motivation of this patch is to allow the optimizer developers to reduce
testcasese by disabling optimizations of parts of the code without having to
recompile the compiler or inspect SIL. The annotations  "inline(never)"
and "optimize.none" can go a long way.

The second motivation for this patch is to allow our internal adopters to work
around compiler bugs.

rar://19745484

Usage:

@semantics("optimize.never")
public func miscompile() { ... }

Swift SVN r27475
2015-04-20 05:06:55 +00:00
Nadav Rotem
a225e98076 Update the docs for the new stdlib_binary_only name.
Swift SVN r24451
2015-01-15 19:05:24 +00:00
Nadav Rotem
290b587f09 Docs: mention that the new annotation is related to the resilient proposal.
Swift SVN r24448
2015-01-15 19:05:09 +00:00
Nadav Rotem
c6e77cdc75 Document the new semantics tag to disable copying of code from stdlib
Swift SVN r24401
2015-01-13 23:24:49 +00:00
Erik Eckstein
31dd17a49f Add array.uninitialized semantics to ArrayCallKind, ArraySemanticsCall and the docs.
For completeness. NFC.



Swift SVN r23955
2014-12-16 13:28:18 +00:00
Arnold Schwaighofer
404ce8c599 ArraySemantics: Add support for the upcoming array.props semantic calls
"array.props.isCocoa/needsElementTypeCheck" semantic calls will mark calls that
return array properties: isCocoa and needsElementTypeCheck. We know that said
states can only transfer in certain directions (a native swift array that does
not need an element type check stays in this state) enabling us to version loops
based on the state of said array array properties.

rdar://17955309

Swift SVN r23688
2014-12-04 19:24:39 +00:00
Arnold Schwaighofer
c1eefb1dad Reapply "stdlib: Remove dead semantic Array._setElement function
Also remove helper functions."

With fixes.

Swift SVN r22479
2014-10-02 20:26:32 +00:00
Arnold Schwaighofer
2bd116c20b Revert "stdlib: Remove dead semantic Array._setElement function"
This reverts r22468. Because it breaks the build.

Swift SVN r22469
2014-10-02 18:46:24 +00:00
Arnold Schwaighofer
cfd4a0902d stdlib: Remove dead semantic Array._setElement function
Also remove helper functions.

Swift SVN r22468
2014-10-02 18:44:31 +00:00
Arnold Schwaighofer
b7da429751 Document array.get_element_address in HighLevelSILOptimizations.rst
Swift SVN r22467
2014-10-02 16:33:59 +00:00