Commit Graph

1051 Commits

Author SHA1 Message Date
Ravi Kandhadai
addae9bae4 [SIL Diagnostics] Add warnings for imprecision during assignment of
floating-point literals to variables of floating-point type.
2018-06-18 12:02:23 -07:00
Bob Wilson
225bc732b4 Merge remote-tracking branch 'origin/master' into master-next 2018-06-15 17:26:12 -07:00
swift-ci
13dfae7be5 Merge pull request #17258 from aschwaighofer/cleanup_cfg_after_noreturn_folding 2018-06-15 16:55:33 -07:00
Arnold Schwaighofer
73d3b37c94 Move RemoveUnreachable from SimplifyCFG into a utility function
The utility function will be used in a follow-up commit by a different
pass.

rdar://41139395
2018-06-15 13:52:17 -07:00
swift-ci
7a9a19c111 Merge remote-tracking branch 'origin/master' into master-next 2018-06-12 17:09:16 -07:00
Arnold Schwaighofer
d6b13f99f6 Add documentation to the cast optimizer change 2018-06-12 16:02:33 -07:00
swift-ci
e14e2db475 Merge remote-tracking branch 'origin/master' into master-next 2018-06-11 14:09:23 -07:00
Arnold Schwaighofer
e8b5f1c892 CastOptimizer: A load store to the existential box is not valid on address only types
rdar://40949457
2018-06-11 11:17:04 -07:00
swift-ci
611bf8be6e Merge remote-tracking branch 'origin/master' into master-next 2018-06-07 07:29:41 -07:00
Arnold Schwaighofer
35c697c83d Merge pull request #17026 from aschwaighofer/wip_begin_apply_inlining
SILInliner: Initial support for begin_apply
2018-06-07 07:24:23 -07:00
swift-ci
b87ea23124 Merge remote-tracking branch 'origin/master' into master-next 2018-06-06 17:29:44 -07:00
Arnold Schwaighofer
dfec52b332 SILInliner: Initial support for begin_apply
rdar://35399839
2018-06-06 13:40:16 -07:00
Arnold Schwaighofer
fcd9adaece Cleanup unused variable 2018-06-06 12:23:11 -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
swift-ci
ef514d2353 Merge remote-tracking branch 'origin/master' into master-next 2018-06-05 12:10:01 -07:00
Raj Barik
c277c90be6 Reorganizing the code to find init_existential; Move them to Existential.cpp/h in order for other passes such as ExistentialSpecializer to use it apart from SILCombiner 2018-06-04 11:07:12 -07:00
Jordan Rose
73ee008bfd Merge remote-tracking branch 'origin/master' into master-next 2018-05-29 11:18:44 -07:00
Slava Pestov
d8fc9decf9 AST: Remove GenericSignature::getSubstitutionMap() 2018-05-28 19:45:28 -07:00
Vedant Kumar
105a61e50d Use LLVM_DEBUG() instead of DEBUG()
Upstream has renamed the DEBUG() macro to LLVM_DEBUG. This updates swift
accordingly:

$ find . -name \*.cpp -print -exec sed -i "" -E "s/ DEBUG\(/ LLVM_DEBUG(/g" {} \;
2018-05-24 13:10:45 -07:00
swift-ci
f80606acce Merge remote-tracking branch 'origin/master' into master-next 2018-05-19 17:29:42 -07:00
Slava Pestov
ebb1198d57 AST: There's no longer any reason to pass SubstitutionMap by const reference
SubstitutionMaps are now just a trivial pointer-sized value, so
pass them by value instead.

I did have to move a couple of functors from Type.h to SubstitutionMap.h
to resolve some issues with forward declarations.
2018-05-19 00:45:36 -07:00
swift-ci
476a155bfa Merge remote-tracking branch 'origin/master' into master-next 2018-05-16 14:30:09 -07:00
Ravi Kandhadai
9846342444 [SIL Diagnostics & Tests] Re-add diagnostics for detecting invalid conversions from
floating point literals to integers (<rdar://39730762>).

Add test cases for checking the correctness of the diagnostics.
Contains tests specific to x86 and non-x86 architectures.
2018-05-15 18:08:08 -07:00
swift-ci
4954361e7f Merge remote-tracking branch 'origin/master' into master-next 2018-05-15 10:29:41 -07:00
Slava Pestov
1846b5c373 Merge pull request #16603 from rajbarik/raj-mangler
Add ExistentialToGeneric mangling and demangling code
2018-05-15 10:11:29 -07:00
Raj Barik
e215abc3fa Add ExistentialToGeneric mangling and demangling code 2018-05-14 15:26:18 -07:00
swift-ci
32fff5e9c7 Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 12:48:58 -07:00
Ravi Kandhadai
95ff425389 Revert "[Diagnostics & Tests] Add diagnostics for detecting invalid conversions form Floating point to integers"
This reverts commit 957dc37615.
Reason: Float80 doesn't exist on all non-x86 architectures.
2018-05-14 11:10:08 -07:00
swift-ci
7b7c4d7469 Merge remote-tracking branch 'origin/master' into master-next 2018-05-11 21:10:05 -07:00
Doug Gregor
911ed60a98 Eliminate dead code making use of SubstitutionList. 2018-05-11 17:37:27 -07:00
Doug Gregor
42fe2c1346 [SIL] Remove SubstitutionList from the rest of the generic specializer. 2018-05-11 17:37:26 -07:00
Doug Gregor
761b7c6bb0 [SIL] SubstitutionList -> SubstitutionMap in devirtualizer. 2018-05-11 17:37:26 -07:00
Doug Gregor
8c770f956c [SILOptimizer] Remove dead swift::hasArchetypes(). 2018-05-11 17:37:26 -07:00
swift-ci
fe33d12ead Merge remote-tracking branch 'origin/master' into master-next 2018-05-11 16:29:53 -07:00
Doug Gregor
f2279520ed [SIL Optimizer] Eliminate some uses of SubstitutionList for debug output. 2018-05-11 13:18:06 -07:00
Doug Gregor
d457f1c752 [IRGen/SIL] More widespread use of SubstitutionMap. 2018-05-11 13:18:06 -07:00
Doug Gregor
09446defef Eliminate yet more SubstitutionLists from SIL in search of a steady-state 2018-05-11 13:18:06 -07:00
Doug Gregor
4b5abbddbc [SIL] Teach *ApplyInst to traffic in SubstitutionMap.
Push SubstitutionMaps through most of SILGen and the SIL optimizers
that involve the various *ApplyInsts.
2018-05-11 13:18:06 -07:00
swift-ci
375eab7c9f Merge remote-tracking branch 'origin/master' into master-next 2018-05-08 19:49:20 -07:00
Ravi Kandhadai
957dc37615 [Diagnostics & Tests] Add diagnostics for detecting invalid conversions from
floating point literals to integers (<rdar://39730762>).

Add test cases for checking the correctness of the diagnostics.
2018-05-08 15:30:04 -07:00
swift-ci
ad0712c02b Merge remote-tracking branch 'origin/master' into master-next 2018-05-04 08:49:40 -07:00
David Zarzycki
8c0c55539f [SIL] NFC: Rename misleading getSwiftRValueType() to getASTType()
Reference storage types are not RValues. Also, use more SILType helper
methods to avoid line wrap.
2018-05-04 08:14:38 -04:00
swift-ci
5f22c9ceec Merge remote-tracking branch 'origin/master' into master-next 2018-05-03 13:49:29 -07:00
Doug Gregor
b1f338a00b [SIL Opt] Switch GenericSpecializationInformation over to SubstitutionMap.
There isn't a clean cut point here, so switch
GenericSpecializationInformation from SubstitutionList to
SubstitutionMap and carry along dual SubstitutionMap/SubstitutionList
representations for a small part of ReabstractionInfo.
2018-05-03 09:27:21 -07:00
swift-ci
49b2c7fe2a Merge remote-tracking branch 'origin/master' into master-next 2018-05-01 12:08:52 -07:00
Arnold Schwaighofer
678a99e76a Add a copy_block_without_escaping %block withoutEscaping %closure instruction
Mandatory pass will clean it up and replace it by a copy_block and
is_escaping/cond_fail/release combination on the %closure in follow-up
patches.

The instruction marks the dependence of a block on a closure that is
used as an 'withoutActuallyEscaping' sentinel.

rdar://39682865
2018-05-01 07:24:19 -07:00
swift-ci
c12d46675a Merge remote-tracking branch 'origin/master' into master-next 2018-04-30 17:49:07 -07:00
Huon Wilson
978a5c89b1 [SILOptimizer] std::function -> llvm::function_ref for some non-escaping params. 2018-05-01 08:29:07 +10:00
swift-ci
dfd66e7f6f Merge remote-tracking branch 'origin/master' into master-next 2018-04-27 10:08:58 -07:00
Michael Gottesman
ae14c16e53 Merge pull request #16196 from gottesmm/pr-b7bd0c9de669757c7b00339a8f30e79f6ff1e7c2
[func-sig-opts] Add a new mangling for the guaranteed->owned transfor…
2018-04-27 10:01:00 -07:00