summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [MBP] Use Function::optForSize() instead of checking OptimizeForSize directly.Haicheng Wu2016-04-293-2/+71
| | | | | | Fix a FIXME. Disable loop alignment if compiled with -Oz now. llvm-svn: 268121
* [EarlyCSE] Simplify guard intrinsicsSanjoy Das2016-04-292-0/+204
| | | | | | | | | | | | | | | | | | Summary: This change teaches EarlyCSE some basic properties of guard intrinsics: - Guard intrinsics read all memory, but don't write to any memory - After a guard has executed, the condition it was guarding on can be assumed to be true - Guard intrinsics on a constant `true` are no-ops Reviewers: reames, hfinkel Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19578 llvm-svn: 268120
* AMDGPU: Fix crash with unreachable terminators.Matt Arsenault2016-04-292-12/+83
| | | | | | | | | | If a block has no successors because it ends in unreachable, this was accessing an invalid iterator. Also stop counting instructions that don't emit any real instructions. llvm-svn: 268119
* [ELF] Ignore -d option (and aliases).Davide Italiano2016-04-291-0/+4
| | | | | | | The linker already allocates common symbols by default. Discussed with Rafael. llvm-svn: 268117
* Revert r268107 -- debug build failureXinliang David Li2016-04-292-82/+70
| | | | llvm-svn: 268116
* [InstCombine][SSE] PSHUFB to shuffle combine to use general aggregate ↵Simon Pilgrim2016-04-291-17/+23
| | | | | | | | elements. NFCI. Make use of Constant::getAggregateElement instead of checking constant types - first step towards adding support for UNDEF mask elements. llvm-svn: 268115
* Try to fix clang-cmake-aarch64-42vma by removing a memory leak (have a ↵Filipe Cabecinhas2016-04-291-1/+2
| | | | | | global var capture it). llvm-svn: 268114
* [Sema] Specify the underlying type for an enum. NFC.George Burgess IV2016-04-291-1/+1
| | | | llvm-svn: 268113
* [Orc] Add ORC lazy-compilation support for AArch64.Lang Hames2016-04-292-0/+175
| | | | | | | The ORC compile callbacks and indirect stubs APIs will now work for AArc64, allowing functions to be lazily compiled and/or updated. llvm-svn: 268112
* [Orc] Make sure we don't drop the internal error in OrcRemoteTargetClient whenLang Hames2016-04-291-2/+3
| | | | | | the constructor fails, as this would lead to an 'unchecked error' crash. llvm-svn: 268111
* Watch out for compilers that generate bad bitfield info. If the bit size of ↵Greg Clayton2016-04-292-2/+18
| | | | | | | | | a bitfield member doesn't lie within the bit bounds of the type itself, just leave it out so we don't get clang asserting and killing our IDE when it gets unhappy with the information. https://llvm.org/bugs/show_bug.cgi?id=27515 <rdar://problem/21082998> llvm-svn: 268110
* [Docs] Refer to the CMakePrimer from CMake docChris Bieneman2016-04-291-0/+4
| | | | | | The "Building LLVM with CMake" document should have a reference to the CMakePrimer. llvm-svn: 268109
* [ValueTracking] Make the code in lookThroughCastDavid Majnemer2016-04-291-16/+9
| | | | | | No functionality change is intended. llvm-svn: 268108
* [inliner]: Refactor inline deferring logic into its own method /NFCXinliang David Li2016-04-292-70/+82
| | | | | | | | The implemented heuristic has a large body of code which better sits in its own function for better readability. It also allows adding more heuristics easier in the future. llvm-svn: 268107
* Differential Revision: http://reviews.llvm.org/D19733Sriraman Tallam2016-04-298-22/+32
| | | | llvm-svn: 268106
* AMDGPU: Add kernarg.segment.ptr intrinsicMatt Arsenault2016-04-293-0/+30
| | | | llvm-svn: 268105
* [InstCombine] Determine the result of a select based on a dominating condition.Chad Rosier2016-04-293-1/+125
| | | | | | Differential Revision: http://reviews.llvm.org/D19550 llvm-svn: 268104
* Add the ability to determine whether a format string argument is of a double ↵Aaron Ballman2016-04-291-0/+4
| | | | | | type or not. This change is tested by clang-tidy in r268100. llvm-svn: 268103
* Fix commentMatt Arsenault2016-04-291-1/+1
| | | | llvm-svn: 268102
* Fix TestGetVariables.py so it works correctly. We had duplicate static ↵Greg Clayton2016-04-291-1/+9
| | | | | | values showing up as we would find static variables in the Block and also in the compile unit. We now make sure a variable hasn't been added to the list before we add it. llvm-svn: 268101
* Add a clang-tidy check that flags string-to-number conversion functions that ↵Aaron Ballman2016-04-298-0/+452
| | | | | | | | have insufficient error checking, suggesting a better alternative. This check corresponds to: https://www.securecoding.cert.org/confluence/display/c/ERR34-C.+Detect+errors+when+converting+a+string+to+a+number llvm-svn: 268100
* [InstCombine] clean up; NFCSanjay Patel2016-04-291-1/+1
| | | | llvm-svn: 268099
* Make sure LLDB can deal with forward declarations to enums without crashing ↵Greg Clayton2016-04-294-19/+50
| | | | | | | | or asserting. <rdar://problem/23776428> llvm-svn: 268098
* [asan] Assert in __sanitizer_ptr_{sub,cmp} if one of the pointers was freed.Filipe Cabecinhas2016-04-294-9/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This (partially) implements the check mentioned at http://kristerw.blogspot.co.uk/2016/04/dangling-pointers-and-undefined-behavior.html (via John Regehr) Quoting: "That the behavior is undefined follows from C11 6.2.4 "Storage durations of objects" The lifetime of an object is the portion of program execution during which storage is guaranteed to be reserved for it. An object exists, has a constant address, and retains its last-stored value throughout its lifetime. If an object is referred to outside of its lifetime, the behavior is undefined. The value of a pointer becomes indeterminate when the object it points to (or just past) reaches the end of its lifetime. and 7.22.3 "Memory management functions" that says that free ends the lifetime of objects The lifetime of an allocated object extends from the allocation until the deallocation. " We can probably implement this for stack variables too, but I think this is a good start to see if there's interest in this check. We can also hide this behind a flag, too. Reviewers: samsonov, kcc, rsmith, regehr Subscribers: kubabrecka, llvm-commits Differential Revision: http://reviews.llvm.org/D19691 llvm-svn: 268097
* [Docs] Add CMake Primer documentChris Bieneman2016-04-292-0/+466
| | | | | | | | This document is intended to provide a basic overview of the CMake scripting language for LLVM developers. It was unorthodoxly reviewed for accuracy and content on the CMake developer list: http://public.kitware.com/pipermail/cmake-developers/2016-April/028300.html llvm-svn: 268096
* AMDGPU/SI: Move post regalloc run of SIShrinkInstructionsMatt Arsenault2016-04-291-5/+1
| | | | | | | | Move to addPreEmitPass. This is so it runs after post-RA scheduling so we can merge s_nops emitted by the scheduler and hazard recognizer. llvm-svn: 268095
* DAGCombiner: Reduce truncated shl widthMatt Arsenault2016-04-2921-278/+433
| | | | llvm-svn: 268094
* Fix some Include What You Use warnings; other minor fixes.Eugene Zelenko2016-04-293-19/+53
| | | | | | Differential revision: http://reviews.llvm.org/D19735 llvm-svn: 268093
* [libFuzzer] fix docsKostya Serebryany2016-04-291-3/+3
| | | | llvm-svn: 268092
* Method Pool in modules: we make sure that if a module contains an entry forManman Ren2016-04-2915-0/+94
| | | | | | | | | | | | | | | a selector, the entry should be complete, containing everything introduced by that module and all modules it imports. Before writing out the method pool of a module, we sync up the out of date selectors by pulling in methods for the selectors, from all modules it imports. In ReadMethodPool, after pulling in the method pool entry for module A, this lets us skip the modules that module A imports. rdar://problem/25900131 llvm-svn: 268091
* Use the new path for coverage related headers and update CMakeLists.txtEaswaran Raman2016-04-292-3/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D19612 llvm-svn: 268090
* Move coverage related code into a separate library.Easwaran Raman2016-04-2918-20/+57
| | | | | | Differential Revision: http://reviews.llvm.org/D19333 llvm-svn: 268089
* [libFuzzer] enable detect_leaks=1, add proper docsKostya Serebryany2016-04-294-14/+25
| | | | llvm-svn: 268088
* [MemorySSA] Fix bugs in walker; refactor unittests a bit.George Burgess IV2016-04-292-31/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two somewhat related bugs in MemorySSA's caching walker. These bugs were found because D19695 brought up the problem that we'd have defs cached to themselves, which is incorrect. The bugs this fixes are: - We would sometimes skip the nearest clobber of a MemoryAccess, because we would query our cache for a given potential clobber before checking if the potential clobber is the clobber we're looking for. The cache entry for the potential clobber would point to the nearest clobber *of the potential clobber*, so if that was a cache hit, we'd ignore the potential clobber entirely. - There are times (sometimes in DFS, sometimes in the getClobbering... functions) where we would insert cache entries that say a def clobbers itself. There's a bit of common code between the fixes for the bugs, so they aren't split out into multiple commits. This patch also adds a few unit tests, and refactors existing tests a bit to reduce the duplication of setup code. llvm-svn: 268087
* [ValueTracking] matchSelectPattern needs to be more careful around FPDavid Majnemer2016-04-292-19/+57
| | | | | | | | | | | | matchSelectPattern attempts to see through casts which mask min/max patterns from being more obvious. Under certain circumstances, it would misidentify a sequence of instructions as a min/max because it assumed that folding casts would preserve the result. This is not the case for floating point <-> integer casts. This fixes PR27575. llvm-svn: 268086
* [MS] Make #pragma pack use PragmaStack<> class.Denis Zobnin2016-04-294-194/+66
| | | | | | | | | | | | | | | Make implementation of #pragma pack consistent with other "stack" pragmas. Use PragmaStack<> class instead of old representation of internal stack. Don't change compiler's behavior. TODO: 1. Introduce diagnostics on popping named slots from pragma stacks. Reviewer: rnk Differential revision: http://reviews.llvm.org/D19727 llvm-svn: 268085
* Fix crash in PDB when loading corrupt file.Zachary Turner2016-04-291-0/+7
| | | | | | | | | | There are probably hundreds of crashers we can find by fuzzing more. For now we do the simplest possible validation of the block size. Later, more complicated validations can verify that other fields of the super block such as directory size, number of blocks, agree with the size of the file etc. llvm-svn: 268084
* [fix] Fixed a bug where const this would cause parser errors about $__lldb_expr.Sean Callanan2016-04-298-10/+52
| | | | | | | | | | | | | | | | | | | In templated const functions, trying to run an expression would produce the error error: out-of-line definition of '$__lldb_expr' does not match any declaration in 'foo' member declaration does not match because it is const qualified error: 1 error parsing expression which is no good. It turned out we don't actually need to worry about "const," we just need to be consistent about the declaration of the expression and the FunctionDecl we inject into the class for "this." Also added a test case. <rdar://problem/24985958> llvm-svn: 268083
* Fix crash in BuildCXXDefaultInitExpr.Reid Kleckner2016-04-292-2/+21
| | | | | | | | | | | Fix crash in BuildCXXDefaultInitExpr when member of template class has same name as the class itself. Based on patch by Raphael "Teemperor" Isemann! Differential Revision: http://reviews.llvm.org/D19721 llvm-svn: 268082
* [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFCHubert Tong2016-04-295-16/+19
| | | | | | | | | | | | | | Summary: Prepare to store requires-clause expression for access via TemplateParameterList. Reviewers: aaron.ballman, faisalv, rsmith Subscribers: cfe-commits, nwilson Differential Revision: http://reviews.llvm.org/D19220 llvm-svn: 268081
* Fix typo in test.Rui Ueyama2016-04-291-1/+1
| | | | llvm-svn: 268080
* Add boost-use-to-stringPiotr Padlewski2016-04-2913-1/+353
| | | | | | http://reviews.llvm.org/D18136 llvm-svn: 268079
* [Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABIChris Bieneman2016-04-292-0/+5
| | | | | | | | | | | | Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build. Reviewers: t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D19693 llvm-svn: 268078
* Be sure to always increment the Versym pointer.Rafael Espindola2016-04-293-3/+27
| | | | | | | It was getting out of sync if we had undefined symbols at the start of the symbol table. llvm-svn: 268077
* small reformat to test accessPiotr Padlewski2016-04-291-27/+27
| | | | llvm-svn: 268076
* Improve test coverage of -Wdouble-promotionRobert Lougher2016-04-291-1/+41
| | | | | | | | | | This patch adds coverage for additional cases where implicit conversion can occur (assignment and return). It also adds tests for some cases where a warning should occur but none is produced. These are marked as FIXME. Differential Revision: http://reviews.llvm.org/D16298 llvm-svn: 268075
* Use SelectionDAG::getTargetConstant* helper functions. NFC.Simon Pilgrim2016-04-291-4/+4
| | | | | | Instead of SelectionDAG::getConstant directly to make it more obvious that we're creating target constants. llvm-svn: 268074
* [AMDGPU][llvm-mc] Add some missing testcases to trap.sArtem Tamazov2016-04-291-0/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D19602 llvm-svn: 268073
* Put PDB parsing code into a pdb namespace.Zachary Turner2016-04-2923-114/+141
| | | | llvm-svn: 268072
* Refactor the PDB Stream reading interface.Zachary Turner2016-04-2916-137/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is that PDB has the notion of streams and substreams. Substreams often consist of variable length structures that are convenient to be able to treat as guaranteed, contiguous byte arrays, whereas the streams they are contained in are not necessarily so, as a single stream could be spread across many discontiguous blocks. So, when processing data from a substream, we want to be able to assume that we have a contiguous byte array so that we can cast pointers to variable length arrays and such. This leads to the question of how to be able to read the same data structure from either a stream or a substream using the same interface, which is where this patch comes in. We separate out the stream's read state from the underlying representation, and introduce a `StreamReader` class. Then we change the name of `PDBStream` to `MappedBlockStream`, and introduce a second kind of stream called a `ByteStream` which is simply a sequence of contiguous bytes. Finally, we update all of the std::vectors in `PDBDbiStream` to use `ByteStream` instead as a proof of concept. llvm-svn: 268071
OpenPOWER on IntegriCloud