Skip to content

Commit 68665e6

Browse files
authored
---
yaml --- r: 269303 b: refs/heads/tensorflow-merge c: 74a3e8a h: refs/heads/master i: 269301: ae77f17 269299: d604d2c 269295: bbee9f3
1 parent 075290a commit 68665e6

File tree

62 files changed

+3945
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3945
-524
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,4 +1128,4 @@ refs/tags/swift-4.2.1-RELEASE: 02a6ca969ea1387475b6caeb69c31186df7d30b6
11281128
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-11-01-a: 3b0299288f8287094b9ef587f46df54f42a347af
11291129
refs/heads/5.0-add-libcxx-and-clang-tools-extra: eb6e6f9b0a551e7804e96d0dac83add11ec73977
11301130
refs/heads/Fix-DataCreateSmall: e15aff31b7406a5b2dadac9d7810941cec85035a
1131-
refs/heads/tensorflow-merge: 80a1c084a56a48826e244647f7ff69a257692153
1131+
refs/heads/tensorflow-merge: 74a3e8a5b5e27b856cfcb17ce3b20447950016a7

branches/tensorflow-merge/cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ macro(swift_common_unified_build_config product)
226226
set(PATH_TO_LLVM_BUILD "${CMAKE_BINARY_DIR}")
227227
set(${product}_PATH_TO_CLANG_BUILD "${CMAKE_BINARY_DIR}")
228228
set(PATH_TO_CLANG_BUILD "${CMAKE_BINARY_DIR}")
229-
set(CLANG_MAIN_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/tools/clang/include")
229+
set(CLANG_MAIN_INCLUDE_DIR "${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include")
230230
set(CLANG_BUILD_INCLUDE_DIR "${CMAKE_BINARY_DIR}/tools/clang/include")
231231
set(${product}_NATIVE_LLVM_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
232232
set(${product}_NATIVE_CLANG_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
@@ -235,8 +235,8 @@ macro(swift_common_unified_build_config product)
235235

236236
# If cmark was checked out into tools/cmark, expect to build it as
237237
# part of the unified build.
238-
if(EXISTS "${CMAKE_SOURCE_DIR}/tools/cmark/")
239-
set(${product}_PATH_TO_CMARK_SOURCE "${CMAKE_SOURCE_DIR}/tools/cmark")
238+
if(EXISTS "${LLVM_EXTERNAL_CMARK_SOURCE_DIR}")
239+
set(${product}_PATH_TO_CMARK_SOURCE "${LLVM_EXTERNAL_CMARK_SOURCE_DIR}")
240240
set(${product}_PATH_TO_CMARK_BUILD "${CMAKE_BINARY_DIR}/tools/cmark")
241241
set(${product}_CMARK_LIBRARY_DIR "${CMAKE_BINARY_DIR}/lib")
242242

branches/tensorflow-merge/docs/WindowsBuild.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ There are two supported ways to build Swift on Windows, they are
1111

1212
`clang-cl` is recommended over MSVC for building Swift on Windows.
1313
Although it is possible to build the compiler and the standard library with
14-
MSVC, and use those built products to compile a Swift program, it won't be
15-
possible to run the binary without seperately obtaining the Swift runtime. On
14+
MSVC and to use those built products to compile a Swift program, it won't be
15+
possible to run the binary without separately obtaining the Swift runtime. On
1616
the other hand, `clang-cl` is able to build the runtime, which makes it
1717
possible to build and run all the components required for Swift natively on
1818
Windows.
1919

20-
clang should be 7.0 or newer. Visual Studio 2017 is needed in all cases as
20+
clang should be 7.0 or newer. Visual Studio 2017 is needed in all cases as
2121
it provides some of the needed headers and libraries.
2222

2323
## `clang-cl`

branches/tensorflow-merge/include/swift/AST/DiagnosticsFrontend.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ ERROR(missing_dependency_of_parseable_module_interface,none,
276276
ERROR(error_extracting_dependencies_from_cached_module,none,
277277
"error extracting dependencies from cached module '%0'",
278278
(StringRef))
279+
ERROR(unknown_forced_module_loading_mode,none,
280+
"unknown value for SWIFT_FORCE_MODULE_LOADING variable: '%0'",
281+
(StringRef))
279282

280283
#ifndef DIAG_NO_UNDEF
281284
# if defined(DIAG)

branches/tensorflow-merge/include/swift/AST/DiagnosticsSIL.def

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,22 @@ ERROR(shifting_all_significant_bits,none,
300300
ERROR(static_report_error, none,
301301
"static report error", ())
302302

303+
ERROR(pound_assert_condition_not_constant,none,
304+
"#assert condition not constant", ())
305+
ERROR(pound_assert_failure,none,
306+
"%0", (StringRef))
307+
308+
NOTE(constexpr_unknown_reason_default,none, "could not fold operation", ())
309+
NOTE(constexpr_too_many_instructions,none,
310+
"exceeded instruction limit: %0 when evaluating the expression at compile "
311+
"time", (unsigned))
312+
NOTE(constexpr_loop,none, "control flow loop found", ())
313+
NOTE(constexpr_overflow,none, "integer overflow detected", ())
314+
NOTE(constexpr_trap,none, "trap detected", ())
315+
NOTE(constexpr_called_from,none, "when called from here", ())
316+
NOTE(constexpr_not_evaluable,none,
317+
"expression not evaluable as constant here", ())
318+
303319
ERROR(non_physical_addressof,none,
304320
"addressof only works with purely physical lvalues; "
305321
"use `withUnsafePointer` or `withUnsafeBytes` unless you're implementing "

branches/tensorflow-merge/include/swift/Frontend/ParseableInterfaceSupport.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ getModuleCachePathFromClang(const clang::CompilerInstance &Instance);
6161
/// directory, and loading the serialized .swiftmodules from there.
6262
class ParseableInterfaceModuleLoader : public SerializedModuleLoaderBase {
6363
explicit ParseableInterfaceModuleLoader(ASTContext &ctx, StringRef cacheDir,
64-
DependencyTracker *tracker)
65-
: SerializedModuleLoaderBase(ctx, tracker),
64+
DependencyTracker *tracker,
65+
ModuleLoadingMode loadMode)
66+
: SerializedModuleLoaderBase(ctx, tracker, loadMode),
6667
CacheDir(cacheDir)
6768
{}
6869

@@ -83,9 +84,10 @@ class ParseableInterfaceModuleLoader : public SerializedModuleLoaderBase {
8384
public:
8485
static std::unique_ptr<ParseableInterfaceModuleLoader>
8586
create(ASTContext &ctx, StringRef cacheDir,
86-
DependencyTracker *tracker = nullptr) {
87+
DependencyTracker *tracker,
88+
ModuleLoadingMode loadMode) {
8789
return std::unique_ptr<ParseableInterfaceModuleLoader>(
88-
new ParseableInterfaceModuleLoader(ctx, cacheDir, tracker));
90+
new ParseableInterfaceModuleLoader(ctx, cacheDir, tracker, loadMode));
8991
}
9092
};
9193

branches/tensorflow-merge/include/swift/FrontendTool/FrontendTool.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,6 @@ class FrontendObserver {
4242

4343
/// The frontend has configured the compiler instance.
4444
virtual void configuredCompiler(CompilerInstance &instance);
45-
46-
/// The frontend has performed semantic analysis.
47-
virtual void performedSemanticAnalysis(CompilerInstance &instance);
48-
49-
/// The frontend has performed basic SIL generation.
50-
/// SIL diagnostic passes have not yet been applied.
51-
virtual void performedSILGeneration(SILModule &module);
52-
53-
/// The frontend has executed the SIL diagnostic passes.
54-
virtual void performedSILDiagnostics(SILModule &module);
55-
56-
/// The frontend has executed the SIL optimization pipeline.
57-
virtual void performedSILOptimization(SILModule &module);
58-
59-
/// The frontend is about to run the program as an immediate script.
60-
virtual void aboutToRunImmediately(CompilerInstance &instance);
61-
62-
// TODO: maybe enhance this interface to hear about IRGen and LLVM
63-
// progress.
6445
};
6546

6647
/// Perform all the operations of the frontend, exactly as if invoked

branches/tensorflow-merge/include/swift/Runtime/BuiltinTypes.def

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,43 @@ BUILTIN_VECTOR_TYPE(Bi16_, Int16, 4)
7474
BUILTIN_VECTOR_TYPE(Bi16_, Int16, 8)
7575
BUILTIN_VECTOR_TYPE(Bi16_, Int16, 16)
7676
BUILTIN_VECTOR_TYPE(Bi16_, Int16, 32)
77+
BUILTIN_VECTOR_TYPE(Bi16_, Int16, 64)
7778

7879
// Int32 vector types
7980
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 2)
8081
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 3)
8182
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 4)
8283
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 8)
8384
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 16)
85+
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 32)
86+
BUILTIN_VECTOR_TYPE(Bi32_, Int32, 64)
8487

8588
// Int64 vector types
8689
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 2)
8790
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 3)
8891
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 4)
8992
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 8)
93+
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 16)
94+
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 32)
95+
BUILTIN_VECTOR_TYPE(Bi64_, Int64, 64)
9096

9197
// Float32 vector types
9298
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 2)
9399
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 3)
94100
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 4)
95101
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 8)
96102
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 16)
103+
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 32)
104+
BUILTIN_VECTOR_TYPE(Bf32_, FPIEEE32, 64)
97105

98106
// Float64 vector types
99107
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 2)
100108
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 3)
101109
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 4)
102110
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 8)
111+
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 16)
112+
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 32)
113+
BUILTIN_VECTOR_TYPE(Bf64_, FPIEEE64, 64)
103114

104115
#undef BUILTIN_VECTOR_TYPE
105116
#undef VECTOR_BUILTIN_SYMBOL_NAME

branches/tensorflow-merge/include/swift/Runtime/Metadata.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,11 @@ SWIFT_RUNTIME_EXPORT
495495
const ClassMetadata *
496496
swift_getObjCClassFromMetadata(const Metadata *theClass);
497497

498+
// Get the ObjC class object from class type metadata,
499+
// or nullptr if the type isn't an ObjC class.
500+
const ClassMetadata *
501+
swift_getObjCClassFromMetadataConditional(const Metadata *theClass);
502+
498503
SWIFT_RUNTIME_EXPORT
499504
const ClassMetadata *
500505
swift_getObjCClassFromObject(HeapObject *object);

0 commit comments

Comments
 (0)