summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] add tests to show type limitations of InsertRangeTest and callersSanjay Patel2016-08-303-3/+56
| | | | llvm-svn: 280175
* [codeview] Remove redundant TypeTable lookupReid Kleckner2016-08-301-17/+1
| | | | | | | | As written, the code should assert if this lookup would have ever succeeded. Without looking through composite types, the type graph should be acyclic. llvm-svn: 280168
* Add a test file, macho-invalid-dysymtab-extreloff-nextrel,Kevin Enderby2016-08-301-0/+0
| | | | | | I forgot to do an svn add on. llvm-svn: 280167
* [ORC][RPC] Fix some bugs in the callB primitive.Lang Hames2016-08-301-3/+3
| | | | | | | Still no unit test due to synchronization bugs on s390. These issues were discovered in an out-of-tree utility. llvm-svn: 280163
* [CMake] Ensure that compiler-rt is added firstChris Bieneman2016-08-301-0/+15
| | | | | | This will enable other runtime projects to detect the presence of sanitizer runtimes by referring to the sanitizer targets directly. llvm-svn: 280162
* Next set of additional error checks for invalid Mach-O files for bad ↵Kevin Enderby2016-08-3016-6/+144
| | | | | | | | LC_DYSYMTAB’s. This contains the missing checks for LC_DYSYMTAB load command fields. llvm-svn: 280161
* llvm-readobj: speculative fix for MSVCSaleem Abdulrasool2016-08-301-1/+1
| | | | | | Use the typedef rather than using to type alias the typename. llvm-svn: 280158
* GlobalISel: combine extracts & sequences created for legalizationTim Northover2016-08-306-11/+198
| | | | | | | | Legalization ends up creating many G_SEQUENCE/G_EXTRACT pairs which leads to inefficient codegen (even for -O0), so add a quick pass over the function to remove them again. llvm-svn: 280155
* AMDGPU: Relax SGPR asm constraint register classMatt Arsenault2016-08-302-1/+11
| | | | | | | s should be SReg_32 to be as general as possible. This can avoid a copy from m0. llvm-svn: 280154
* [libfuzzer] simplified unit truncation; do not write trunc items to discMike Aizatsky2016-08-302-34/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D24049 llvm-svn: 280153
* Revert "ELFDumper: Unversioned symbols must not have trailing @"Hemant Kulkarni2016-08-303-16/+13
| | | | | | | | This reverts commit 8df7a877949e8782a3a28e3ecdb0770c1e444056. Fixing other repositories and adding changes together. llvm-svn: 280152
* [LoopVectorizer] Predicate instructions in blocks with several incoming edgesMichael Kuperstein2016-08-303-16/+66
| | | | | | | | | | We don't need to limit predication to blocks that have a single incoming edge, we just need to use the right mask. This fixes PR30172. Differential Revision: https://reviews.llvm.org/D24009 llvm-svn: 280148
* [COFFObjectFile] Ignore broken symbol tableDavid Majnemer2016-08-302-3/+12
| | | | | | | | | | | | | | | | When binaries are compressed by UPX, information about symbol table offset and symbol count remain unchanged (but became invalid due to compression). This causes failure in the constructor and the rest of the binary cannot be processed. Instead, reset symbol related information (symbol/string table pointers, sizes) - this should disable the related iterators and functions while the rest of the binary can still be processed. Patch by Bandzi Michal! llvm-svn: 280147
* IntrArgMemOnly is only defined (and current AA machinery only sanely ↵Daniel Berlin2016-08-302-3/+44
| | | | | | supports) pointer arguments, and these intrinsics have vector of pointer arguments. Remove ArgMemOnly until we either have the machinery, define a new attribute, or something similar llvm-svn: 280143
* Re-instate recent RPC updates (r280016, r280017, r280027, r280051) with aLang Hames2016-08-302-74/+176
| | | | | | workaround for the limitations of MSVC 2013's std::future class. llvm-svn: 280141
* ELFDumper: Unversioned symbols must not have trailing @Hemant Kulkarni2016-08-303-13/+16
| | | | llvm-svn: 280140
* CodeGen: Fixup for r280128, since GCC isn't as permissive as ClangDuncan P. N. Exon Smith2016-08-302-8/+6
| | | | | | | Fixes the bots, e.g.: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/10055 llvm-svn: 280135
* GlobalISel: forbid physical registers on generic MIs.Tim Northover2016-08-309-72/+168
| | | | | | | | | | We're intending to move to a world where the type of a register is determined by its (unique) def. This is incompatible with physregs, which are untyped. It also means the other passes don't have to worry quite so much about register-class compatibility and inserting COPYs appropriately. llvm-svn: 280132
* llvm-readobj: add support for printing GNU NotesSaleem Abdulrasool2016-08-304-0/+221
| | | | | | | | | Add support for printing the GNU Notes. This allows an easy way to view the build id for a binary built with the build id. Currently, this only handles the GNU notes, though it would be easy to extend for other note types (default, FreeBSD, NetBSD, etc). Only the GNU style is supported currently. llvm-svn: 280131
* Support: add some more ELF constantsSaleem Abdulrasool2016-08-301-1/+14
| | | | | | | Add constants for additional GNU note types and the GNU Notes OS type id. This is needed to support printing the notes in ELF binaries. llvm-svn: 280130
* Fix unit test after function name change.Zachary Turner2016-08-301-4/+4
| | | | llvm-svn: 280129
* ADT: Split ilist_node_traits into alloc and callback, NFCDuncan P. N. Exon Smith2016-08-3016-86/+107
| | | | | | | | | | | | | | | | Many lists want to override only allocation semantics, or callbacks for iplist. Split these up to prevent code duplication. - Specialize ilist_alloc_traits to change the implementations of deleteNode() and createNode(). - One common desire is to do nothing deleteNode() and disable createNode(). Specialize ilist_alloc_traits to inherit from ilist_noalloc_traits for that behaviour. - Specialize ilist_callback_traits to use the addNodeToList(), removeNodeFromList(), and transferNodesFromList() callbacks. As a drive-by, add some coverage to the callback-related unit tests. llvm-svn: 280128
* Rename ArrayRef::keep_front / keep_back to take_front / take_back.Zachary Turner2016-08-301-8/+8
| | | | | | | The name decided on was take_, but I only updated it for StringRef and forgot to do it for ArrayRef. llvm-svn: 280126
* TailDuplication: Extract Indirect-Branch block limit as option. NFCKyle Butt2016-08-302-3/+11
| | | | | | | | The existing code hard-coded a limit of 20 instructions for duplication when a block ended with an indirect branch. Extract this as an option. No functional change intended. llvm-svn: 280125
* ADT: Guarantee transferNodesFromList is only called on transfersDuncan P. N. Exon Smith2016-08-303-16/+19
| | | | | | | | | | | | Guarantee that ilist_traits<T>::transferNodesFromList is only called when nodes are actually changing lists. I also moved all the callbacks to occur *first*, before the operation. This is the only choice for iplist<T>::merge, so we might as well be consistent. I expect this to have no effect in practice, although it simplifies the logic in both iplist<T>::transfer and iplist<T>::insert. llvm-svn: 280122
* Appease buildbots after r280114.Zachary Turner2016-08-301-2/+2
| | | | llvm-svn: 280117
* IR: Appease MSVC after r280107 with an & or twoDuncan P. N. Exon Smith2016-08-301-1/+1
| | | | | | | Fixes the bot: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15192 llvm-svn: 280116
* [InstCombine] replace divide-by-constant checks with asserts; NFCSanjay Patel2016-08-302-20/+32
| | | | | | | These folds already have tests for scalar and vector types, except for the vector div-by-0 case, so I'm adding tests for that. llvm-svn: 280115
* Add StringRef::take_front and StringRef::take_backZachary Turner2016-08-304-0/+111
| | | | | | | Reviewed By: majnemer, rnk Differential Revision: https://reviews.llvm.org/D23965 llvm-svn: 280114
* Add StringRef::contains()Zachary Turner2016-08-301-0/+5
| | | | llvm-svn: 280113
* [InstCombine] clean up foldICmpDivConstant; NFCISanjay Patel2016-08-301-16/+20
| | | | | | | | 1. Fix comments to match variable names 2. Remove redundant CmpRHS variable 3. Add FIXME to replace some checks with asserts llvm-svn: 280112
* ADT: Clean up docs and formatting for ilist_traits, NFCDuncan P. N. Exon Smith2016-08-301-34/+33
| | | | | | | | | | | | This is a prep commit before splitting up ilist_node_traits and updating/simplifying call sites. - Move to top of file (I considered moving to a different file, llvm/ADT/ilist_traits.h, but it's really not much code). - Clang-format. - Convert comments to doxygen, clean them up, and add TODOs for what I'm doing next. llvm-svn: 280109
* ADT: Split out simple_ilist, a simple intrusive listDuncan P. N. Exon Smith2016-08-309-142/+1018
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split out a new, low-level intrusive list type with clear semantics. Unlike iplist (and ilist), all operations on simple_ilist are intrusive, and simple_ilist never takes ownership of its nodes. This enables an intuitive API that has the right defaults for intrusive lists. - insert() takes references (not pointers!) to nodes (in iplist/ilist, passing a reference will cause the node to be copied). - erase() takes only iterators (like std::list), and does not destroy the nodes. - remove() takes only references and has the same behaviour as erase(). - clear() does not destroy the nodes. - The destructor does not destroy the nodes. - New API {erase,remove,clear}AndDispose() take an extra Disposer functor for callsites that want to call some disposal routine (e.g., std::default_delete). This list is not currently configurable, and has no callbacks. The initial motivation was to fix iplist<>::sort to work correctly (even with callbacks in ilist_traits<>). iplist<> uses simple_ilist<>::sort directly. The new test in unittests/IR/ModuleTest.cpp crashes without this commit. Fixing sort() via a low-level layer provided a good opportunity to: - Unit test the low-level functionality thoroughly. - Modernize the API, largely inspired by other intrusive list implementations. Here's a sketch of a longer-term plan: - Create BumpPtrList<>, a non-intrusive list implemented using simple_ilist<>, and use it for the Token list in lib/Support/YAMLParser.cpp. This will factor out the only real use of createNode(). - Evolve the iplist<> and ilist<> APIs in the direction of simple_ilist<>, making allocation/deallocation explicit at call sites (similar to simple_ilist<>::eraseAndDispose()). - Factor out remaining calls to createNode() and deleteNode() and remove the customization from ilist_traits<>. - Transition uses of iplist<>/ilist<> that don't need callbacks over to simple_ilist<>. llvm-svn: 280107
* Fixup r279618, instantiate ↵NAKAMURA Takumi2016-08-302-6/+6
| | | | | | | | | | | *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC>, instead of *AnalysisManagerProxy<*AnalysisManager,LazyCallGraph::SCC,LazyCallGraph&>, for PassID. Or they were not instantiated as expected; llvm::InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::Function>, llvm::LazyCallGraph::SCC>::PassID llvm::InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::Function>, llvm::LazyCallGraph::SCC>::PassID llvm-svn: 280105
* [AMDGPU] Refactor SOP instructions TD files.Valery Pykhtin2016-08-304-914/+1105
| | | | | | Differential revision: https://reviews.llvm.org/D23617 llvm-svn: 280101
* Revert "[ORC][RPC] Make the future type of an Orc RPC call Error/Expected ↵Reid Kleckner2016-08-303-117/+76
| | | | | | | | | | | | | rather than" This reverts commit r280016, and the followups of r280017, r280027, r280051, r280058, and r280059. MSVC's implementation of std::promise does not get along with llvm::Error. It uses its promised value too much like a normal value type. llvm-svn: 280100
* [libFuzzer] fix a bug when running a single unit of N bytes with -max_len=M, ↵Kostya Serebryany2016-08-302-6/+7
| | | | | | M<N, caused a buffer overflow llvm-svn: 280098
* [libFuzzer] stop using bits for memcmp's value profile -- seems to blow up ↵Kostya Serebryany2016-08-302-9/+9
| | | | | | the corpus too much llvm-svn: 280096
* [MC] Move parser helper functions from Asmparser to MCAsmParserNirav Dave2016-08-304-66/+83
| | | | | | NFC Intended. llvm-svn: 280092
* [Reassociate] Add additional debug output. NFC.Chad Rosier2016-08-301-0/+2
| | | | llvm-svn: 280090
* SILoadStoreOptimizer.cpp: Fix a warning in r279991. [-Wunused-variable]NAKAMURA Takumi2016-08-301-0/+1
| | | | llvm-svn: 280075
* [SimplifyCFG] Properly CSE metadata in SinkThenElseCodeToEndJames Molloy2016-08-302-0/+42
| | | | | | This was missing, meaning the metadata in sunk instructions was potentially bogus and could cause miscompiles. llvm-svn: 280072
* docs: mention that clobbering output regs in inline asm is illegal.Peter Zotov2016-08-301-0/+3
| | | | | | | | | I've found this out the hard way; LLVM will not normally catch this error (unless -verify-machineinstrs is passed), and under certain very specific circumstances (such as register scavenger running under pressure) this would result in an opaque crash in codegen. llvm-svn: 280071
* [llvm-cov] Use the native path in the coverage report.Ying Yi2016-08-306-2/+33
| | | | | | | | | | | The coverage reports contain the source or binary file paths. On Windows, the file path might contain the seperators of both '/' and '\'. This patch uses the native path in the coverage reports. For example, on Windows, all '/' are converted to '\'. Differential Revision: https://reviews.llvm.org/D23922 llvm-svn: 280061
* [Support][Error] Suppress warning about unused result.Lang Hames2016-08-301-1/+1
| | | | llvm-svn: 280059
* [Support] Add a conditionally defined default constructor (available on MSVCLang Hames2016-08-301-0/+21
| | | | | | | | | | | | | only) for Expected<T> so that it can interoperate with MSVC's std::future implementation. MSVC 2013's std::future implementation requires the wrapped type to be default constructible. Hopefully this will fix the bot breakage in http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9937 . llvm-svn: 280058
* Replace incorrect "#ifdef DEBUG" with "#ifndef NDEBUG".James Y Knight2016-08-302-13/+17
| | | | | | | | | | | | | | | | | | | | The former is simply wrong -- the code will either never be used or will always be used, rather than being dependent upon whether it's built with debug assertions enabled. The macro DEBUG isn't ever set by the llvm build system. But, the macro DEBUG(X) is defined (unconditionally) if you happen to include llvm/Support/Debug.h. The code in Value.h which was erroneously protected by the #ifdef DEBUG didn't even compile -- you can't cast<> from an LLVMOpaqueValue directly. Fortunately, it was never invoked, as Core.cpp included Value.h before Debug.h. The conditionalized code in AArch64CollectLOH.cpp was previously always used, as it includes Debug.h. llvm-svn: 280056
* [libFuzzer] use bits instead of bytes for memcmp/strcmp value profile -- the ↵Kostya Serebryany2016-08-302-13/+21
| | | | | | fuzzer reaches the goal much faster, at least on the simple puzzles llvm-svn: 280054
* [RewriteStatepointsForGC] Update comment for same PHI node check. NFCAnna Thomas2016-08-301-1/+2
| | | | llvm-svn: 280052
* [ORC][RPC] Reword 'async' to 'non-blocking' to better reflect call primitiveLang Hames2016-08-302-38/+70
| | | | | | | | | | | | | | behaviors, and add a callB (blacking call) primitive. callB is a blocking call primitive for threaded code where the RPC responses are being processed on a separate thread. (For single threaded code callST should continue to be used instead). No unit test yet: Last time I commited a threaded unit test it deadlocked on one of the s390x builders. I'll try to re-enable that test first, and add a new test if I can sort out the deadlock issue. llvm-svn: 280051
OpenPOWER on IntegriCloud