Date: Sun, 29 Jan 2017 21:56:47 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r312967 - in projects/clang400-import: contrib/compiler-rt/lib/builtins/arm contrib/compiler-rt/lib/xray contrib/libc++/include contrib/llvm/include/llvm/IR contrib/llvm/lib/Analysis co... Message-ID: <201701292156.v0TLulox000236@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun Jan 29 21:56:47 2017 New Revision: 312967 URL: https://svnweb.freebsd.org/changeset/base/312967 Log: Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch r293443, and update build glue. Modified: projects/clang400-import/contrib/compiler-rt/lib/builtins/arm/comparesf2.S projects/clang400-import/contrib/compiler-rt/lib/xray/xray_arm.cc projects/clang400-import/contrib/libc++/include/__config projects/clang400-import/contrib/libc++/include/__string projects/clang400-import/contrib/libc++/include/__threading_support projects/clang400-import/contrib/libc++/include/deque projects/clang400-import/contrib/libc++/include/forward_list projects/clang400-import/contrib/libc++/include/list projects/clang400-import/contrib/libc++/include/queue projects/clang400-import/contrib/libc++/include/stack projects/clang400-import/contrib/libc++/include/vector projects/clang400-import/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td projects/clang400-import/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64.td projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/R600Instructions.td projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/VOP3Instructions.td projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp projects/clang400-import/contrib/llvm/tools/lld/CMakeLists.txt projects/clang400-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp projects/clang400-import/contrib/llvm/tools/lld/ELF/SyntheticSections.h projects/clang400-import/lib/clang/include/clang/Basic/Version.inc projects/clang400-import/lib/clang/include/lld/Config/Version.inc Directory Properties: projects/clang400-import/contrib/compiler-rt/ (props changed) projects/clang400-import/contrib/libc++/ (props changed) projects/clang400-import/contrib/llvm/ (props changed) projects/clang400-import/contrib/llvm/tools/clang/ (props changed) projects/clang400-import/contrib/llvm/tools/lld/ (props changed) projects/clang400-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang400-import/contrib/compiler-rt/lib/builtins/arm/comparesf2.S ============================================================================== --- projects/clang400-import/contrib/compiler-rt/lib/builtins/arm/comparesf2.S Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/compiler-rt/lib/builtins/arm/comparesf2.S Sun Jan 29 21:56:47 2017 (r312967) @@ -283,7 +283,7 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2) END_COMPILERRT_FUNCTION(__unordsf2) #if defined(COMPILER_RT_ARMHF_TARGET) -DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum): +DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum) vmov s0, r0 vmov s1, r1 b SYMBOL_NAME(__unordsf2) Modified: projects/clang400-import/contrib/compiler-rt/lib/xray/xray_arm.cc ============================================================================== --- projects/clang400-import/contrib/compiler-rt/lib/xray/xray_arm.cc Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/compiler-rt/lib/xray/xray_arm.cc Sun Jan 29 21:56:47 2017 (r312967) @@ -19,6 +19,8 @@ #include <atomic> #include <cassert> +extern "C" void __clear_cache(void* start, void* end); + namespace __xray { uint64_t cycleFrequency() XRAY_NEVER_INSTRUMENT { @@ -116,8 +118,8 @@ inline static bool patchSled(const bool // B #20 uint32_t *FirstAddress = reinterpret_cast<uint32_t *>(Sled.Address); + uint32_t *CurAddress = FirstAddress + 1; if (Enable) { - uint32_t *CurAddress = FirstAddress + 1; CurAddress = Write32bitLoadR0(CurAddress, reinterpret_cast<uint32_t>(FuncId)); CurAddress = @@ -125,6 +127,7 @@ inline static bool patchSled(const bool *CurAddress = uint32_t(PatchOpcodes::PO_BlxIp); CurAddress++; *CurAddress = uint32_t(PatchOpcodes::PO_PopR0Lr); + CurAddress++; std::atomic_store_explicit( reinterpret_cast<std::atomic<uint32_t> *>(FirstAddress), uint32_t(PatchOpcodes::PO_PushR0Lr), std::memory_order_release); @@ -133,6 +136,8 @@ inline static bool patchSled(const bool reinterpret_cast<std::atomic<uint32_t> *>(FirstAddress), uint32_t(PatchOpcodes::PO_B20), std::memory_order_release); } + __clear_cache(reinterpret_cast<char*>(FirstAddress), + reinterpret_cast<char*>(CurAddress)); return true; } Modified: projects/clang400-import/contrib/libc++/include/__config ============================================================================== --- projects/clang400-import/contrib/libc++/include/__config Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/__config Sun Jan 29 21:56:47 2017 (r312967) @@ -403,15 +403,6 @@ namespace std { #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow"))) #endif -// A constexpr version of __builtin_memcmp was added in clang 4.0 -#if __has_builtin(__builtin_memcmp) -# ifdef __apple_build_version__ -// No shipping version of Apple's clang has constexpr __builtin_memcmp -# elif __clang_major__ > 3 -# define _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR -# endif -#endif - #elif defined(_LIBCPP_COMPILER_GCC) #define _ALIGNAS(x) __attribute__((__aligned__(x))) Modified: projects/clang400-import/contrib/libc++/include/__string ============================================================================== --- projects/clang400-import/contrib/libc++/include/__string Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/__string Sun Jan 29 21:56:47 2017 (r312967) @@ -243,7 +243,7 @@ char_traits<char>::compare(const char_ty { if (__n == 0) return 0; -#ifdef _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_memcmp(__s1, __s2, __n); #elif _LIBCPP_STD_VER <= 14 return memcmp(__s1, __s2, __n); @@ -265,7 +265,9 @@ char_traits<char>::find(const char_type* { if (__n == 0) return NULL; -#if _LIBCPP_STD_VER <= 14 +#if __has_feature(cxx_constexpr_string_builtins) + return __builtin_char_memchr(__s, to_int_type(__a), __n); +#elif _LIBCPP_STD_VER <= 14 return (const char_type*) memchr(__s, to_int_type(__a), __n); #else for (; __n; --__n) @@ -331,7 +333,7 @@ char_traits<wchar_t>::compare(const char { if (__n == 0) return 0; -#if __has_builtin(__builtin_wmemcmp) +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_wmemcmp(__s1, __s2, __n); #elif _LIBCPP_STD_VER <= 14 return wmemcmp(__s1, __s2, __n); @@ -351,7 +353,7 @@ inline _LIBCPP_CONSTEXPR_AFTER_CXX14 size_t char_traits<wchar_t>::length(const char_type* __s) _NOEXCEPT { -#if __has_builtin(__builtin_wcslen) +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_wcslen(__s); #elif _LIBCPP_STD_VER <= 14 return wcslen(__s); @@ -369,7 +371,7 @@ char_traits<wchar_t>::find(const char_ty { if (__n == 0) return NULL; -#if __has_builtin(__builtin_wmemchr) +#if __has_feature(cxx_constexpr_string_builtins) return __builtin_wmemchr(__s, __a, __n); #elif _LIBCPP_STD_VER <= 14 return wmemchr(__s, __a, __n); Modified: projects/clang400-import/contrib/libc++/include/__threading_support ============================================================================== --- projects/clang400-import/contrib/libc++/include/__threading_support Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/__threading_support Sun Jan 29 21:56:47 2017 (r312967) @@ -40,6 +40,12 @@ #define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY #endif +#if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(no_thread_safety_analysis) +#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis)) +#else +#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS +#endif + _LIBCPP_BEGIN_NAMESPACE_STD #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) @@ -98,25 +104,25 @@ typedef DWORD __libcpp_tls_key; _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m); _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_mutex_lock(__libcpp_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_mutex_trylock(__libcpp_mutex_t *__m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_mutex_unlock(__libcpp_mutex_t *__m); _LIBCPP_THREAD_ABI_VISIBILITY @@ -129,10 +135,10 @@ int __libcpp_condvar_signal(__libcpp_con _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_condvar_broadcast(__libcpp_condvar_t* __cv); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m); -_LIBCPP_THREAD_ABI_VISIBILITY +_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m, timespec *__ts); Modified: projects/clang400-import/contrib/libc++/include/deque ============================================================================== --- projects/clang400-import/contrib/libc++/include/deque Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/deque Sun Jan 29 21:56:47 2017 (r312967) @@ -110,8 +110,8 @@ public: void push_front(value_type&& v); void push_back(const value_type& v); void push_back(value_type&& v); - template <class... Args> reference emplace_front(Args&&... args); - template <class... Args> reference emplace_back(Args&&... args); + template <class... Args> reference emplace_front(Args&&... args); // reference in C++17 + template <class... Args> reference emplace_back(Args&&... args); // reference in C++17 template <class... Args> iterator emplace(const_iterator p, Args&&... args); iterator insert(const_iterator p, const value_type& v); iterator insert(const_iterator p, value_type&& v); @@ -1342,8 +1342,13 @@ public: void push_back(const value_type& __v); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS +#if _LIBCPP_STD_VER > 14 template <class... _Args> reference emplace_front(_Args&&... __args); - template <class... _Args> reference emplace_back(_Args&&... __args); + template <class... _Args> reference emplace_back (_Args&&... __args); +#else + template <class... _Args> void emplace_front(_Args&&... __args); + template <class... _Args> void emplace_back (_Args&&... __args); +#endif template <class... _Args> iterator emplace(const_iterator __p, _Args&&... __args); #endif // _LIBCPP_HAS_NO_VARIADICS void push_front(value_type&& __v); @@ -1822,7 +1827,11 @@ deque<_Tp, _Allocator>::push_back(value_ template <class _Tp, class _Allocator> template <class... _Args> +#if _LIBCPP_STD_VER > 14 typename deque<_Tp, _Allocator>::reference +#else +void +#endif deque<_Tp, _Allocator>::emplace_back(_Args&&... __args) { allocator_type& __a = __base::__alloc(); @@ -1832,7 +1841,9 @@ deque<_Tp, _Allocator>::emplace_back(_Ar __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...); ++__base::size(); +#if _LIBCPP_STD_VER > 14 return *--__base::end(); +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS @@ -1870,7 +1881,11 @@ deque<_Tp, _Allocator>::push_front(value template <class _Tp, class _Allocator> template <class... _Args> +#if _LIBCPP_STD_VER > 14 typename deque<_Tp, _Allocator>::reference +#else +void +#endif deque<_Tp, _Allocator>::emplace_front(_Args&&... __args) { allocator_type& __a = __base::__alloc(); @@ -1880,7 +1895,9 @@ deque<_Tp, _Allocator>::emplace_front(_A __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...); --__base::__start_; ++__base::size(); +#if _LIBCPP_STD_VER > 14 return *__base::begin(); +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS Modified: projects/clang400-import/contrib/libc++/include/forward_list ============================================================================== --- projects/clang400-import/contrib/libc++/include/forward_list Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/forward_list Sun Jan 29 21:56:47 2017 (r312967) @@ -87,7 +87,7 @@ public: reference front(); const_reference front() const; - template <class... Args> reference emplace_front(Args&&... args); + template <class... Args> reference emplace_front(Args&&... args); // reference in C++17 void push_front(const value_type& v); void push_front(value_type&& v); @@ -747,7 +747,11 @@ public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS +#if _LIBCPP_STD_VER > 14 template <class... _Args> reference emplace_front(_Args&&... __args); +#else + template <class... _Args> void emplace_front(_Args&&... __args); +#endif #endif void push_front(value_type&& __v); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES @@ -1103,7 +1107,11 @@ forward_list<_Tp, _Alloc>::assign(initia template <class _Tp, class _Alloc> template <class... _Args> +#if _LIBCPP_STD_VER > 14 typename forward_list<_Tp, _Alloc>::reference +#else +void +#endif forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args) { __node_allocator& __a = base::__alloc(); @@ -1113,7 +1121,9 @@ forward_list<_Tp, _Alloc>::emplace_front _VSTD::forward<_Args>(__args)...); __h->__next_ = base::__before_begin()->__next_; base::__before_begin()->__next_ = __h.release(); +#if _LIBCPP_STD_VER > 14 return base::__before_begin()->__next_->__value_; +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS Modified: projects/clang400-import/contrib/libc++/include/list ============================================================================== --- projects/clang400-import/contrib/libc++/include/list Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/list Sun Jan 29 21:56:47 2017 (r312967) @@ -93,10 +93,10 @@ public: size_type max_size() const noexcept; template <class... Args> - reference emplace_front(Args&&... args); + reference emplace_front(Args&&... args); // reference in C++17 void pop_front(); template <class... Args> - reference emplace_back(Args&&... args); + reference emplace_back(Args&&... args); // reference in C++17 void pop_back(); void push_front(const value_type& x); void push_front(value_type&& x); @@ -969,9 +969,17 @@ public: void push_back(value_type&& __x); #ifndef _LIBCPP_HAS_NO_VARIADICS template <class... _Args> +#if _LIBCPP_STD_VER > 14 reference emplace_front(_Args&&... __args); +#else + void emplace_front(_Args&&... __args); +#endif template <class... _Args> +#if _LIBCPP_STD_VER > 14 reference emplace_back(_Args&&... __args); +#else + void emplace_back(_Args&&... __args); +#endif template <class... _Args> iterator emplace(const_iterator __p, _Args&&... __args); #endif // _LIBCPP_HAS_NO_VARIADICS @@ -1600,7 +1608,11 @@ list<_Tp, _Alloc>::push_back(value_type& template <class _Tp, class _Alloc> template <class... _Args> +#if _LIBCPP_STD_VER > 14 typename list<_Tp, _Alloc>::reference +#else +void +#endif list<_Tp, _Alloc>::emplace_front(_Args&&... __args) { __node_allocator& __na = base::__node_alloc(); @@ -1609,12 +1621,20 @@ list<_Tp, _Alloc>::emplace_front(_Args&& __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...); __link_nodes_at_front(__hold.get()->__as_link(), __hold.get()->__as_link()); ++base::__sz(); +#if _LIBCPP_STD_VER > 14 return __hold.release()->__value_; +#else + __hold.release(); +#endif } template <class _Tp, class _Alloc> template <class... _Args> +#if _LIBCPP_STD_VER > 14 typename list<_Tp, _Alloc>::reference +#else +void +#endif list<_Tp, _Alloc>::emplace_back(_Args&&... __args) { __node_allocator& __na = base::__node_alloc(); @@ -1624,7 +1644,11 @@ list<_Tp, _Alloc>::emplace_back(_Args&&. __link_pointer __nl = __hold->__as_link(); __link_nodes_at_back(__nl, __nl); ++base::__sz(); +#if _LIBCPP_STD_VER > 14 return __hold.release()->__value_; +#else + __hold.release(); +#endif } template <class _Tp, class _Alloc> Modified: projects/clang400-import/contrib/libc++/include/queue ============================================================================== --- projects/clang400-import/contrib/libc++/include/queue Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/queue Sun Jan 29 21:56:47 2017 (r312967) @@ -63,7 +63,7 @@ public: void push(const value_type& v); void push(value_type&& v); - template <class... Args> reference emplace(Args&&... args); + template <class... Args> reference emplace(Args&&... args); // reference in C++17 void pop(); void swap(queue& q) noexcept(is_nothrow_swappable_v<Container>) @@ -292,8 +292,13 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template <class... _Args> _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace(_Args&&... __args) { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#else + void emplace(_Args&&... __args) + { c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY Modified: projects/clang400-import/contrib/libc++/include/stack ============================================================================== --- projects/clang400-import/contrib/libc++/include/stack Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/stack Sun Jan 29 21:56:47 2017 (r312967) @@ -55,7 +55,7 @@ public: void push(const value_type& x); void push(value_type&& x); - template <class... Args> reference emplace(Args&&... args); + template <class... Args> reference emplace(Args&&... args); // reference in C++17 void pop(); void swap(stack& c) noexcept(is_nothrow_swappable_v<Container>) @@ -199,8 +199,13 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template <class... _Args> _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace(_Args&&... __args) { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#else + void emplace(_Args&&... __args) + { c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY Modified: projects/clang400-import/contrib/libc++/include/vector ============================================================================== --- projects/clang400-import/contrib/libc++/include/vector Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/libc++/include/vector Sun Jan 29 21:56:47 2017 (r312967) @@ -99,7 +99,7 @@ public: void push_back(const value_type& x); void push_back(value_type&& x); template <class... Args> - reference emplace_back(Args&&... args); + reference emplace_back(Args&&... args); // reference in C++17 void pop_back(); template <class... Args> iterator emplace(const_iterator position, Args&&... args); @@ -218,7 +218,7 @@ public: const_reference back() const; void push_back(const value_type& x); - template <class... Args> reference emplace_back(Args&&... args); // C++14 + template <class... Args> reference emplace_back(Args&&... args); // C++14; reference in C++17 void pop_back(); template <class... Args> iterator emplace(const_iterator position, Args&&... args); // C++14 @@ -679,7 +679,11 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template <class... _Args> _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace_back(_Args&&... __args); +#else + void emplace_back(_Args&&... __args); +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -1625,7 +1629,11 @@ vector<_Tp, _Allocator>::__emplace_back_ template <class _Tp, class _Allocator> template <class... _Args> inline +#if _LIBCPP_STD_VER > 14 typename vector<_Tp, _Allocator>::reference +#else +void +#endif vector<_Tp, _Allocator>::emplace_back(_Args&&... __args) { if (this->__end_ < this->__end_cap()) @@ -1639,7 +1647,9 @@ vector<_Tp, _Allocator>::emplace_back(_A } else __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...); +#if _LIBCPP_STD_VER > 14 return this->back(); +#endif } #endif // _LIBCPP_HAS_NO_VARIADICS @@ -2336,9 +2346,16 @@ public: void push_back(const value_type& __x); #if _LIBCPP_STD_VER > 11 template <class... _Args> - _LIBCPP_INLINE_VISIBILITY reference emplace_back(_Args&&... __args) { +#if _LIBCPP_STD_VER > 14 + _LIBCPP_INLINE_VISIBILITY reference emplace_back(_Args&&... __args) +#else + _LIBCPP_INLINE_VISIBILITY void emplace_back(_Args&&... __args) +#endif + { push_back ( value_type ( _VSTD::forward<_Args>(__args)... )); +#if _LIBCPP_STD_VER > 14 return this->back(); +#endif } #endif Modified: projects/clang400-import/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td Sun Jan 29 21:56:47 2017 (r312967) @@ -100,6 +100,10 @@ def int_amdgcn_dispatch_id : GCCBuiltin<"__builtin_amdgcn_dispatch_id">, Intrinsic<[llvm_i64_ty], [], [IntrNoMem]>; +def int_amdgcn_implicit_buffer_ptr : + GCCBuiltin<"__builtin_amdgcn_implicit_buffer_ptr">, + Intrinsic<[LLVMQualPointerType<llvm_i8_ty, 2>], [], [IntrNoMem]>; + //===----------------------------------------------------------------------===// // Instruction Intrinsics //===----------------------------------------------------------------------===// Modified: projects/clang400-import/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Jan 29 21:56:47 2017 (r312967) @@ -1191,14 +1191,14 @@ AliasResult BasicAAResult::aliasGEP(cons return MayAlias; AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize, - AAMDNodes(), V2, V2Size, V2AAInfo, - nullptr, UnderlyingV2); + AAMDNodes(), V2, MemoryLocation::UnknownSize, + V2AAInfo, nullptr, UnderlyingV2); if (R != MustAlias) // If V2 may alias GEP base pointer, conservatively returns MayAlias. // If V2 is known not to alias GEP base pointer, then the two values - // cannot alias per GEP semantics: "A pointer value formed from a - // getelementptr instruction is associated with the addresses associated - // with the first operand of the getelementptr". + // cannot alias per GEP semantics: "Any memory access must be done through + // a pointer value associated with an address range of the memory access, + // otherwise the behavior is undefined.". return R; // If the max search depth is reached the result is undefined Modified: projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Bitcode/Reader/MetadataLoader.cpp Sun Jan 29 21:56:47 2017 (r312967) @@ -919,7 +919,8 @@ Error MetadataLoader::MetadataLoaderImpl // If this isn't a LocalAsMetadata record, we're dropping it. This used // to be legal, but there's no upgrade path. auto dropRecord = [&] { - MetadataList.assignValue(MDNode::get(Context, None), NextMetadataNo++); + MetadataList.assignValue(MDNode::get(Context, None), NextMetadataNo); + NextMetadataNo++; }; if (Record.size() != 2) { dropRecord(); @@ -934,7 +935,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( LocalAsMetadata::get(ValueList.getValueFwdRef(Record[1], Ty)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_OLD_NODE: { @@ -959,7 +961,8 @@ Error MetadataLoader::MetadataLoaderImpl } else Elts.push_back(nullptr); } - MetadataList.assignValue(MDNode::get(Context, Elts), NextMetadataNo++); + MetadataList.assignValue(MDNode::get(Context, Elts), NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_VALUE: { @@ -972,7 +975,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( ValueAsMetadata::get(ValueList.getValueFwdRef(Record[1], Ty)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_DISTINCT_NODE: @@ -985,7 +989,8 @@ Error MetadataLoader::MetadataLoaderImpl Elts.push_back(getMDOrNull(ID)); MetadataList.assignValue(IsDistinct ? MDNode::getDistinct(Context, Elts) : MDNode::get(Context, Elts), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_LOCATION: { @@ -999,7 +1004,8 @@ Error MetadataLoader::MetadataLoaderImpl Metadata *InlinedAt = getMDOrNull(Record[4]); MetadataList.assignValue( GET_OR_DISTINCT(DILocation, (Context, Line, Column, Scope, InlinedAt)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_GENERIC_DEBUG: { @@ -1019,7 +1025,8 @@ Error MetadataLoader::MetadataLoaderImpl DwarfOps.push_back(getMDOrNull(Record[I])); MetadataList.assignValue( GET_OR_DISTINCT(GenericDINode, (Context, Tag, Header, DwarfOps)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_SUBRANGE: { @@ -1030,7 +1037,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DISubrange, (Context, Record[1], unrotateSign(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_ENUMERATOR: { @@ -1041,7 +1049,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DIEnumerator, (Context, unrotateSign(Record[1]), getMDString(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_BASIC_TYPE: { @@ -1053,7 +1062,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DIBasicType, (Context, Record[1], getMDString(Record[2]), Record[3], Record[4], Record[5])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_DERIVED_TYPE: { @@ -1069,7 +1079,8 @@ Error MetadataLoader::MetadataLoaderImpl getDITypeRefOrNull(Record[5]), getDITypeRefOrNull(Record[6]), Record[7], Record[8], Record[9], Flags, getDITypeRefOrNull(Record[11]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_COMPOSITE_TYPE: { @@ -1134,7 +1145,8 @@ Error MetadataLoader::MetadataLoaderImpl if (!IsNotUsedInTypeRef && Identifier) MetadataList.addTypeRef(*Identifier, *cast<DICompositeType>(CT)); - MetadataList.assignValue(CT, NextMetadataNo++); + MetadataList.assignValue(CT, NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_SUBROUTINE_TYPE: { @@ -1151,7 +1163,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DISubroutineType, (Context, Flags, CC, Types)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } @@ -1165,7 +1178,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, getMDOrNull(Record[1]), getMDString(Record[2]), getMDString(Record[3]), getMDString(Record[4]), getMDString(Record[5]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } @@ -1181,7 +1195,8 @@ Error MetadataLoader::MetadataLoaderImpl Record.size() == 3 ? DIFile::CSK_None : static_cast<DIFile::ChecksumKind>(Record[3]), Record.size() == 3 ? nullptr : getMDString(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_COMPILE_UNIT: { @@ -1200,7 +1215,8 @@ Error MetadataLoader::MetadataLoaderImpl Record.size() <= 14 ? 0 : Record[14], Record.size() <= 16 ? true : Record[16]); - MetadataList.assignValue(CU, NextMetadataNo++); + MetadataList.assignValue(CU, NextMetadataNo); + NextMetadataNo++; // Move the Upgrade the list of subprograms. if (Metadata *SPs = getMDOrNullWithoutPlaceholders(Record[11])) @@ -1247,7 +1263,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[16 + Offset]), // declaration getMDOrNull(Record[17 + Offset]) // variables )); - MetadataList.assignValue(SP, NextMetadataNo++); + MetadataList.assignValue(SP, NextMetadataNo); + NextMetadataNo++; // Upgrade sp->function mapping to function->sp mapping. if (HasFn) { @@ -1272,7 +1289,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DILexicalBlock, (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]), Record[3], Record[4])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_LEXICAL_BLOCK_FILE: { @@ -1284,7 +1302,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DILexicalBlockFile, (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]), Record[3])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_NAMESPACE: { @@ -1298,7 +1317,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]), getMDString(Record[3]), Record[4], ExportSymbols)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_MACRO: { @@ -1310,7 +1330,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DIMacro, (Context, Record[1], Record[2], getMDString(Record[3]), getMDString(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_MACRO_FILE: { @@ -1322,7 +1343,8 @@ Error MetadataLoader::MetadataLoaderImpl GET_OR_DISTINCT(DIMacroFile, (Context, Record[1], Record[2], getMDOrNull(Record[3]), getMDOrNull(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_TEMPLATE_TYPE: { @@ -1333,7 +1355,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue(GET_OR_DISTINCT(DITemplateTypeParameter, (Context, getMDString(Record[1]), getDITypeRefOrNull(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_TEMPLATE_VALUE: { @@ -1346,7 +1369,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, Record[1], getMDString(Record[2]), getDITypeRefOrNull(Record[3]), getMDOrNull(Record[4]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_GLOBAL_VAR: { @@ -1364,7 +1388,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[4]), Record[5], getDITypeRefOrNull(Record[6]), Record[7], Record[8], getMDOrNull(Record[10]), Record[11])), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; } else if (Version == 0) { // Upgrade old metadata, which stored a global variable reference or a // ConstantInt here. @@ -1396,7 +1421,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[10]), AlignInBits)); auto *DGVE = DIGlobalVariableExpression::getDistinct(Context, DGV, Expr); - MetadataList.assignValue(DGVE, NextMetadataNo++); + MetadataList.assignValue(DGVE, NextMetadataNo); + NextMetadataNo++; if (Attach) Attach->addDebugInfo(DGVE); } else @@ -1429,7 +1455,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[3 + HasTag]), Record[4 + HasTag], getDITypeRefOrNull(Record[5 + HasTag]), Record[6 + HasTag], Flags, AlignInBits)), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_EXPRESSION: { @@ -1446,7 +1473,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue( GET_OR_DISTINCT(DIExpression, (Context, makeArrayRef(Record).slice(1))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_GLOBAL_VAR_EXPR: { @@ -1457,7 +1485,8 @@ Error MetadataLoader::MetadataLoaderImpl MetadataList.assignValue(GET_OR_DISTINCT(DIGlobalVariableExpression, (Context, getMDOrNull(Record[1]), getMDOrNull(Record[2]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_OBJC_PROPERTY: { @@ -1471,7 +1500,8 @@ Error MetadataLoader::MetadataLoaderImpl getMDOrNull(Record[2]), Record[3], getMDString(Record[4]), getMDString(Record[5]), Record[6], getDITypeRefOrNull(Record[7]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_IMPORTED_ENTITY: { @@ -1484,7 +1514,8 @@ Error MetadataLoader::MetadataLoaderImpl (Context, Record[1], getMDOrNull(Record[2]), getDITypeRefOrNull(Record[3]), Record[4], getMDString(Record[5]))), - NextMetadataNo++); + NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_STRING_OLD: { @@ -1494,13 +1525,15 @@ Error MetadataLoader::MetadataLoaderImpl HasSeenOldLoopTags |= mayBeOldLoopAttachmentTag(String); ++NumMDStringLoaded; Metadata *MD = MDString::get(Context, String); - MetadataList.assignValue(MD, NextMetadataNo++); + MetadataList.assignValue(MD, NextMetadataNo); + NextMetadataNo++; break; } case bitc::METADATA_STRINGS: { auto CreateNextMDString = [&](StringRef Str) { ++NumMDStringLoaded; - MetadataList.assignValue(MDString::get(Context, Str), NextMetadataNo++); + MetadataList.assignValue(MDString::get(Context, Str), NextMetadataNo); + NextMetadataNo++; }; if (Error Err = parseMetadataStrings(Record, Blob, CreateNextMDString)) return Err; Modified: projects/clang400-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Jan 29 21:56:47 2017 (r312967) @@ -3439,7 +3439,10 @@ SDValue DAGTypeLegalizer::GenWidenVector LD->getPointerInfo().getWithOffset(Offset), MinAlign(Align, Increment), MMOFlags, AAInfo); LdChain.push_back(L.getValue(1)); - if (L->getValueType(0).isVector()) { + if (L->getValueType(0).isVector() && NewVTWidth >= LdWidth) { + // Later code assumes the vector loads produced will be mergeable, so we + // must pad the final entry up to the previous width. Scalars are + // combined separately. SmallVector<SDValue, 16> Loads; Loads.push_back(L); unsigned size = L->getValueSizeInBits(0); Modified: projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64.td ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64.td Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64.td Sun Jan 29 21:56:47 2017 (r312967) @@ -85,9 +85,8 @@ def FeaturePostRAScheduler : SubtargetFe def FeatureSlowMisaligned128Store : SubtargetFeature<"slow-misaligned-128store", "Misaligned128StoreIsSlow", "true", "Misaligned 128 bit stores are slow">; -def FeatureAvoidQuadLdStPairs : SubtargetFeature<"no-quad-ldst-pairs", - "AvoidQuadLdStPairs", "true", - "Do not form quad load/store pair operations">; +def FeatureSlowPaired128 : SubtargetFeature<"slow-paired-128", + "Paired128IsSlow", "true", "Paired 128 bit loads and stores are slow">; def FeatureAlternateSExtLoadCVTF32Pattern : SubtargetFeature< "alternate-sextload-cvt-f32-pattern", "UseAlternateSExtLoadCVTF32Pattern", @@ -222,7 +221,7 @@ def ProcCyclone : SubtargetFeature<"cycl def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1", "Samsung Exynos-M1 processors", - [FeatureAvoidQuadLdStPairs, + [FeatureSlowPaired128, FeatureCRC, FeatureCrypto, FeatureCustomCheapAsMoveHandling, @@ -236,7 +235,7 @@ def ProcExynosM1 : SubtargetFeature<"exy def ProcExynosM2 : SubtargetFeature<"exynosm2", "ARMProcFamily", "ExynosM1", "Samsung Exynos-M2/M3 processors", - [FeatureAvoidQuadLdStPairs, + [FeatureSlowPaired128, FeatureCRC, FeatureCrypto, FeatureCustomCheapAsMoveHandling, Modified: projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp Sun Jan 29 21:56:47 2017 (r312967) @@ -1652,7 +1652,7 @@ bool AArch64InstrInfo::isCandidateToMerg return false; // On some CPUs quad load/store pairs are slower than two single load/stores. - if (Subtarget.avoidQuadLdStPairs()) { + if (Subtarget.isPaired128Slow()) { switch (MI.getOpcode()) { default: break; Modified: projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h Sun Jan 29 21:56:47 2017 (r312967) @@ -79,7 +79,7 @@ protected: bool CustomAsCheapAsMove = false; bool UsePostRAScheduler = false; bool Misaligned128StoreIsSlow = false; - bool AvoidQuadLdStPairs = false; + bool Paired128IsSlow = false; bool UseAlternateSExtLoadCVTF32Pattern = false; bool HasArithmeticBccFusion = false; bool HasArithmeticCbzFusion = false; @@ -189,7 +189,7 @@ public: } bool hasCustomCheapAsMoveHandling() const { return CustomAsCheapAsMove; } bool isMisaligned128StoreSlow() const { return Misaligned128StoreIsSlow; } - bool avoidQuadLdStPairs() const { return AvoidQuadLdStPairs; } + bool isPaired128Slow() const { return Paired128IsSlow; } bool useAlternateSExtLoadCVTF32Pattern() const { return UseAlternateSExtLoadCVTF32Pattern; } Modified: projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td Sun Jan 29 21:56:47 2017 (r312967) @@ -282,6 +282,12 @@ def FeatureEnableSIScheduler : Subtarget "Enable SI Machine Scheduler" >; +// Unless +-flat-for-global is specified, turn on FlatForGlobal for +// all OS-es on VI and newer hardware to avoid assertion failures due +// to missing ADDR64 variants of MUBUF instructions. +// FIXME: moveToVALU should be able to handle converting addr64 MUBUF +// instructions. + def FeatureFlatForGlobal : SubtargetFeature<"flat-for-global", "FlatForGlobal", "true", Modified: projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Sun Jan 29 21:56:47 2017 (r312967) @@ -140,7 +140,7 @@ bool AMDGPUAsmPrinter::isBlockOnlyReacha void AMDGPUAsmPrinter::EmitFunctionBodyStart() { const AMDGPUSubtarget &STM = MF->getSubtarget<AMDGPUSubtarget>(); SIProgramInfo KernelInfo; - if (STM.isAmdCodeObjectV2()) { + if (STM.isAmdCodeObjectV2(*MF)) { getSIProgramInfo(KernelInfo, *MF); EmitAmdKernelCodeT(*MF, KernelInfo); } @@ -149,7 +149,7 @@ void AMDGPUAsmPrinter::EmitFunctionBodyS void AMDGPUAsmPrinter::EmitFunctionEntryLabel() { const SIMachineFunctionInfo *MFI = MF->getInfo<SIMachineFunctionInfo>(); const AMDGPUSubtarget &STM = MF->getSubtarget<AMDGPUSubtarget>(); - if (MFI->isKernel() && STM.isAmdCodeObjectV2()) { + if (MFI->isKernel() && STM.isAmdCodeObjectV2(*MF)) { AMDGPUTargetStreamer *TS = static_cast<AMDGPUTargetStreamer *>(OutStreamer->getTargetStreamer()); SmallString<128> SymbolName; @@ -779,7 +779,7 @@ void AMDGPUAsmPrinter::EmitAmdKernelCode // FIXME: Should use getKernArgSize header.kernarg_segment_byte_size = - STM.getKernArgSegmentSize(MFI->getABIArgOffset()); + STM.getKernArgSegmentSize(MF, MFI->getABIArgOffset()); header.wavefront_sgpr_count = KernelInfo.NumSGPR; header.workitem_vgpr_count = KernelInfo.NumVGPR; header.workitem_private_segment_byte_size = KernelInfo.ScratchSize; Modified: projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp Sun Jan 29 21:56:47 2017 (r312967) @@ -727,14 +727,8 @@ void AMDGPUDAGToDAGISel::SelectDIV_SCALE unsigned Opc = (VT == MVT::f64) ? AMDGPU::V_DIV_SCALE_F64 : AMDGPU::V_DIV_SCALE_F32; - // src0_modifiers, src0, src1_modifiers, src1, src2_modifiers, src2, clamp, - // omod - SDValue Ops[8]; - - SelectVOP3Mods0(N->getOperand(0), Ops[1], Ops[0], Ops[6], Ops[7]); - SelectVOP3Mods(N->getOperand(1), Ops[3], Ops[2]); - SelectVOP3Mods(N->getOperand(2), Ops[5], Ops[4]); - CurDAG->SelectNodeTo(N, Opc, VT, MVT::i1, Ops); + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2) }; + CurDAG->SelectNodeTo(N, Opc, N->getVTList(), Ops); } bool AMDGPUDAGToDAGISel::isDSOffsetLegal(const SDValue &Base, unsigned Offset, Modified: projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Sun Jan 29 20:59:17 2017 (r312966) +++ projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp Sun Jan 29 21:56:47 2017 (r312967) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701292156.v0TLulox000236>