summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [Coverage] Make sorting criteria for CounterMappingRegions local.Igor Kudrin2016-08-312-8/+10
| | | | | | | | | | | | Move the comparison function into the only place there it is used, i.e. the call to std::stable_sort in CoverageMappingWriter::write(). Add sorting by region kinds as it is required to ensure stable order in our tests and to simplify D23987. Differential Revision: https://reviews.llvm.org/D24034 llvm-svn: 280198
* [AVX-512] Add patterns to select masked logical operations if the select has ↵Craig Topper2016-08-313-192/+306
| | | | | | | | a floating point type. This is needed in order to replace the masked floating point logical op intrinsics with native IR. llvm-svn: 280195
* [AVX-512] Add test cases for masked floating point logic operations with ↵Craig Topper2016-08-312-1/+1192
| | | | | | | | bitcasts between the logic ops and the select. We don't currently select masked operations for these cases. Test cases taken from optimized clang output after trying to convert the masked floating point logical op intrinsics to native IR. llvm-svn: 280194
* [X86] Regenerate a test using update_llc_test_checks.py.Craig Topper2016-08-311-48/+81
| | | | llvm-svn: 280193
* [XRay] Support multiple return instructions in a single basic blockDean Michael Berris2016-08-313-1/+60
| | | | | | | Add a .mir test to catch this case, and fix the xray-instrumentation pass to handle it appropriately. llvm-svn: 280192
* [Loads] Properly populate the visited set in isDereferenceableAndAlignedPointerDavid Majnemer2016-08-311-2/+5
| | | | | | | | | There were paths where we wouldn't populate the visited set, causing us to recurse forever if an SSA variable was defined in terms of itself. This fixes PR30210. llvm-svn: 280191
* [PowerPC] Don't spill the frame pointer twiceHal Finkel2016-08-312-0/+37
| | | | | | | | | | | | | | When a function contains something, such as inline asm, which explicitly clobbers the register used as the frame pointer, don't spill it twice. If we need a frame pointer, it will be saved/restored in the prologue/epilogue code. Explicitly spilling it again will reuse the same spill slot used by the prologue/epilogue code, thus clobbering the saved value. The same applies to the base-pointer or PIC-base register. Partially fixes PR26856. Thanks to Ulrich for his analysis and the small inline-asm reproducer. llvm-svn: 280188
* [Coroutines] Part 10: Add coroutine promise support.Gor Nishanov2016-08-316-9/+198
| | | | | | | | | | | | | | | | | | | Summary: 1) CoroEarly now lowers llvm.coro.promise intrinsic that allows to obtain a coroutine promise pointer from a coroutine frame and vice versa. 2) CoroFrame now interprets Promise argument of llvm.coro.begin to place CoroutinPromise alloca at a deterministic offset from the coroutine frame. Now, the coroutine promise example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex4.ll). Reviewers: majnemer Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23993 llvm-svn: 280184
* [InstCombine] clean up InsertRangeTest; NFCISanjay Patel2016-08-311-35/+15
| | | | | | | | | | It's much less code and easier to read if we don't duplicate everything between the 'Inside' and not 'Inside' cases. As noted with the FIXME, the goal is to make this vector-friendly in a follow-up patch. llvm-svn: 280183
* [llvm-cov] Drop redundant "No." suffix in a column titleVedant Kumar2016-08-312-2/+2
| | | | llvm-svn: 280181
* [LoadStoreVectorizer] Change VectorSet to Vector to match head and tail ↵Alina Sbirlea2016-08-303-7/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | positions. Resolves PR29148. Summary: LSV was using two vector sets (heads and tails) to track pairs of adjiacent position to vectorize. A recent optimization is trying to obtain the longest chain to vectorize and assumes the positions in heads(H) and tails(T) match, which is not the case is there are multiple tails for the same head. e.g.: i1: store a[0] i2: store a[1] i3: store a[1] Leads to: H: i1 T: i2 i3 Instead of: H: i1 i1 T: i2 i3 So the positions for instructions that follow i3 will have different indexes in H/T. This patch resolves PR29148. This issue also surfaced the fact that if the chain is too long, and TLI returns a "not-fast" answer, the whole chain will be abandoned for vectorization, even though a smaller one would be beneficial. Added a testcase and FIXME for this. Reviewers: tstellarAMD, arsenm, jlebar Subscribers: mzolotukhin, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D24057 llvm-svn: 280179
* [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
OpenPOWER on IntegriCloud