George Rimar [Mon, 17 Oct 2016 10:58:02 +0000 (10:58 +0000)]
Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."
With fix: hex edited the precompiled inputs from another testcases to pass new checks.
Original commit message:
[Object/ELF] - Check that e_shnum is null when e_shoff is.
Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) :
e_shnum
This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero.
Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540
That was the reason of crash in lld on incorrect input file.
Binary reduced using afl-min.
Differential revision: https://reviews.llvm.org/D25090
llvm-svn: 284374
George Rimar [Mon, 17 Oct 2016 10:20:47 +0000 (10:20 +0000)]
Revert r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."
It broke build bot:
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/908/steps/test-stage1-compiler/logs/stdio
llvm-svn: 284373
Vassil Vassilev [Mon, 17 Oct 2016 10:15:25 +0000 (10:15 +0000)]
Do not reset TUScope when we are in incremental processing mode.
Patch by Axel Naumann!
Reviewed by Richard Smith and me.
llvm-svn: 284372
George Rimar [Mon, 17 Oct 2016 10:06:44 +0000 (10:06 +0000)]
[Object/ELF] - Check that e_shnum is null when e_shoff is.
Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) :
e_shnum
This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero.
Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540
That was the reason of crash in lld on incorrect input file.
Binary reduced using afl-min.
Differential revision: https://reviews.llvm.org/D25090
llvm-svn: 284371
Haojian Wu [Mon, 17 Oct 2016 10:05:25 +0000 (10:05 +0000)]
Fix windows buildbot error.
llvm-svn: 284370
George Rimar [Mon, 17 Oct 2016 09:30:06 +0000 (09:30 +0000)]
[Object/ELF] - Do not crash on invalid section index.
If object has wrong (large) string table index and
also incorrect large value for amount of sections in total,
then section index passes the check:
if (Index >= getNumSections())
return object_error::invalid_section_index;
But result pointer then is far after end of file data, what
result in a crash.
Differential revision: https://reviews.llvm.org/D25081
llvm-svn: 284369
Haojian Wu [Mon, 17 Oct 2016 08:33:59 +0000 (08:33 +0000)]
Recommit "[ClangTidy] Add UsingInserter and NamespaceAliaser"
Summary: This adds helper classes to add using declaractions and namespace aliases to function bodies. These help making function calls to deeply nested functions concise (e.g. when calling helpers in a refactoring)
Patch by Julian Bangert!
Reviewers: alexfh, hokein
Subscribers: beanz, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D24997
llvm-svn: 284368
Justin Bogner [Mon, 17 Oct 2016 07:37:11 +0000 (07:37 +0000)]
Support: Drop LLVM_ATTRIBUTE_UNUSED_RESULT
Uses of this have all been updated to use LLVM_NODISCARD, which
matches the C++17 [[nodiscard]] semantics rather than those of GCC's
__attribute__((warn_unused_result)).
llvm-svn: 284367
Justin Bogner [Mon, 17 Oct 2016 06:46:35 +0000 (06:46 +0000)]
AST: Prefer LLVM_NODISCARD to LLVM_ATTRIBUTE_UNUSED_RESULT
llvm-svn: 284366
Craig Topper [Mon, 17 Oct 2016 06:41:18 +0000 (06:41 +0000)]
[X86] Fix shuffle decoding assertions to print the right number of required operands. Update the checks themselves to be >= to the same number instead of > one less than the required number.
llvm-svn: 284365
Justin Bogner [Mon, 17 Oct 2016 06:35:23 +0000 (06:35 +0000)]
ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for StringRef
Instead of annotating (most of) the StringRef API, we can just
annotate the type directly. This is less code and it will warn in more
cases.
llvm-svn: 284364
Justin Bogner [Mon, 17 Oct 2016 06:21:13 +0000 (06:21 +0000)]
ELF: Add a skip() overload to ignore any token
Most functions that return StringRef should check their return values,
so I'm planning on marking StringRef [[nodiscard]]. This requires
splitting up functions like next() that are sometimes just used for
side effects.
llvm-svn: 284363
Justin Bogner [Mon, 17 Oct 2016 06:17:56 +0000 (06:17 +0000)]
Interpreter: Don't return StringRef from functions whose return value is never used
StringRef is passed through all of these APIs but never actually
used. Just remove it from the API for now and if people want to use it
they can add it back.
llvm-svn: 284362
Justin Bogner [Mon, 17 Oct 2016 06:08:48 +0000 (06:08 +0000)]
ELF: Fix a misuse of Twine::toStringRef
While the toStringRef API almost certainly ends up populating the
SmallString here, the correct way to use this API is to use the return
value.
llvm-svn: 284361
NAKAMURA Takumi [Mon, 17 Oct 2016 05:09:58 +0000 (05:09 +0000)]
ClangMoveTests.cpp: Appease msc18.
clang-tools-extra\unittests\clang-move\ClangMoveTests.cpp(216) : error C2593: 'operator =' is ambiguous
llvm\include\llvm/ADT/SmallVector.h(898): could be 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(std::initializer_list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>)'
llvm\include\llvm/ADT/SmallVector.h(893): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(llvm::SmallVectorImpl<T> &&)'
with
[
T=std::string
]
llvm\include\llvm/ADT/SmallVector.h(883): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(llvm::SmallVector<std::string,4> &&)'
llvm\include\llvm/ADT/SmallVector.h(873): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(const llvm::SmallVector<std::string,4> &)'
while trying to match the argument list '(llvm::SmallVector<std::string,4>, initializer-list)'
llvm-svn: 284360
NAKAMURA Takumi [Mon, 17 Oct 2016 05:08:49 +0000 (05:08 +0000)]
Reformat.
llvm-svn: 284359
Craig Topper [Mon, 17 Oct 2016 04:26:47 +0000 (04:26 +0000)]
[AVX-512] Add shuffle combining support for vpermi2var shuffles derived from existing support for vpermt2var.
llvm-svn: 284357
Craig Topper [Mon, 17 Oct 2016 04:26:44 +0000 (04:26 +0000)]
[AVX-512] Add vpermi2var test cases to shuffle combining test case. Combining will be added in a future commit.
llvm-svn: 284356
Justin Lebar [Mon, 17 Oct 2016 02:25:55 +0000 (02:25 +0000)]
[CUDA] Fix false-positive in known-emitted handling.
Previously: When compiling for host, our constructed call graph went
*through* kernel calls. This meant that if we had
host calls kernel calls HD
we would incorrectly mark the HD function as known-emitted on the host
side, and thus perform host-side checks on it.
Fixing this exposed another issue, wherein when marking a function as
known-emitted, we also need to traverse the callgraph of its template,
because non-dependent calls are attached to a function's template, not
its instantiation.
llvm-svn: 284355
Craig Topper [Sun, 16 Oct 2016 23:29:51 +0000 (23:29 +0000)]
[AVX-512] Add support for turning a 256-bit load that goes to both halfs of an insert_subvector into a subvector broadcast.
Differential Revision: https://reviews.llvm.org/D25650
llvm-svn: 284353
NAKAMURA Takumi [Sun, 16 Oct 2016 23:00:18 +0000 (23:00 +0000)]
clang/test/CXX/conv/conv.fctptr/p1.cpp: Appease for targeting i686-win32.
error: 'error' diagnostics seen but not expected:
File clang\test\CXX\conv\conv.fctptr\p1.cpp Line 16: assigning to 'void (S::*)() __attribute__((thiscall)) noexcept' from incompatible type 'void (S::*)() __attribute__((thiscall))': different exception specifications
llvm-svn: 284352
Devin Coughlin [Sun, 16 Oct 2016 22:19:03 +0000 (22:19 +0000)]
Revert "Revert "[analyzer] Make MallocChecker more robust against custom redeclarations""
This reverts commit r284340 to reapply r284335. The bot breakage was due to
an unrelated change in the polybench test suite.
llvm-svn: 284351
Justin Bogner [Sun, 16 Oct 2016 22:09:24 +0000 (22:09 +0000)]
unittests: Explicitly ignore some return values in crash tests
Ideally these would actually check that the results are reasonable,
but given that we're looping over so many different kinds of path that
isn't really practical.
llvm-svn: 284350
Michael Kruse [Sun, 16 Oct 2016 22:05:51 +0000 (22:05 +0000)]
[test] Add missing colon.
llvm-svn: 284349
Justin Bogner [Sun, 16 Oct 2016 22:01:22 +0000 (22:01 +0000)]
Support: Return void from Scanner::scan_ns_uri_char, no one uses the result
Simplify this a little bit since the result is never used. It can be
added back easily enough if that changes.
llvm-svn: 284348
Michael Kruse [Sun, 16 Oct 2016 21:35:57 +0000 (21:35 +0000)]
[cmake] Add polly-isl-test dependency to lit tests.
Also handle the in-llvm-tree case forgotten in r284339.
llvm-svn: 284347
Justin Bogner [Sun, 16 Oct 2016 21:18:26 +0000 (21:18 +0000)]
MachineModuleInfo: Prefer the LLVM_NODISCARD spelling
Update a function annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284346
Justin Bogner [Sun, 16 Oct 2016 21:17:29 +0000 (21:17 +0000)]
SCEV: Prefer the LLVM_NODISCARD spelling
Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284345
Justin Bogner [Sun, 16 Oct 2016 20:56:20 +0000 (20:56 +0000)]
Support: Prefer the LLVM_NODISCARD spelling
Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284344
Justin Bogner [Sun, 16 Oct 2016 20:42:34 +0000 (20:42 +0000)]
ADT: Prefer the LLVM_NODISCARD spelling
Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use
LLVM_NODISCARD instead.
llvm-svn: 284343
Justin Bogner [Sun, 16 Oct 2016 20:30:40 +0000 (20:30 +0000)]
ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for ArrayRef
Instead of annotating (most of) the ArrayRef API, we can just annotate
the type directly. This is less code and it will warn in more cases.
llvm-svn: 284342
Justin Bogner [Sun, 16 Oct 2016 20:12:42 +0000 (20:12 +0000)]
AST: Improve a couple of comments and cast unused values to void
Make these comments a bit more explicit that they're initializing the
RawText member, and explicitly cast the unused result of getRawText to
void for clarity.
llvm-svn: 284341
Devin Coughlin [Sun, 16 Oct 2016 19:26:07 +0000 (19:26 +0000)]
Revert "[analyzer] Make MallocChecker more robust against custom redeclarations"
This reverts commit r284335.
It appears to be causing test-suite compile-time and execution-time
performance measurements to take longer than expected on several bots.
This is surprising, because r284335 is a static-analyzer-only change.
llvm-svn: 284340
Michael Kruse [Sun, 16 Oct 2016 18:22:02 +0000 (18:22 +0000)]
[cmake] Add polly-isl-test dependency to lit tests.
lit recursively iterates through the test subdirectories and finds the ISL
unittest. For this test to work, the polly-isl-test executable needs to be
compiled.
Add the polly-isl-test dependency to POLLY_TEST_DEPS. This makes check-polly and
check-polly-tests work from a fresh build directory.
llvm-svn: 284339
Michael Kruse [Sun, 16 Oct 2016 18:13:01 +0000 (18:13 +0000)]
[test] Add -polly-unprofitable-scalar-accs to test that needs it.
The test non_affine_loop_used_later.ll also tests the profability heuristic. Add
the option -polly-unprofitable-scalar-accs explicitely to ensure that the test
succeeds if the default value is changed.
llvm-svn: 284338
Richard Smith [Sun, 16 Oct 2016 17:54:23 +0000 (17:54 +0000)]
P0012R1: Make exception specifications be part of the type system. This
implements the bulk of the change (modifying the type system to include
exception specifications), but not all the details just yet.
llvm-svn: 284337
Richard Smith [Sun, 16 Oct 2016 17:49:09 +0000 (17:49 +0000)]
PR30711: Fix incorrect profiling of 'long long' in FoldingSet, then use it to
fix TBAA violation in profiling of pointers.
llvm-svn: 284336
Devin Coughlin [Sun, 16 Oct 2016 17:26:06 +0000 (17:26 +0000)]
[analyzer] Make MallocChecker more robust against custom redeclarations
Add additional checking to MallocChecker to avoid crashing when memory
routines have unexpected numbers of arguments. You wouldn't expect to see much
of this in normal code (-Wincompatible-library-redeclaration warns on this),
but, for example, CMake tests can generate these.
This is PR30616.
rdar://problem/
28631974
llvm-svn: 284335
Eric Fiselier [Sun, 16 Oct 2016 11:56:38 +0000 (11:56 +0000)]
Make any_cast<void()>(nullptr) compile
llvm-svn: 284333
Malcolm Parsons [Sun, 16 Oct 2016 09:47:10 +0000 (09:47 +0000)]
[clang-tidy] Use ignoreImplicit in cert-err58-cpp check
Summary:
Fix a false negative in cert-err58-cpp check when calling a constructor
creates objects that require cleanup.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25642
llvm-svn: 284332
Richard Smith [Sun, 16 Oct 2016 06:23:29 +0000 (06:23 +0000)]
Extend this test and make it a bit clearer which cases Clang is getting wrong.
llvm-svn: 284331
Craig Topper [Sun, 16 Oct 2016 04:54:35 +0000 (04:54 +0000)]
[AVX-512] Fix the operand order for vpermi2var_qi intrinsics to match the other vpermi2var intrinsics.
llvm-svn: 284329
Craig Topper [Sun, 16 Oct 2016 04:54:31 +0000 (04:54 +0000)]
[AVX-512] Correct execution domain for VPERMT2PS and VPERMI2PS.
llvm-svn: 284328
Craig Topper [Sun, 16 Oct 2016 04:54:26 +0000 (04:54 +0000)]
[AVX-512] Move (v4i64 (X86SubVBroadcast (v2i64))) alternate patterns under a HasVLX predicate. Similar for floating point.
llvm-svn: 284327
Eric Fiselier [Sun, 16 Oct 2016 03:52:48 +0000 (03:52 +0000)]
Update LWG 2754 status
llvm-svn: 284326
Eric Fiselier [Sun, 16 Oct 2016 03:49:18 +0000 (03:49 +0000)]
Fix use of non-constexpr C++14 addressof
llvm-svn: 284325
Eric Fiselier [Sun, 16 Oct 2016 03:45:06 +0000 (03:45 +0000)]
Update LWG 2767 and add test case
llvm-svn: 284324
Eric Fiselier [Sun, 16 Oct 2016 03:21:35 +0000 (03:21 +0000)]
Update status for std::optional LWG issues and fix an optional SFINAE bug
llvm-svn: 284323
Eric Fiselier [Sun, 16 Oct 2016 02:51:50 +0000 (02:51 +0000)]
Update issue status for LWG 2744
llvm-svn: 284322
Eric Fiselier [Sun, 16 Oct 2016 01:43:43 +0000 (01:43 +0000)]
Update issue status for LWG 2768 and 2769
llvm-svn: 284321
Davide Italiano [Sun, 16 Oct 2016 01:09:39 +0000 (01:09 +0000)]
[ArmFastISel] Kill dead code. NFCI.
llvm-svn: 284320
Eric Fiselier [Sun, 16 Oct 2016 00:49:33 +0000 (00:49 +0000)]
Update notes for LWG 2678
llvm-svn: 284319
Eric Fiselier [Sun, 16 Oct 2016 00:47:59 +0000 (00:47 +0000)]
Implement LWG 2712 and update other issues status
llvm-svn: 284318
Devin Coughlin [Sun, 16 Oct 2016 00:30:08 +0000 (00:30 +0000)]
Revert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker""
Revert:
r283662: [analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"
r283660: [analyzer] Fix build error after r283660 - remove constexpr strings.
It was causing an internal build bot to fail. It looks like in some cases
adding an extra note can cause scan-build plist output to drop a diagnostic
altogether.
llvm-svn: 284317
Eric Fiselier [Sun, 16 Oct 2016 00:29:22 +0000 (00:29 +0000)]
Implement LWG 2681 and 2682
llvm-svn: 284316
Eric Fiselier [Sat, 15 Oct 2016 23:12:30 +0000 (23:12 +0000)]
Mark LWG 2680 as done
llvm-svn: 284315
Eric Fiselier [Sat, 15 Oct 2016 23:05:04 +0000 (23:05 +0000)]
Implement LWG 2672.
llvm-svn: 284314
Eric Fiselier [Sat, 15 Oct 2016 22:37:42 +0000 (22:37 +0000)]
Implement modified LWG 2665
llvm-svn: 284313
Konstantin Zhuravlyov [Sat, 15 Oct 2016 22:01:18 +0000 (22:01 +0000)]
[MachineMemOperand] Move synchronization scope and atomic orderings from SDNode to MachineMemOperand, and remove redundant getAtomic* member functions from SelectionDAG.
Differential Revision: https://reviews.llvm.org/D24577
llvm-svn: 284312
Davide Italiano [Sat, 15 Oct 2016 21:35:23 +0000 (21:35 +0000)]
[GVN/PRE] Hoist global values outside of loops.
In theory this could be generalized to move anything where
we prove the operands are available, but that would require
rewriting PRE. As NewGVN will hopefully come soon, and we're
trying to rewrite PRE in terms of NewGVN+MemorySSA, it's probably
not worth spending too much time on it. Fix provided by
Daniel Berlin!
llvm-svn: 284311
Eric Fiselier [Sat, 15 Oct 2016 21:29:44 +0000 (21:29 +0000)]
Implement LWG2664 and update its status
llvm-svn: 284310
Eric Fiselier [Sat, 15 Oct 2016 20:58:51 +0000 (20:58 +0000)]
Update the status of issues
llvm-svn: 284309
Simon Pilgrim [Sat, 15 Oct 2016 19:29:26 +0000 (19:29 +0000)]
[X86][SSE] Added some basic examples of knownbits failing for vector types
computeKnownBits only returns the common bits of each vector element instead of only the elements that are actually used
llvm-svn: 284308
Li Huang [Sat, 15 Oct 2016 19:00:04 +0000 (19:00 +0000)]
Test commit. (NFC)
llvm-svn: 284307
Simon Pilgrim [Sat, 15 Oct 2016 18:56:38 +0000 (18:56 +0000)]
[X86] Regenerate known bits test
llvm-svn: 284306
Craig Topper [Sat, 15 Oct 2016 16:26:07 +0000 (16:26 +0000)]
[AVX-512] Add shuffle comments for vbroadcast instructions.
llvm-svn: 284305
Craig Topper [Sat, 15 Oct 2016 16:26:02 +0000 (16:26 +0000)]
[AVX-512] Rename VPBROADCASTI32X2 and VPBROADCASTF32X2 instruction classes to match the mnemonic which does not include a 'P'.
llvm-svn: 284304
Benjamin Kramer [Sat, 15 Oct 2016 13:15:05 +0000 (13:15 +0000)]
[SimplifyCFG] Use the error checking provided by getPrevNode.
BasicBlock::size is O(insts), making this loop O(blocks*insts), which
can be really slow on generated code. getPrevNode already checks if
we're at the beginning of the block and returns nullptr if so, just use
that instead. No functionality change intended.
llvm-svn: 284303
Tobias Grosser [Sat, 15 Oct 2016 05:08:12 +0000 (05:08 +0000)]
cmake: avoid "zero-length gnu_printf format string" warning in gcc 6.1.1
Contributed-by: Andy Gibbs <andyg1001@hotmail.co.uk>
llvm-svn: 284302
Kostya Serebryany [Sat, 15 Oct 2016 04:00:07 +0000 (04:00 +0000)]
[libFuzzer] swap bytes in integers when handling CMP traces
llvm-svn: 284301
Richard Smith [Sat, 15 Oct 2016 01:59:52 +0000 (01:59 +0000)]
Disable a silly GCC diagnostic for combining a scanf length specifier with the
'*' specifier. Apparently the GNU folks want to discourage self-documenting
code.
llvm-svn: 284300
Kostya Serebryany [Sat, 15 Oct 2016 01:00:24 +0000 (01:00 +0000)]
[libFuzzer] better algorithm for -minimize_crash
llvm-svn: 284299
Tom Stellard [Sat, 15 Oct 2016 00:58:14 +0000 (00:58 +0000)]
AMDGPU/SI: Handle s_getreg hazard in GCNHazardRecognizer
Reviewers: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye
Differential Revision: https://reviews.llvm.org/D25526
llvm-svn: 284298
Justin Bogner [Sat, 15 Oct 2016 00:22:06 +0000 (00:22 +0000)]
ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for APInt
Instead of annotating (most of) the APInt API, we can just annotate
the type directly. This is less code and it will warn in more cases.
llvm-svn: 284297
Jim Ingham [Sat, 15 Oct 2016 00:04:38 +0000 (00:04 +0000)]
This test is no longer failing for gmodules.
llvm-svn: 284296
Vitaly Buka [Sat, 15 Oct 2016 00:02:20 +0000 (00:02 +0000)]
Fix typo in comment
llvm-svn: 284295
Vitaly Buka [Fri, 14 Oct 2016 23:51:41 +0000 (23:51 +0000)]
Don't compile cxa_thread_atexit.cpp with -DLIBCXX_ENABLE_THREADS=OFF
Reviewers: rmaprath
Subscribers: beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25636
llvm-svn: 284294
Vedant Kumar [Fri, 14 Oct 2016 23:38:16 +0000 (23:38 +0000)]
[Coverage] Support for C++17 if initializers
Differential Revision: https://reviews.llvm.org/D25572
llvm-svn: 284293
Vedant Kumar [Fri, 14 Oct 2016 23:38:13 +0000 (23:38 +0000)]
[Coverage] Support for C++17 switch initializers
Differential Revision: https://reviews.llvm.org/D25539
llvm-svn: 284292
Alexander Shaposhnikov [Fri, 14 Oct 2016 23:16:25 +0000 (23:16 +0000)]
[clang-move] Use cl::list for the list of names
This diff replaces manual parsing of the comma-separated list of names with
cl::list and cl::CommaSeparated.
Test plan: make -j8 check-clang-tools
Differential revision: https://reviews.llvm.org/D25586
llvm-svn: 284291
Evgeny Astigeevich [Fri, 14 Oct 2016 23:00:36 +0000 (23:00 +0000)]
[NFC] Loop Versioning for LICM code clean up
- Removed unused class members.
- Made class internal data private.
- Made class scoped data function scoped where it's possible.
- Replace naked new/delete with unique_ptr.
- Made resources guaranteed to be freed.
Differential Revision: https://reviews.llvm.org/D25464
llvm-svn: 284290
Eric Fiselier [Fri, 14 Oct 2016 22:47:08 +0000 (22:47 +0000)]
Prevent new/delete replacement tests from being optimized away.
llvm-svn: 284289
Saleem Abdulrasool [Fri, 14 Oct 2016 22:25:46 +0000 (22:25 +0000)]
Sema: honour dllexport in itanium more faithfully
Although the itanium environment uses the itanium layout for C++, treat the
dllexport semantics more similarly to the MSVC specification. This preserves
the existing behaviour for the use of the itanium ABI on non-windows-itanium
environments. Export the inline definitions too.
llvm-svn: 284288
Tim Northover [Fri, 14 Oct 2016 22:18:18 +0000 (22:18 +0000)]
GlobalISel: rename legalizer components to match others.
The previous names were both misleading (the MachineLegalizer actually
contained the info tables) and inconsistent with the selector & translator (in
having a "Machine") prefix. This should make everything sensible again.
The only functional change is the name of a couple of command-line options.
llvm-svn: 284287
Justin Bogner [Fri, 14 Oct 2016 22:04:17 +0000 (22:04 +0000)]
Support: Add LLVM_NODISCARD with C++17's [[nodiscard]] semantics
This is essentially a more powerful version of our current
LLVM_ATTRIBUTE_UNUSED_RESULT, in that it can also be applied to types
and generate warnings whenever an object of that type is returned by
value and the value is discarded.
I'll replace uses of LLVM_ATTRIBUTE_UNUSED_RESULT and remove that
macro in follow up commits.
llvm-svn: 284286
Arnold Schwaighofer [Fri, 14 Oct 2016 21:55:56 +0000 (21:55 +0000)]
Add more swift calling convention tests
llvm-svn: 284285
Richard Smith [Fri, 14 Oct 2016 21:41:24 +0000 (21:41 +0000)]
Reinstate r284008 reverted in r284081, with two fixes:
1) Merge and demote variable definitions when we find a redefinition in
MergeVarDecls, not only when we find one in AddInitializerToDecl (we only reach
the second case if it's the addition of the initializer itself that converts an
existing declaration into a definition).
2) When rebuilding a redeclaration chain for a variable, if we merge two
definitions together, mark the definitions as merged so the retained definition
is made visible whenever the demoted definition would have been.
Original commit message (from r283882):
[modules] PR28752: Do not instantiate variable declarations which are not visible.
Original patch by Vassil Vassilev! Changes listed above are mine.
llvm-svn: 284284
Mehdi Amini [Fri, 14 Oct 2016 21:32:35 +0000 (21:32 +0000)]
hardware_physical_concurrency() should return 1 when LLVM is built with LLVM_ENABLE_THREADS=OFF
llvm-svn: 284283
Eric Fiselier [Fri, 14 Oct 2016 21:30:35 +0000 (21:30 +0000)]
Clarify XFAIL comments
llvm-svn: 284282
Tim Northover [Fri, 14 Oct 2016 21:25:29 +0000 (21:25 +0000)]
PowerPC: specify full triple to avoid different Darwin asm syntax.
llvm-svn: 284281
Sanjay Patel [Fri, 14 Oct 2016 20:52:43 +0000 (20:52 +0000)]
[ARM] add tests for PR30660
llvm-svn: 284280
Sanjay Patel [Fri, 14 Oct 2016 20:51:41 +0000 (20:51 +0000)]
[PowerPC] add tests for PR30661
llvm-svn: 284279
David L Kreitzer [Fri, 14 Oct 2016 20:44:33 +0000 (20:44 +0000)]
Define Contiki OS toolchain
Patch by Michael LeMay
Differential revision: http://reviews.llvm.org/D19854
llvm-svn: 284278
David Sheinkman [Fri, 14 Oct 2016 20:43:37 +0000 (20:43 +0000)]
__builtin_fpclassify missing one int parameter
Patch by Tania Albarghouthi.
Differential Revision: https://reviews.llvm.org/D25480
llvm-svn: 284277
Guozhi Wei [Fri, 14 Oct 2016 20:41:50 +0000 (20:41 +0000)]
[PPC] Shorter sequence to load 64bit constant with same hi/lo words
This is a patch to implement pr30640.
When a 64bit constant has the same hi/lo words, we can use rldimi to copy the low word into high word of the same register.
This optimization caused failure of test case bperm.ll because of not optimal heuristic in function SelectAndParts64. It chooses AND or ROTATE to extract bit groups from a register, and OR them together. This optimization lowers the cost of loading 64bit constant mask used in AND method, and causes different code sequence. But actually ROTATE method is better in this test case. The reason is in ROTATE method the final OR operation can be avoided since rldimi can insert the rotated bits into target register directly. So this patch also enhances SelectAndParts64 to prefer ROTATE method when the two methods have same cost and there are multiple bit groups need to be ORed together.
Differential Revision: https://reviews.llvm.org/D25521
llvm-svn: 284276
Kostya Serebryany [Fri, 14 Oct 2016 20:26:40 +0000 (20:26 +0000)]
[libFuzzer] remove subdir fuzzer-test-suite as it is now superseded with https://github.com/google/fuzzer-test-suite
llvm-svn: 284275
Kostya Serebryany [Fri, 14 Oct 2016 20:20:33 +0000 (20:20 +0000)]
[libFuzzer] add -trace_cmp=1 (guiding mutations based on the observed CMP instructions). This is a reincarnation of the previously deleted -use_traces, but using a different approach for collecting traces. Still a toy, but at least it scales well. Also fix -merge in trace-pc-guard mode
llvm-svn: 284273
Douglas Katzman [Fri, 14 Oct 2016 19:55:09 +0000 (19:55 +0000)]
Implement no_sanitize_address for global vars
llvm-svn: 284272
Richard Smith [Fri, 14 Oct 2016 19:51:36 +0000 (19:51 +0000)]
[linux] When pre-reserving stack pages to work around broken address space
layout for PIE binaries, ask the OS how much stack space is already in use to
avoid stack overflow if we are run with more than 512K of combined command line
arguments + environment variables.
llvm-svn: 284271
Saleem Abdulrasool [Fri, 14 Oct 2016 19:48:34 +0000 (19:48 +0000)]
vim: add `norecurse` attribute
Add missing attribute to the keyword set.
llvm-svn: 284270