Commit Graph

655 Commits

Author SHA1 Message Date
swift-ci
6c6c3f6cbc Merge remote-tracking branch 'origin/master' into master-next 2019-01-16 11:30:02 -08:00
Davide Italiano
3ae1a05584 [IRGen] Catch up with API changes in the sanitizer passes. 2019-01-16 10:41:51 -08:00
Slava Pestov
77e5b44560 IRGen: Ensure that default witness thunks are emitted in the same thread as the protocol descriptor
Protocol descriptors for resilient protocols relatively-reference
default witness thunks, so when using -num-threads N with N > 1,
we must ensure the default witness thunk is emitted in the same
LLVM module.
2019-01-15 21:42:24 -05:00
Slava Pestov
152fab22a1 Revert "IRGen: Ensure that default witness thunks are emitted in the same thread as the protocol descriptor" 2019-01-15 01:05:06 -05:00
Slava Pestov
50465688f8 IRGen: Ensure that default witness thunks are emitted in the same thread as the protocol descriptor
Protocol descriptors for resilient protocols relatively-reference
default witness thunks, so when using -num-threads N with N > 1,
we must ensure the default witness thunk is emitted in the same
LLVM module.
2019-01-14 16:26:07 -05:00
Daniel Dunbar
8980213f7c Merge pull request #20687 from ddunbar/swasm-allow-wasm-object-format
[Swift+WASM] Allow Wasm object format.
2019-01-04 08:34:43 -08:00
Adrian Prantl
ff63eaea6f Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

      for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
2018-12-04 15:45:04 -08:00
Daniel Dunbar
1efee0c27a [Swift+WASM] Allow Wasm object format.
- This currently does nothing more than adopt the ELF conventions, but for the
   Wasm object file format.
2018-11-20 15:22:26 -07:00
Han Sang-jin
577ffabc0b [IRGen] Modifications for Cygwin
- Cygwin 64 bit uses the LP64 model and differs from the LLP64 model used on Windows 64 bit.
  On Cygwin 64 bit, CLong is imported as Int. Therefore, no manual mapping is required.
- On Cygwin 64 bit, dlls are loaded above the max address for 32 bits.
  This means that the default CodeModel causes generated code to segfault when run.
2018-11-10 05:34:54 +09:00
Arnold Schwaighofer
152e8db8bb IRGen and runtime implementation for dynamic replacements 2018-11-06 09:58:36 -08:00
Jordan Rose
de07fdfb04 Remove "StartElem" from perform{SIL,IR}Generation
This was only used by the integrated REPL, and is now a dead option.

The "StartElem" option for performTypeChecking is still used for
reading SIL files, which have AST and SIL blocks alternate.
2018-09-25 09:13:52 -07:00
Jordan Rose
71760bcc4e Replace StringMap with DenseMap when the keys don't need to be owned
StringMap always copies its strings into its own storage. A DenseMap
of StringRefs has the same caveats as any other use of StringRef, but
in the cases I've changed the string has very clear ownership that
outlives the map.

No functionality change, but should reduce memory usage and malloc
traffic a little.
2018-09-13 15:15:27 -07:00
Vedant Kumar
c76494b02e Use atomic profile counter updates when TSan is enabled
This suppresses TSan diagnostics about racy profile counter updates.

rdar://40477803
2018-08-16 16:23:25 -07:00
swift-ci
0d5cb630cc Merge remote-tracking branch 'origin/master' into master-next 2018-07-28 10:09:14 -07:00
Erik Eckstein
aafb780d83 IRGen: add an option -align-module-to-page-size for benchmarking
The option aligns all modules to the page size. This help giving more consistent results when doing performance testing with the swift benchmark suite.
It solves the problem that benchmarks which compile down to identical code give different runtime data because of different alignment of the code within a page.
2018-07-27 17:15:14 -07:00
Bob Wilson
ffa88c3d28 Merge remote-tracking branch 'origin/master' into master-next 2018-07-23 14:38:55 -07:00
Bob Wilson
8e330ee344 NFC: Fix indentation around the newly renamed LLVM_DEBUG macro.
Jordan used a sed command to rename DEBUG to LLVM_DEBUG. That caused some
lines to wrap and messed up indentiation for multi-line arguments.
2018-07-21 00:56:18 -07:00
Jordan Rose
cefb0b62ba Replace old DEBUG macro with new LLVM_DEBUG
...using a sed command provided by Vedant:

$ find . -name \*.cpp -print -exec sed -i "" -E "s/ DEBUG\(/ LLVM_DEBUG(/g" {} \;
2018-07-20 14:37:26 -07:00
swift-ci
fdbcfbca65 Merge remote-tracking branch 'origin/master' into master-next 2018-05-30 10:29:01 -07:00
Saleem Abdulrasool
477d43ef1c Merge pull request #16142 from compnerd/irgen-dllstorage
IRGen: the runtime is compacted into the stdlib
2018-05-30 10:27:29 -07:00
Saleem Abdulrasool
7324046d02 IRGen: add swift module metadata into the LLVM module
Introduce new named metadata in the LLVM module (swift.module.flags)
that is used to identify if the module is the standard library.  This
will be used to correct the DLL Storage for runtime functions.
2018-05-29 15:39:32 -07:00
swift-ci
376c6e3f88 Merge remote-tracking branch 'origin/master' into master-next 2018-05-25 14:09:11 -07:00
Arnold Schwaighofer
81a15fbe19 IRGen: Use clangs's LLVM datalayout
It knows better ...

rdar://40275689
2018-05-25 11:19:01 -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
Saleem Abdulrasool
ec4ec6b1f9 IRGen: adjust for LLVM API change
SVN r332881 introduced an additional parameter to emit a DWO file.
2018-05-23 08:48:42 -07:00
swift-ci
6f2b0080fc Merge remote-tracking branch 'origin/master' into master-next 2018-05-15 17:49:17 -07:00
Michael Gottesman
aa035e9563 Rename disable-llvm-arc-opts => disable-swift-specific-llvm-optzns and make sure that we actually disable /all/ LLVM passes.
For instance, we were always running merge functions unconditionally if -O was
passed.

rdar://40097698
2018-05-15 16:18:16 -07:00
swift-ci
65bf732c9b Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 13:28:49 -07:00
Michael Gottesman
08fc956382 Make our LLVM level passes obey disable-llvm-optzns.
We weren't performing the right check here... I added a test that tests both
positive/negative cases.

rdar://40097698
2018-05-14 12:09:06 -07:00
swift-ci
e5203d4b2b Merge remote-tracking branch 'origin/master' into master-next 2018-04-24 23:09:20 -07:00
Slava Pestov
7e4da528a6 IRGen: Remove collectLinkLibrariesFromExternals()
It doesn't appear to do anything.
2018-04-24 20:30:17 -07:00
swift-ci
4b5a4a963d Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 10:08:16 -07:00
Doug Gregor
61e9cf8f1d [IRGen] Centralize the hack to collect autolink libraries from externals.
We had three copies of this code, each of which did a bit more work than
was actually necessary. Consolidate them and avoid calling
`collectLinkLibraries()` on a given module more than once within this
path.
2018-04-10 21:17:10 -07:00
swift-ci
0f92d894a8 Merge remote-tracking branch 'origin/master' into master-next 2018-04-06 14:15:23 -07:00
Arnold Schwaighofer
ae0f98d601 IRGen: Ensure collocation of relative pointers in resilient witness tables
Ensure collocation by recording the dependence between witness table and
witness before functions are processed. Debug info of inlined function
scopes can reference the witness and will cause the wrong IRGenModule to
be associated before lazy witness tables are processed.

No, I am not sure that this is the only instance of this but the same
solution can apply to other instances if we find them.

rdar://39116991
2018-04-06 10:03:54 -07:00
swift-ci
ab78849797 Merge remote-tracking branch 'origin/master' into master-next 2018-02-28 11:51:52 -08:00
swift-ci
78a4e268b3 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-28 11:41:18 -08:00
David Ungar
4866df6dfd Move SupplementaryOutputs into each InputFile. 2018-02-28 09:41:49 -08:00
swift-ci
c93e69746b Merge remote-tracking branch 'origin/master' into master-next 2018-02-21 10:59:05 -08:00
swift-ci
6920f18849 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-21 10:59:03 -08:00
Pavel Yaskevich
9d6dc72e15 [IRGen/Reflection] Emit built-in reflection metadata in JIT mode
Since Mirrors are using swift_getFieldAt we need built-in type
metadata present in JIT/REPL mode as well, otherwise some of the
types are going to become unprintable.
2018-02-20 18:20:09 -08:00
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