Commit Graph

414 Commits

Author SHA1 Message Date
swift-ci
7a3969774e Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-16 12:58:13 -08:00
Bob Wilson
43f8f18d3d Fix whitespace changes introduced during a merge conflict resolution
Xi edited this file to resolve a conflict (87d57fdc51) and his editor was
set to automatically remove all trailing whitespace. This divergence from
master is causing more conflicts, so I'm removing these unexpected
whitespace differences.
2018-02-16 12:37:55 -08:00
swift-ci
e2972f1279 Merge remote-tracking branch 'origin/master' into master-next 2018-02-15 23:49:28 -08:00
Bob Wilson
d8dd04796a master-next: fix bad merge in d052a53ce6 2018-02-15 21:51:57 -08:00
Bob Wilson
22e1a7da96 master-next: Pass module references to bitcode writer to match LLVM r325155. 2018-02-15 20:58:11 -08:00
David Ungar
026b850d0c Only pass output filename and main input file name for debugging into IRGenModule constructor. 2018-02-15 20:52:26 -07:00
David Ungar
dec78900cd Only use supplementary outputs for first parallel-generated input. 2018-02-15 15:34:55 -07:00
David Ungar
e7a120f9b3 Avoid copying strings and PrimarySpecificPaths. 2018-02-15 15:34:55 -07:00
David Ungar
fec411e9bc reformatted 2018-02-15 15:34:55 -07:00
David Ungar
1f9a4f3591 Pass around arguments for primary-specific filenames.
Get rid of IRGenOpts attributes that won’t work for batch mode and also remove fakeNamesStub.
2018-02-15 15:34:55 -07:00
Arnold Schwaighofer
2bfeb2fbcc Adapt to llvm api change CodeModel::Default is now modeled as Optional<CodeModel::Mode>.None 2018-02-15 12:53:40 -08:00
Xi Ge
87d57fdc51 Merge remote-tracking branch 'apple/master' into apple-master-llvm-swift5-transition 2018-02-15 11:22:55 -08:00
Xi Ge
d052a53ce6 Merge remote-tracking branch 'apple/master' into apple-master-next 2018-02-15 11:20:08 -08:00
Arnold Schwaighofer
2d58f08142 Use clang's effective llvm triple for IR generation
Instead of using the target that was passed to the driver. Use the target from
the clang importer that might have been changed by clang (i.e armv7 to thumbv7
on darwin)

rdar://32599805
2018-02-14 15:45:43 -08:00
swift-ci
e416454ed5 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-09 23:18:50 -08:00
swift-ci
f0c2d65e1c Merge remote-tracking branch 'origin/master' into master-next 2018-01-09 23:09:03 -08:00
swift-ci
ea489cead0 Merge pull request #13844 from DougGregor/runtime-protocol-name-lookup 2018-01-09 23:06:09 -08:00
Bob Wilson
1b55b85e2b Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-09 16:12:10 -08:00
Doug Gregor
0f4963dba8 [IRGen] Put references to all emitted protocols into a special section.
Introduce a new section that contains (relative) references to all of the
Swift protocol descriptors emitted into this module. We'll use this to
find protocol descriptors by name.
2018-01-09 16:10:18 -08:00
Ben Langmuir
627d6d0a9f Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	lib/IRGen/IRGen.cpp
2018-01-09 10:54:33 -08:00
John McCall
3c54c0edfc IRGen and basic optimizer support for coroutines. 2018-01-09 11:35:09 -05:00
swift-ci
0302515cf0 Merge remote-tracking branch 'origin/master' into master-next 2017-12-18 12:48:55 -08:00
David Ungar
51d3165874 NFC: Clarifying uses of NumThreads.
Add hasMultipleGMs predicate to SILOptions.
Rename parameters to TBD file handling to better reflect abstraction boundary.

fix
2017-12-16 13:58:01 -08:00
Bob Wilson
8d1513a260 master-next: Update for LLVM TargetSubtargetInfo.h moving to CodeGen.
In LLVM r318490, the TargetSubtargetInfo.h header file was moved from the
Target directory to the CodeGen directory. rdar://problem/35634771
2017-11-19 08:45:11 -08:00
swift-ci
d3b8ffc42a Merge remote-tracking branch 'origin/master' into master-next 2017-11-14 12:09:04 -08:00
Erik Eckstein
90c21be191 Unify the implementation of optimization mode in various option classes.
This commit is mostly refactoring.

*) Introduce a new OptimizationMode enum and use that in SILOptions and IRGenOptions
*) Allow the optimization mode also be specified for specific SILFunctions. This is not used in this commit yet and thus still a NFC.

Also, fixes a minor bug: we didn’t run mandatory IRGen passes for functions with @_semantics("optimize.sil.never")
2017-11-14 11:25:02 -08:00
Bob Wilson
837a8516f0 Merge remote-tracking branch 'origin/master' into master-next 2017-10-19 20:56:04 -07:00
Saleem Abdulrasool
8ab7956c42 IRGen: do not use the Large Code Model on Win64
The large code model is not necessary.  Large Address Aware should be
sufficient for dealing with the higher address ranges.  Using the large
code model breaks the DLL storage semantics on Windows.  With this we
are able to build most of the standard library for all variants of
Windows.

Addresses SR-6150!
2017-10-17 15:05:53 -07:00
swift-ci
c6bb8ba0f2 Merge remote-tracking branch 'origin/master' into master-next 2017-10-06 10:09:52 -07:00
Michael Gottesman
723c6212f2 Run ObjCARCContract when optimizing no matter the IRGenOutputKind.
Previously, we were just running ObjCARCContract when codegening. This is out of
character with the rest of the LLVM passes in Swift, namely that after these
have run, an IR pass no longer contains any compiler intrinsics. This can be
seen by SwiftARCContract running in the -O pipeline.

This commit harmonizes the behavior here.

For testing purposes, I added a flag that disables the running of
ObjCARCContract for testing purposes.

rdar://34824507
2017-10-06 08:59:58 -07:00
swift-ci
afb3d37547 Merge remote-tracking branch 'origin/master' into master-next 2017-10-03 12:29:09 -07:00
Arnold Schwaighofer
c61af365ed Truly disable thumb emission
Interpreter support for thumb is not yet properly implemented/tested.
Disable thumb emission.

This change is necessary because LLVM now uses the features string in the
metadata. This features string contains '+thumb'.

This is a follow-up to 034241e440.

rdar://32599805
rdar://34781037 (tests that expect non-thumb instructions are failing)
2017-10-03 11:12:13 -07:00
swift-ci
1fb83060df Merge remote-tracking branch 'origin/master' into master-next 2017-09-23 10:29:35 -07:00
Saleem Abdulrasool
7bd2256120 runtime: clean up last of -Wqual-cast warnings
This fixes up the remaining cast qualifier warnings from GCC 6.  Use
multiple casts to adjust the const qualification.  Prefer C++ style
casts.  NFC.
2017-09-22 14:14:13 -07:00
swift-ci
5702d522ab Merge remote-tracking branch 'origin/master' into master-next 2017-09-13 06:29:47 -07:00
Arnold Schwaighofer
034241e440 Revert "Use clang's effective llvm triple for IR generation (#10211)"
This reverts commit 2e3522fafc because debugging
with thumb instructions is broken and being worked on.

rdar://32599805
2017-09-12 13:59:53 -07:00
swift-ci
e6d9418ab8 Merge remote-tracking branch 'origin/master' into master-next 2017-08-17 13:29:21 -07:00
Graydon Hoare
04d11afdad [Stats] Collect IR/LLVM always-on stats correctly when multithreading. 2017-08-17 13:45:06 -04:00
George Karpenkov
efe143c2f4 Adding support for -sanitize=fuzzer flag (#11381)
Similarly to Clang, the flag enables coverage instrumentation, and links
`libLLVMFuzzer.a` to the produced binary.
Additionally, this change affects the driver logic, and enables the
concurrent usage of multiple sanitizers.
2017-08-07 18:16:51 -07:00
George Karpenkov
8b368e92c3 Adding support for -sanitize=fuzzer flag. (#9450)
Similarly to Clang, the flag enables coverage instrumentation, and links
`libLLVMFuzzer.a` to the produced binary.
Additionally, this change affects the driver logic, and enables the
concurrent usage of multiple sanitizers.
2017-08-07 17:07:19 -07:00
Bob Wilson
19f9237d7c [master-next] More updates for LLVM r309911 CodeModel changes.
The default when creating a target machine should be to leave the
code model unspecified (at least that is the default argument value).
The previous change (7526d07525) also missed one place that needed
to be updated.
2017-08-03 18:44:10 -07:00
Bob Wilson
6d3dceaf47 [master-next] Reapply "[IRGen] The "default" LLVM code model is now Small."
This reverts commit 1d5400bf1a.
2017-08-03 17:10:47 -07:00
Bob Wilson
1d5400bf1a Revert "[IRGen] The "default" LLVM code model is now Small."
This reverts commit 7526d07525.

That commit was applied to master-next for changes in swift-llvm's
upstream-with-swift branch that are not included in the swift-4.1-branch.
2017-08-03 14:22:23 -07:00
Sean Callanan
7526d07525 [IRGen] The "default" LLVM code model is now Small. 2017-08-03 10:22:01 -07:00
Erik Eckstein
d111dca25f IRGen: fix debugging timers
When enabled, those timers caused a crash when doing multithreaded whole module optimizations.
2017-06-15 15:04:34 -07:00
Arnold Schwaighofer
2e3522fafc Use clang's effective llvm triple for IR generation (#10211)
* Use clang's effective llvm triple for IR generation

Instead of using the target that was passed to the driver. Use the target from
the clang importer that might have been changed by clang (i.e armv7 to thumbv7
on darwin)

rdar://32599805

* Address review comments

* Fix test case osx-targets.swift

* Fix pic.swift test case

* Fix test abi_v7k.swift

* Address review comment for test osx-targets.swift
2017-06-13 16:26:14 -07:00
Jordan Rose
f0aca936c7 Allow '@objc(RuntimeName)' on classes with generic ancestry.
This is accomplished by recognizing this specific situation and
replacing the 'objc' attribute with a hidden '_objcRuntimeName'
attribute. This /only/ applies to classes that are themselves
non-generic (including any enclosing generic context) but that have
generic ancestry, and thus cannot be exposed directly to Objective-C.

This commit also eliminates '@NSKeyedArchiverClassName'. It was
decided that the distinction between '@NSKeyedArchiverClassName' and
'@objc' was too subtle to be worth explaining to developers, and that
any case where you'd use '@NSKeyedArchiverClassName' was already a
place where the ObjC name wasn't visible at compile time.

This commit does not update diagnostics to reflect this change; we're
going to change them anyway.

rdar://problem/32414557
2017-06-05 17:32:25 -07:00
Graydon Hoare
56460309bc [Stats] Add always-on statistic for NumLLVMBytesOutput. 2017-05-31 17:30:40 -07:00
Joe Shajrawi
edea7d04b3 Add a flag (false by default) for large loadable types pass 2017-05-22 14:25:25 -07:00
Erik Eckstein
b1d5c77cec Runtime support for the NSArchiver class attributes.
Register class names for NSKeyedArchiver and NSKeyedUnarchiver based on the @NSKeyedArchiveLegacy and @_staticInitializeObjCMetadata class attributes.

@NSKeyedArchiveLegacy registers a class name translation.
@_staticInitializeObjCMetadata just makes sure that the metadata of a class is instantiated.

This registration code is executed as a static initializer, like a C++ global constructor.
2017-05-08 14:00:03 -07:00