summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Marked test_qRegisterInfo_returns_{one_valid_result,all_valid_results} XFAIL ↵Todd Fiala2015-11-111-0/+2
| | | | | | | | | on Darwin. Tracked by: https://llvm.org/bugs/show_bug.cgi?id=25486 llvm-svn: 252707
* [FIX] Cast pre-loaded values correctly or reload them with adjusted type.Johannes Doerfert2015-11-117-22/+113
| | | | | | | | | | | | | Especially for structs, the SAI object of a base pointer does not describe all the types that the user might expect when he loads from that base pointer. While we will still cast integers and pointers we will now reload the value with the correct type if floating point and non-floating point values are involved. However, there are now TODOs where we use bitcasts instead of a proper conversion or reloading. This fixes bug 25479. llvm-svn: 252706
* [libFuzzer] better links Kostya Serebryany2015-11-111-3/+3
| | | | llvm-svn: 252705
* [libFuzzer] more trophiesKostya Serebryany2015-11-111-20/+4
| | | | llvm-svn: 252704
* Bump up test timeout interval on Darwin from 4 to 6 minutes.Todd Fiala2015-11-111-0/+3
| | | | | | | We have several tests that TIMEOUT under heavy load but just need a bit more time to complete. llvm-svn: 252703
* Mark TestCompletion.py test_symbol_name_dwarf XFAIL on Darwin.Todd Fiala2015-11-111-0/+1
| | | | | | | | | | This test fails most of the time when run under heavy load. The dsym variant doesn't seem to be failing. Tracking XFAIL marker with: https://llvm.org/bugs/show_bug.cgi?id=25485 llvm-svn: 252702
* [FIX] Create empty invariant equivalence classesJohannes Doerfert2015-11-114-14/+145
| | | | | | | | | | | We now create all invariant equivalence classes for required invariant loads instead of creating them on-demand. This way we can check if a parameter references an invariant load that is actually not executed and was therefor not materialized. If that happens the parameter is not materialized either. This fixes bug 25469. llvm-svn: 252701
* [X86] Add missing typecasts in intrinsic macros. This should make them more ↵Craig Topper2015-11-117-55/+85
| | | | | | robust against inputs that aren't already the right type. llvm-svn: 252700
* Mark TestTerminal.py as XFAIL on OS X.Todd Fiala2015-11-111-0/+1
| | | | | | | See the following tracking bug: https://llvm.org/bugs/show_bug.cgi?id=25484 llvm-svn: 252699
* lit: Show all output with --show-all, even in combination with --succinctMatthias Braun2015-11-111-0/+1
| | | | | | | I missed an earlier exit for the --succinct case when I introduced the -a option. llvm-svn: 252698
* [X86] Change pointer type in AVX2 gather builtins to be the scalar type ↵Craig Topper2015-11-112-177/+135
| | | | | | instead of the vector type. This matches gcc and removes extras casts. llvm-svn: 252697
* Implement `internal_start/join_thread` on Mac OS XIsmail Pazarbasi2015-11-111-2/+12
| | | | | | | | | | | | | | Summary: Depends on D9637 Test Plan: Reviewers: kcc, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9638 llvm-svn: 252696
* [tsan] Pass correct interposed function prefix to report functionIsmail Pazarbasi2015-11-111-1/+7
| | | | | | | | | | | | | | Summary: On Darwin, interposed functions are prefixed with "wrap_". On Linux, they are prefixed with "__interceptor_". Reviewers: dvyukov, samsonov, glider, kcc, kubabrecka Subscribers: zaks.anna, llvm-commits Differential Revision: http://reviews.llvm.org/D14512 llvm-svn: 252695
* ADT: Avoid relying on UB in ilist_node::getNextNode()Duncan P. N. Exon Smith2015-11-1110-51/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-implement `ilist_node::getNextNode()` and `getPrevNode()` without relying on the sentinel having a "next" pointer. Instead, get access to the owning list and compare against the `begin()` and `end()` iterators. This only works when the node *can* get access to the owning list. The new support is in `ilist_node_with_parent<>`, and any class `Ty` inheriting from `ilist_node<NodeTy>` that wants `getNextNode()` and/or `getPrevNode()` should inherit from `ilist_node_with_parent<NodeTy, ParentTy>` instead. The requirements: - `NodeTy` must have a `getParent()` function that returns the parent. - `ParentTy` must have a `getSublistAccess()` static that, given a(n ignored) `NodeTy*` (to determine which list), returns a member field pointer to the appropriate `ilist<>`. This isn't the cleanest way to get access to the owning list, but it leverages the API already used in the IR hierarchy (see, e.g., `Instruction::getSublistAccess()`). If anyone feels like ripping out the calls to `getNextNode()` and `getPrevNode()` and replacing with direct iterator logic, they can also remove the access function, etc., but as an incremental step, I'm maintaining the API where it's currently used in tree. If these requirements are *not* met, call sites with access to the ilist can call `iplist<NodeTy>::getNextNode(NodeTy*)` directly, as in ilistTest.cpp. Why rewrite this? The old code was broken, calling `getNext()` on a sentinel that possibly didn't have a "next" pointer at all! The new code avoids that particular flavour of UB (see the commit message for r252538 for more details about the "lucky" memory layout that made this function so interesting). There's still some UB here: the end iterator gets downcast to `NodeTy*`, even when it's a sentinel (which is typically `ilist_half_node<NodeTy*>`). I'll tackle that in follow-up commits. See this llvm-dev thread for more details: http://lists.llvm.org/pipermail/llvm-dev/2015-October/091115.html What's the danger? There might be some code that relies on `getNextNode()` or `getPrevNode()` *never* returning `nullptr` -- i.e., that relies on them being broken when the sentinel is an `ilist_half_node<NodeTy>`. I tried to root out those cases with the audits I did leading up to r252380, but it's possible I missed one or two. I hope not. (If (1) you have out-of-tree code, (2) you've reverted r252380 temporarily, and (3) you get some weird crashes with this commit, then I recommend un-reverting r252380 and auditing the compile errors looking for "strange" implicit conversions.) llvm-svn: 252694
* Reorder the check strings in test case following r252692.Akira Hatanaka2015-11-111-1/+1
| | | | | | rdar://problem/19836465 llvm-svn: 252693
* Sort the enums in Attributes.h in case insensitive alphabetical order.Akira Hatanaka2015-11-119-23/+23
| | | | | | | | | Sort the enums in preparation for moving the attributes to a table-gen file. rdar://problem/19836465 llvm-svn: 252692
* Fix a FIXME about using std::is_sorted.Eric Christopher2015-11-111-3/+4
| | | | llvm-svn: 252691
* Add support for GCC's '__auto_type' extension, per the GCC manual:Richard Smith2015-11-1133-93/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | https://gcc.gnu.org/onlinedocs/gcc/Typeof.html Differences from the GCC extension: * __auto_type is also permitted in C++ (but only in places where it could appear in C), allowing its use in headers that might be shared across C and C++, or used from C++98 * __auto_type can be combined with a declarator, as with C++ auto (for instance, "__auto_type *p") * multiple variables can be declared in a single __auto_type declaration, with the C++ semantics (the deduced type must be the same in each case) This patch also adds a missing restriction on applying typeof to a bit-field, which GCC has historically rejected in C (due to lack of clarity as to whether the operand should be promoted). The same restriction also applies to __auto_type in C (in both GCC and Clang). This also fixes PR25449. Patch by Nicholas Allegra! llvm-svn: 252690
* Disabling sancov.cc on windows.Mike Aizatsky2015-11-111-2/+4
| | | | | | | | | It can't be built due to cxxabi missing. Will fix later. Differential Revision: http://reviews.llvm.org/D14559 llvm-svn: 252689
* N3922: direct-list-initialization of an auto-typed variable no longer deduces aRichard Smith2015-11-1116-203/+247
| | | | | | | | | | | | | | | | | | | std::initializer_list<T> type. Instead, the list must contain a single element and the type is deduced from that. In Clang 3.7, we warned by default on all the cases that would change meaning due to this change. In Clang 3.8, we will support only the new rules -- per the request in N3922, this change is applied as a Defect Report against earlier versions of the C++ standard. This change is not entirely trivial, because for lambda init-captures we previously did not track the difference between direct-list-initialization and copy-list-initialization. The difference was not previously observable, because the two forms of initialization always did the same thing (the elements of the initializer list were always copy-initialized regardless of the initialization style used for the init-capture). llvm-svn: 252688
* [WebAssembly] Support non-legal argument and return types.Dan Gohman2015-11-114-84/+141
| | | | llvm-svn: 252687
* [elf2] Add support for local TLS symbols.Michael J. Spencer2015-11-112-4/+7
| | | | llvm-svn: 252686
* [elf2][x86-64] Add support for DTPOFF64Michael J. Spencer2015-11-112-0/+7
| | | | llvm-svn: 252685
* [elf2][x86-64] Add support for DTPOFF32Michael J. Spencer2015-11-112-0/+12
| | | | llvm-svn: 252684
* Sancov in C++.Mike Aizatsky2015-11-112-0/+286
| | | | | | | | | | Summary: First batch of sancov.py rewrite in C++. Supports "-print" and "-covered_functions" commands. Differential Revision: http://reviews.llvm.org/D14356 llvm-svn: 252683
* [elf2] Add support for R_X86_64_TLSLD.Michael J. Spencer2015-11-117-3/+96
| | | | | | | | | | | | | | | leaq symbol@tlsld(%rip), %rdi call __tls_get_addr@plt symbol@tlsld (R_X86_64_TLSLD) instructs the linker to generate a tls_index entry (two GOT slots) in the GOT for the entire module (shared object or executable) with an offset of 0. The symbol for this GOT entry doesn't matter (as long as it's either local to the module or null), and gold doesn't put a symbol in the dynamic R_X86_64_DTPMOD64 relocation for the GOT entry. All other platforms defined in http://www.akkadia.org/drepper/tls.pdf except for Itanium use a similar model where global and local dynamic GOT entries take up 2 contiguous GOT slots, so we can handle this in a unified manner if we don't care about Itanium. While scanning relocations we need to identify local dynamic relocations and generate a single tls_index entry in the GOT for the module and store the address of it somewhere so we can later statically resolve the offset for R_X86_64_TLSLD relocations. We also need to generate a R_X86_64_DTPMOD64 relocation in the RelaDyn relocation section. This implementation is a bit hacky. It side steps the issue of GotSection and RelocationSection only handling SymbolBody entries by relying on a specific relocation type. The alternative to this seemed to be completely rewriting how GotSection and RelocationSection work, or using a different hacky signaling method. llvm-svn: 252682
* [MC] Use LShr for constant evaluation of ">>" on non-arm64 darwin.Ahmed Bougacha2015-11-115-15/+4
| | | | | | | Follow-up to r235963: this matches other assemblers and is less unexpected (e.g. PR23227). llvm-svn: 252681
* [static analyzer] Don't flag nil storage into NSMutableDictionary.Anna Zaks2015-11-112-4/+2
| | | | | | This is now allowed and has the behavior of removing the mapping. llvm-svn: 252679
* MachineInstr: addRegisterDefReadUndef() => setRegisterDefReadUndef()Matthias Braun2015-11-113-4/+4
| | | | | | This way we can not only add but also remove read undef flags. llvm-svn: 252678
* AMDGPU: Print more fields in commentsMatt Arsenault2015-11-111-3/+14
| | | | llvm-svn: 252677
* [ValueTracking] Remove untested / unreachable code, NFCSanjoy Das2015-11-111-18/+5
| | | | | | | | Right now isTruePredicate is only ever called with Pred == ICMP_SLE or ICMP_ULE, and the ICMP_SLT and ICMP_ULT cases are dead. This change removes the untested dead code so that the function is not misleading. llvm-svn: 252676
* AMDGPU: Remove dead codeMatt Arsenault2015-11-111-33/+2
| | | | llvm-svn: 252675
* AMDGPU: Set isAllocatable = 0 on VS_32/VS_64Matt Arsenault2015-11-115-19/+9
| | | | llvm-svn: 252674
* [ValueTracking] Teach isImpliedCondition a new bitwise trickSanjoy Das2015-11-102-0/+108
| | | | | | | | | | | | | | | | | | | Summary: This change teaches isImpliedCondition to prove things like (A | 15) < L ==> (A | 14) < L if the low 4 bits of A are known to be zero. Depends on D14391 Reviewers: majnemer, reames, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14392 llvm-svn: 252673
* [ValueTracking] Use m_APInt instead of m_ConstantInt, NFCSanjoy Das2015-11-101-7/+8
| | | | | | | | This change would add functionality if isImpliedCondition worked on vector types; but since it bail out on vector predicates this change is an NFC. llvm-svn: 252672
* TableGen: Emit LaneMask for register classes without subregisters as ~0uMatthias Braun2015-11-102-10/+19
| | | | | | | This makes it slightly easier to handle classes with and without subregister uniformly. llvm-svn: 252671
* [WinEH] Insert the MBB for EH_RESTORE after the catchretReid Kleckner2015-11-102-1/+47
| | | | | | | Inserting it before the target block could be bad, we might already have a fallthrough edge to it. llvm-svn: 252670
* [cmake] move SONAME handling to llvm_add_libraryAndrew Wilkins2015-11-101-14/+19
| | | | | | | | | | | | | | | | | | | | Summary: Move handling of the SONAME option from add_llvm_library to llvm_add_library, so that it can be used in sub-projects. In particular, this makes it possible to have consistently named shared libraries for LLVM, Clang and LLDB. Also, base the SONAME and symlinks on the output name by extracting the OUTPUT_NAME property, rather than assuming it is the same as the target name. Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14539 llvm-svn: 252669
* Define __unsafe_unretained and __autoreleasing in ObjC GC mode.John McCall2015-11-102-0/+6
| | | | | | This was an accidental regression from the MRC __weak patch. llvm-svn: 252668
* Fix buildJonathan Roelofs2015-11-101-1/+1
| | | | llvm-svn: 252667
* don't repeat function/class/variable names in comments; NFCSanjay Patel2015-11-101-143/+127
| | | | llvm-svn: 252666
* Made the ClangASTImporter into a shared pointer, eliminating a race condition.Sean Callanan2015-11-107-63/+60
| | | | | | | | | | | | | | | It used to be a unique pointer, and there could be a case where ClangASTSource held onto a copy of the pointer but Target::Destroy destroyed the unique pointer in the mean time. I also ensured that there is a validity check on the target (which confirms that a ClangASTImporter can be generated) before the target's shared pointer is copied into ClangASTSource. This race condition caused a crash if Target::Destroy was called and then later the target objecct was deleted. llvm-svn: 252665
* Implement post-commit review feedback on r252662Jonathan Roelofs2015-11-102-10/+8
| | | | llvm-svn: 252664
* Introduce a way for Languages to specify whether values of "reference types" ↵Enrico Granata2015-11-108-185/+253
| | | | | | | | | | are "nil" (not pointing to anything) or uninitialized (never made to point at anything) This latter determination may or may not be possible on a per-language basis; and neither is mandatory to implement for any language Use this knowledge in the ValueObjectPrinter to generalize the notion of IsObjCNil() and the respective printout llvm-svn: 252663
* Implement the fix that r252641 should have beenJonathan Roelofs2015-11-102-15/+24
| | | | llvm-svn: 252662
* Fix Clang-tidy modernize-use-auto warnings, other minor fixes.Eugene Zelenko2015-11-1013-109/+53
| | | | | | Differential revision: http://reviews.llvm.org/D14553 llvm-svn: 252661
* [doc] Compile CUDA with LLVMJingyue Wu2015-11-102-0/+196
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds documentation on compiling CUDA with LLVM as requested by many engineers and researchers. It includes not only user guides but also some internals (mostly optimizations) so that early adopters can start hacking and contributing. Quite a few researchers who contacted us haven't used LLVM before, which is unsurprising as it hasn't been long since LLVM picked up CUDA. So I added a short summary to help these folks get started with LLVM. I expect this document to evolve substantially down the road. The user guides will be much simplified after the Clang integration is done. However, the internals should continue growing to include for example performance debugging and key areas to improve. Reviewers: chandlerc, meheff, broune, tra Subscribers: silvas, jingyue, llvm-commits, eliben Differential Revision: http://reviews.llvm.org/D14370 llvm-svn: 252660
* [COFF] Don't try to emit weak aliases on COFFReid Kleckner2015-11-102-5/+26
| | | | | | | | | | | | | | | | | This comes up when a derived class destructor is equivalent to a base class destructor defined in the same TU, and we try to alias them. A COFF weak alias cannot satisfy a normal undefined symbol reference from another TU. The other TU must also mark the referenced symbol as weak, and we can't rely on that. Clang already has a special case here for dllexport, but we failed to realize that the problem also applies to other non-discardable symbols such as those from explicit template instantiations. Fixes PR25477. llvm-svn: 252659
* [libFuzzer] add UninstrumentedTest.cpp (missing from a previous commit)Kostya Serebryany2015-11-101-0/+8
| | | | llvm-svn: 252658
* Updated a relative path in Makefile.rules to reflect the new testsuite location.Sean Callanan2015-11-101-1/+1
| | | | llvm-svn: 252657
OpenPOWER on IntegriCloud