summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Weaken asm predicate for memory offsetsSimon Dardis2016-05-2716-3/+407
| | | | | | | | | | | | The isMemWithSimmOffset predicate rejects relocations which is incorrect behaviour. Linkers and other tools should handle|warn|error when the field overflows. Reviewers: dsanders, vkalintiris Differential Revision: http://reviews.llvm.org/D20727 llvm-svn: 270995
* [RewriteStatepointsForGC] All constant should have null base pointerIgor Laevsky2016-05-275-11/+163
| | | | | | | | | | | | | | | | | | Currently we consider that each constant has itself as a base value. I.e "base(const) = const". This introduces couple of problems when we are trying to avoid reporting constants in statepoint live sets: 1. When querying "base( phi(const1, const2) )" we will get "phi(const1, const2)" as a base pointer. Since it's not a constant we will record it in a stack map. However on practice we don't want this to happen (constant are never relocated). 2. base( phi(const, gc ptr) ) = phi( const, base(gc ptr) ). This particular case imposes challenge on our runtime - we don't expect to see constant base pointers other than null. This problems can be avoided by treating all constant as if they were derived from null pointer base. I.e in a first case we will not include constant pointer in a stack map at all. In a second case we will get "phi(null, base(gc ptr))" as a base pointer which is a lot more convenient. Differential Revision: http://reviews.llvm.org/D20584 llvm-svn: 270993
* Attemp to fix build bot after r270987George Rimar2016-05-271-1/+2
| | | | | | | | | | | It was: "Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections." Fix: since test requires no zlib available and r270987 changed the compression flag for llvm-mc to mandatory specify the compression style, then just add 2 available styles to this test. llvm-svn: 270992
* [AMDGPU][llvm-mc] Square-braced-syntax for registers - make ":expr2" optional.Artem Tamazov2016-05-272-6/+39
| | | | | | | | | | | | | | | | | Register numbers may be specified as assembly-time expressions. This feature can be useful in macros and alike. However, expressions are supported within sqare braces only. Sqare braces were initially intended to support specifying of multiple (pairs/quads...) registers. Syntax like v[8:8] which specifies single register is also supported. That allows expressions but looks a bit unnatural. This change supports syntax REG[EXPR]. Tests added. Differential Revision: http://reviews.llvm.org/D20588 llvm-svn: 270990
* Avoid some copies by using const references.Benjamin Kramer2016-05-2713-25/+22
| | | | | | | clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988
* Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled ↵George Rimar2016-05-277-48/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | compression sections. Fix: updated clang code which was not updated by mistake. Original commit message: [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. This patch is strongly based on previously reverted D20331. (because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style) Difference that this patch supports both zlib and zlib-gnu styles. -compress-debug-sections option now supports next values: -compress-debug-sections=zlib-gnu -compress-debug-sections=zlib -compress-debug-sections=none Previously specifying -compress-debug-sections enabled zlib-gnu compression, so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior that was before this patch for case when compression was enabled. Differential revision: http://reviews.llvm.org/D20676 llvm-svn: 270987
* Apply clang-tidy's misc-static-assert where it makes sense.Benjamin Kramer2016-05-278-33/+32
| | | | | | | Also fold conditions into assert(0) where it makes sense. No functional change intended. llvm-svn: 270982
* [sparc] Remove some unused (and undefined) declarations.Benjamin Kramer2016-05-274-14/+2
| | | | | | No functionality change. llvm-svn: 270981
* [hexagon] Move BlockRanges and RDF stuff into the llvm namespace.Benjamin Kramer2016-05-2710-28/+28
| | | | | | No functional change intended. llvm-svn: 270980
* [sparc] Move LEON passes into llvm namespace.Benjamin Kramer2016-05-272-4/+6
| | | | | | Also give them library visiblity while there. llvm-svn: 270979
* Revert r270977 ([llvm-mc] - Teach llvm-mc to generate zlib styled ↵George Rimar2016-05-277-130/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | compression sections.) It broke buildbot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/13585/steps/build/logs/stdio Initial commit message: [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. This patch is strongly based on previously reverted D20331. (because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style) Difference that this patch supports both zlib and zlib-gnu styles. -compress-debug-sections option now supports next values: -compress-debug-sections=zlib-gnu -compress-debug-sections=zlib -compress-debug-sections=none Previously specifying -compress-debug-sections enabled zlib-gnu compression, so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior that was before this patch for case when compression was enabled. Differential revision: http://reviews.llvm.org/D20676 llvm-svn: 270978
* [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.George Rimar2016-05-277-48/+130
| | | | | | | | | | | | | | | | | | | | This patch is strongly based on previously reverted D20331. (because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style) Difference that this patch supports both zlib and zlib-gnu styles. -compress-debug-sections option now supports next values: -compress-debug-sections=zlib-gnu -compress-debug-sections=zlib -compress-debug-sections=none Previously specifying -compress-debug-sections enabled zlib-gnu compression, so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior that was before this patch for case when compression was enabled. Differential revision: http://reviews.llvm.org/D20676 llvm-svn: 270977
* Revert: r270973 - [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer ↵Simon Pilgrim2016-05-2717-362/+858
| | | | | | extension intrinsics with generic IR (llvm) llvm-svn: 270976
* [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with ↵Simon Pilgrim2016-05-2717-858/+362
| | | | | | | | | | | | generic IR (llvm) This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused. A companion patch (D20684) removes/auto-upgrade the clang intrinsics. Differential Revision: http://reviews.llvm.org/D20686 llvm-svn: 270973
* Linker: teach the IR mover to return llvm::Error.Peter Collingbourne2016-05-279-117/+128
| | | | | | | | | This will be needed in order to consistently return an Error to clients of the API being developed in D20268. Differential Revision: http://reviews.llvm.org/D20550 llvm-svn: 270967
* [codeview] Remove StreamReader copying method.Zachary Turner2016-05-278-64/+74
| | | | | | | | | | | Since we want to move toward zero-copy access to stream data, we want to remove all instances of copying operations. So get rid of some of those here. Differential Revision: http://reviews.llvm.org/D20720 Reviewed By: ruiu llvm-svn: 270960
* Don't allocate unnecessarily in APInt::operator[+-]. NFC.Pete Cooper2016-05-272-2/+20
| | | | | | | | | | | | | | | APInt::operator+(uint64_t) just forwarded to operator+(const APInt&). Constructing the APInt for the RHS takes an allocation which isn't required. Also, for APInt's in the slow path, operator+ would call add() internally which iterates over both arrays of values. Instead we can use add_1 and sub_1 which only iterate while there is something to do. Using the memory for 'opt -O2 verify-uselistorder.lto.opt.bc -o opt.bc' (see r236629 for details), this reduces the number of allocations from 23.9M to 22.7M. llvm-svn: 270959
* [LibFuzzer] Refactor declaration of tests in CMake.Dan Liew2016-05-276-115/+104
| | | | | | | | | | | | | | | | | | Add a new CMake function (``add_libfuzzer_test()``) to simplify declaration of executables for testing LibFuzzer and use it to reorganise how tests are declared. Note that configuration of the lit configuration files has been moved as late as possible because we are going to need to disable some tests for some platforms and we will need to propagate this information into the lit configuration. Note the code for custom mains was removed because no tests are currently written for this and Kostya seems happy to remove this. Differential Revision: http://reviews.llvm.org/D20706 llvm-svn: 270958
* Remove use of is_trivially_constructible.Rui Ueyama2016-05-271-2/+0
| | | | | | | | | | | | type_traits header in libstdc++ 4.8 does not define is_trivially_contructible so the code doesn't compile with it. In this file we are using the trait for assertion to provide a better error message. Removing it doesn't change the meaning of the code. Differential Revision: http://reviews.llvm.org/D20719 llvm-svn: 270957
* [Support] Remove a stale comment.Lang Hames2016-05-271-2/+1
| | | | | | | | This comment was included in Peter Collingbourne's original version of StringError (see http://reviews.llvm.org/D20550), where it made sense. It was accidentally copied over with the rest of the class, but no longer applies. llvm-svn: 270956
* Form objc_storeStrong in the presence of bitcasts.Pete Cooper2016-05-272-1/+28
| | | | | | | | | | | | | | | | objc_storeStrong can be formed from a sequence such as %0 = tail call i8* @objc_retain(i8* %p) nounwind %tmp = load i8*, i8** @x, align 8 store i8* %0, i8** @x, align 8 tail call void @objc_release(i8* %tmp) nounwind The code was already looking through bitcasts for most of the values involved, but had missed one case where the pointer operand for the store was a bitcast. Ultimately the pointer for the load and store have to be the same value, after stripping casts. llvm-svn: 270955
* [codeview] #include missing header breaking builds.Zachary Turner2016-05-271-0/+1
| | | | llvm-svn: 270954
* [codeview,pdb] Try really hard to conserve memory when reading.Zachary Turner2016-05-2726-235/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | PDBs can be extremely large. We're already mapping the entire PDB into the process's address space, but to make matters worse the blocks of the PDB are not arranged contiguously. So, when we have something like an array or a string embedded into the stream, we have to make a copy. Since it's convenient to use traditional data structures to iterate and manipulate these records, we need the memory to be contiguous. As a result of this, we were using roughly twice as much memory as the file size of the PDB, because every stream was copied out and re-stitched together contiguously. This patch addresses this by improving the MappedBlockStream to allocate from a BumpPtrAllocator only when a read requires a discontiguous read. Furthermore, it introduces some data structures backed by a stream which can iterate over both fixed and variable length records of a PDB. Since everything is backed by a stream and not a buffer, we can read almost everything from the PDB with zero copies. Differential Revision: http://reviews.llvm.org/D20654 Reviewed By: ruiu llvm-svn: 270951
* [Support] Rename unconvertibleErrorCode to inconvertibleErrorCode.Lang Hames2016-05-273-8/+8
| | | | | | | Based on a totally scientific, 30 second google search "in-" appears to be the preferred prefix. llvm-svn: 270950
* [Support] Add a StringError convenience class to Error.hLang Hames2016-05-273-16/+92
| | | | | | | | StringError can be used to represent Errors that aren't recoverable based on the error type, but that have a useful error message that can be reported to the user or logged. llvm-svn: 270948
* [libFuzzer] make check-fuzzer a bit fasterKostya Serebryany2016-05-271-3/+2
| | | | llvm-svn: 270947
* [LoopUnrollAnalyzer] Bail out instead of dying with assert when facing huge ↵Michael Zolotukhin2016-05-272-2/+23
| | | | | | | | index. This fixes PR27902. llvm-svn: 270946
* [libFuzzer] make OOM-handling more portable. Instead of sending a signal to ↵Kostya Serebryany2016-05-273-55/+21
| | | | | | the main fuzzing thread, print the message in the getrusage thread and exit. llvm-svn: 270945
* ValueMapper: fix typo in minor optimization on constant mapping (NFC)Mehdi Amini2016-05-271-1/+2
| | | | | | | | | | | | | | | | | If every operands of a constant are mapping to themselves, and the type does not change, we have an early exit as acknowledged in the comment: // Otherwise, we have some other constant to remap. Start by checking to see // if all operands have an identity remapping. However instead of checking for identity the code was checking if the operands were mapped to the constant itself, which is rarely true. As a consequence, the coverage report showed that the early exit was never taken. llvm-svn: 270944
* pdbdump: print out the name of the stream 0.Rui Ueyama2016-05-273-3/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D20712 llvm-svn: 270943
* [libFuzzer] more refactoring: make sure CurrentUnitData is awlays a valid ↵Kostya Serebryany2016-05-273-15/+26
| | | | | | pointer to read from llvm-svn: 270942
* pdbdump: Add -raw-all to enable all -raw-* flags.Rui Ueyama2016-05-262-1/+506
| | | | | | Differential Revision: http://reviews.llvm.org/D20707 llvm-svn: 270937
* Sort my entry in CODE_OWNERS.TXTHans Wennborg2016-05-261-4/+4
| | | | llvm-svn: 270936
* [CodeGen] Fix problem with X86 byte registers in CriticalAntiDepBreakerMitch Bodart2016-05-262-4/+93
| | | | | | | | | | | | CriticalAntiDepBreaker was not correctly tracking defs of the high X86 byte registers, leading to incorrect use of a busy register to break an antidependence. Fixes pr27681, and its duplicates pr27580, pr27804. Differential Revision: http://reviews.llvm.org/D20456 llvm-svn: 270935
* Fix typo.Rui Ueyama2016-05-261-15/+15
| | | | llvm-svn: 270934
* Attach profile summary in IR based instrumentation pass.Easwaran Raman2016-05-262-2/+11
| | | | | | Differential revision: http://reviews.llvm.org/D20655 llvm-svn: 270933
* SDAG: Use an Optional<> instead of a sigil value. NFCJustin Bogner2016-05-261-6/+6
| | | | | | | This just makes it a bit more clear that we don't intend to use a deleted node for anything here. llvm-svn: 270931
* [libFuzzer] more refactoring around CurrentUnit. Also add a threading test ↵Kostya Serebryany2016-05-265-25/+63
| | | | | | on which we currently have a race (when reporting bugs from multiple threads) llvm-svn: 270929
* [LibFuzzer] Add missing #include<string>Dan Liew2016-05-261-0/+1
| | | | | | | This partially fixes the compilation of the LibFuzzer unit test on OSX using AppleClang. llvm-svn: 270926
* [LoopUnrollAnalyzer] Fix a crash in analyzeLoopUnrollCost.Michael Zolotukhin2016-05-262-20/+46
| | | | | | | | | Condition might be simplified to a Constant, but it doesn't have to be ConstantInt, so we should dyn_cast, instead of cast. This fixes PR27886. llvm-svn: 270924
* PR26055: Speed up LiveDebugValues::transferDebugValue()Adrian Prantl2016-05-261-43/+85
| | | | | | | | | | | | | | | | | | | | | | | | | This patch builds upon r270776 and speeds up LiveDebugValues::transferDebugValue() by adding an index that maps each DebugVariable to its open VarLoc. The transferDebugValue() function needs to close all open ranges for a given DebugVariable. Iterating over the set bits of OpenRanges is prohibitively slow in practice. I experimented with using the sorted map of VarLocs in the UniqueVector to iterate only over the range of VarLocs with a given DebugVariable, but the binary search turned out to be even more expensive than just iterating over the set bits in OpenRanges. Instead, this patch exploits the fact that there can only be one open location for each DebugVariable and redundantly stores this location in a DenseMap. This patch brings the time spent in the LiveDebugValues pass down to an almost neglectiable amount. http://llvm.org/bugs/show_bug.cgi?id=26055 http://reviews.llvm.org/D20636 rdar://problem/24091200 llvm-svn: 270923
* [libFuzzer] refactor: hide CurrentUnitData inside an interface function. NFCKostya Serebryany2016-05-263-28/+37
| | | | llvm-svn: 270922
* [Docs][WritingAnLLVMBackend] Makefiles are deprecatedChris Bieneman2016-05-261-15/+13
| | | | | | | | | | | | | | Summary: * docs/WritingAnLLVMBackend.rst: Makefiles are no longer used. The users should use CMakeLists.txt. In order to add the target, the TARGETS_TO_BUILD is replaced with LLVM_ALL_TARGETS. Reviewers: gribozavr, void, beanz Subscribers: llvm-commits Patch By: Visoiu Mistrih Francis (thegameg) Differential Revision: http://reviews.llvm.org/D20700 llvm-svn: 270921
* [obj2yaml][yaml2obj] Support for MachO lazy bindingsChris Bieneman2016-05-265-0/+472
| | | | | | This adds support for YAML round tripping dyld info lazy bindings. The storage and format of these is the same as regular bind opcodes, they are just interpreted differently by dyld, and can have DONE opcodes in the middle of the opcode lists. llvm-svn: 270920
* [Kaleidoscope][BuildingAJIT] Remove leftover debugging output statements.Lang Hames2016-05-261-4/+0
| | | | llvm-svn: 270919
* [Kaleidoscope][BuildingAJIT] Fix strong emphasis markup by removing whitespace.Lang Hames2016-05-261-2/+2
| | | | llvm-svn: 270918
* [Kaleidoscope][BuildingAJIT] Add docs for Chapter 3 of the Building A JITLang Hames2016-05-261-0/+47
| | | | | | tutorial. llvm-svn: 270917
* [Error] Make ECError only constructible via errorCodeToError.Lang Hames2016-05-261-3/+4
| | | | | | | This enforces idiomatic usage of ECError removing the option to construct them using make_error. llvm-svn: 270916
* Add myself as the code owner for SCEV and IndVarSimplifySanjoy Das2016-05-261-1/+5
| | | | llvm-svn: 270915
* [Kaleidoscope][BuildingAJIT] Add explicit dependence on TransformUtils to ↵Lang Hames2016-05-261-0/+1
| | | | | | Chapter3. llvm-svn: 270914
OpenPOWER on IntegriCloud