summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* StringMap/DenseMap unittests: use piecewise_construct and ensure no copy occurs.Mehdi Amini2016-03-252-22/+22
| | | | | | | | This makes us no longer relying on move-construction elision by the compiler. Suggested by D. Blaikie. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264475
* Add a 'language cplusplus demangle' command. This can be useful to provide a ↵Enrico Granata2016-03-251-1/+89
| | | | | | low-friction reproduction for issues with the LLDB demangling of C++ symbols llvm-svn: 264474
* [Object] Make createMachOObjectFile return Expected<...> rather thanLang Hames2016-03-254-13/+10
| | | | | | ErrorOr<...>. llvm-svn: 264473
* Allow value forwarding past release fences in GVNPhilip Reames2016-03-253-0/+126
| | | | | | | | | | | | | | A release fence acts as a publication barrier for stores within the current thread to become visible to other threads which might observe the release fence. It does not require the current thread to observe stores performed on other threads. As a result, we can allow store-load and load-load forwarding across a release fence. We choose to be much more conservative about stores. In theory, nothing prevents us from shifting a store from after a release fence to before it, and then eliminating the preceeding (previously fenced) store. Doing this without actually moving the second store is likely also legal, but we chose to be conservative at this time. The LangRef indicates only atomic loads and stores are effected by fences. This patch chooses to be far more conservative then that. This is the GVN companion to http://reviews.llvm.org/D11434 which applied the same logic in EarlyCSE and has been baking in tree for a while now. Differential Revision: http://reviews.llvm.org/D11436 llvm-svn: 264472
* Don't warn on "use" of undefined inline function that isn't actually an ODRRichard Smith2016-03-253-18/+30
| | | | | | | | use. In order for this to fire, the function needed to be a templated function marked 'constexpr' and declared but not defined. This weird pattern appears in libstdc++'s alloc_traits.h. llvm-svn: 264471
* SelectionDAG: Remove arbitrary and bug-prone complexity from SDLocJustin Bogner2016-03-251-30/+10
| | | | | | | | | | | | | | | The implementation of SDLoc has an extra layer of indirection here for no particular reason, and was leading to problems where we were dereferencing pointers to SDNodes that had already been deleted so that we could get at the DebugLoc for a new SDNode. This is one of the errors that came up often in PR26808. Instead, we can just track the DebugLoc and IROrder directly. This makes the code both easier to understand and more correct. It's also basically NFC other than fixing a large number of places where we were reading the memory of deleted SDNodes. llvm-svn: 264470
* [Object] Make MachOObjectFile's constructor private, provide a static createLang Hames2016-03-252-31/+32
| | | | | | | | | | method instead. This is not quite a named constructor: Construction may fail, and MachOObjectFiles are usually passed by unique_ptr anyway, so create returns an Expected<std::unique_ptr<MachOObjectFile>>. llvm-svn: 264469
* Fix an issue with nested aliases where the help system wouldn't correctly ↵Enrico Granata2016-03-253-0/+23
| | | | | | | | track the fact that an alias is an alias to a dash-dash alias (and I hope I typed the word 'alias' enough times in this commit message :-) llvm-svn: 264468
* [Support] Add Error::errorForOutParameter helper.Lang Hames2016-03-252-0/+13
| | | | | | | | This helper method creates a pre-checked Error suitable for use as an out parameter in a constructor. This avoids the need to have the constructor check a known-good error before assigning to it. llvm-svn: 264467
* Store list of undefined-but-used objects in a deterministic order to fixRichard Smith2016-03-258-35/+36
| | | | | | | | non-deterministic diagnostics (and non-deterministic PCH files). Check these when building a module rather than serializing it; it's not reasonable for a module's use to be satisfied by a definition in the user of the module. llvm-svn: 264466
* [X86] Emit a proper ADJCALLSTACKDOWN in EmitLoweredTLSAddrDavid Majnemer2016-03-252-1/+30
| | | | | | | | | We forgot to add the second machine operand to our ADJCALLSTACKDOWN, resulting in crashes in PEI. This fixes PR27071. llvm-svn: 264465
* Delete dead variable.Richard Smith2016-03-251-3/+1
| | | | llvm-svn: 264464
* [analyzer] Add CIFIlter modeling to DeallocChecker.Devin Coughlin2016-03-253-11/+150
| | | | | | | | | | | | | | | | | | | | The -dealloc method in CIFilter is highly unusual in that it will release instance variables belonging to its *subclasses* if the variable name starts with "input" or backs a property whose name starts with "input". Subclasses should not release these ivars in their own -dealloc method -- doing so could result in an over release. Before this commit, the DeallocChecker would warn about missing releases for such "input" properties -- which could cause users of the analyzer to add over releases to silence the warning. To avoid this, DeallocChecker now treats CIFilter "input-prefixed" ivars as MustNotReleaseDirectly and so will not require a release. Further, it will now warn when such an ivar is directly released in -dealloc. rdar://problem/25364901 llvm-svn: 264463
* [MachineCopyPropagation] Expose more dead copies across instructions with ↵Jun Bum Lim2016-03-252-3/+81
| | | | | | | | | | | regmasks When encountering instructions with regmasks, instead of cleaning up all the elements in MaybeDeadCopies map, remove only the instructions erased. By keeping more instruction in MaybeDeadCopies, this change will expose more dead copies across instructions with regmasks. llvm-svn: 264462
* Prevent construction of cycle in DAG store mergeNirav Dave2016-03-255-52/+111
| | | | | | | | | | | | | | | | | | | | | When merging stores in DAGCombiner, add check to ensure that no dependenices exist that would cause the construction of a cycle in our DAG. This may happen if one store has a data dependence on another instruction (e.g. a load) which itself has a (chain) dependence on another store being merged. These stores cannot be merged safely and doing so results in a cycle that is discovered in LegalizeDAG. This test is only done in cases where Antialias analysis is used (UseAA) as non-AA store merge candidates will be merged logically after all loads which have been checked to not alias. Reviewers: ahatanak, spatel, niravd, arsenm, hfinkel, tstellarAMD, jyknight Subscribers: llvm-commits, tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D18336 llvm-svn: 264461
* Add files forgotten in r264452Tobias Grosser2016-03-256-0/+51
| | | | llvm-svn: 264460
* [libFuzzer] use fflush after every PrintfKostya Serebryany2016-03-251-0/+1
| | | | llvm-svn: 264459
* Remove useless and unused CrashRecoveryContext::getBacktrace(). This ↵Richard Smith2016-03-252-17/+1
| | | | | | function always returned an empty string. llvm-svn: 264458
* [InstSimplify] regenerate checks using a scriptSanjay Patel2016-03-2520-380/+670
| | | | | | | | | | | | | | I didn't notice any significant changes in the actual checks here; all of these tests already used FileCheck, so a script can batch update them in one shot. This commit is just to show the value of automating this process: We have uniform formatting as opposed to a mish-mash of check structure that changes based on individual prefs and the current fashion. This makes it simpler to update when we find a bug or make an enhancement. llvm-svn: 264457
* [RS4GC] Lower calls to @llvm.experimental.deoptimizeSanjoy Das2016-03-253-10/+53
| | | | | | | | | | | | | | This changes RS4GC to lower calls to ``@llvm.experimental.deoptimize`` to gc.statepoints wrapping ``__llvm_deoptimize``, and changes ``callsGCLeafFunction`` to recognize ``@llvm.experimental.deoptimize`` as a non GC leaf function. I've had to hard code the ``"__llvm_deoptimize"`` name in RewriteStatepointsForGC; since ``TargetLibraryInfo`` is available only during codegen. This isn't without precedent in the codebase, so I'm not overtly concerned. llvm-svn: 264456
* CodeGen: Don't iterate over operands after we've erased an MIJustin Bogner2016-03-251-13/+20
| | | | | | | | | | | This fixes a use-after-free introduced 3 years ago, in r182872 ;) The code more or less worked because the memory that CopyMI was pointing to happened to still be valid, but lots of tests would crash if you ran under ASAN with the recycling allocator changes from llvm.org/PR26808 llvm-svn: 264455
* ARM: maintain BB ordering when expanding WIN__DBZCHKSaleem Abdulrasool2016-03-253-26/+65
| | | | | | | | | | | | | It is possible to have a fallthrough MBB prior to MBB placement. The original addition of the BB would result in reordering the BB as not preceding the successor. Because of the fallthrough nature of the BB, we could end up executing incorrect code or even a constant pool island! Insert the spliced BB into the same location to avoid that. Thanks to Tim Northover for invaluable hints and Fiora for the discussion on what may have been occurring! llvm-svn: 264454
* [ASTMatchers] Don't use brace-init lists.Samuel Benzaquen2016-03-251-1/+1
| | | | | | | They are not supported everywhere yet. This fixes the MSVC build. llvm-svn: 264453
* Update to isl-0.16.1-145-g243bf7cTobias Grosser2016-03-2571-1115/+2766
| | | | | | | Just an import to keep track with the latest version of isl. We are not looking for specific features. llvm-svn: 264452
* [sanitizer] Add memset, memmove, and memcpy to the common interceptorsDerek Bruening2016-03-257-36/+78
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, sanitizer_common_interceptors.inc has an implicit, undocumented assumption that the sanitizer including it has previously declared interceptors for memset and memmove. Since the memset, memmove, and memcpy routines require interception by many sanitizers, we add them to the set of common interceptions, both to address the undocumented assumption and to speed future tool development. They are intercepted under a new flag intercept_intrin. The tsan interceptors are removed in favor of the new common versions. The asan and msan interceptors for these are more complex (they incur extra interception steps and their function bodies are exposed to the compiler) so they opt out of the common versions and keep their own. Reviewers: vitalybuka Subscribers: zhaoqin, llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D18465 llvm-svn: 264451
* [SetVector] Add erase() methodJun Bum Lim2016-03-253-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | This is a recommit of r264414 after fixing the buildbot failure caused by incompatible use of std::vector.erase(). The original message: Add erase() which returns an iterator pointing to the next element after the erased one. This makes it possible to erase selected elements while iterating over the SetVector : while (I != E) if (test(*I)) I = SetVector.erase(I); else ++I; Reviewers: qcolombet, mcrosier, MatzeB, dblaikie Subscribers: dberlin, dblaikie, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D18281 llvm-svn: 264450
* Fix now-ambiguous references to Error.Lang Hames2016-03-251-5/+5
| | | | llvm-svn: 264449
* Add title above the release notesTobias Grosser2016-03-251-0/+6
| | | | llvm-svn: 264448
* docs: Show two levels of content in index:Tobias Grosser2016-03-252-1/+1
| | | | llvm-svn: 264447
* docs: Describe Polly in the LLVM pass pipelineTobias Grosser2016-03-2510-0/+79
| | | | llvm-svn: 264446
* [ThinLTO] Rename edges() to calls() for clarity (NFC)Teresa Johnson2016-03-252-5/+5
| | | | | | Helps distinguish from refs() which iterates over non-call references. llvm-svn: 264445
* [ObjCXX] Warn undeclared identifiers.Manman Ren2016-03-253-2/+28
| | | | | | | | | | | | | | | | | | | | Instantiation dependence were not being handled correctly for OpqaueValueExpr AST nodes. As a result, if an undeclared identifier was used in a CXXNewExpr that is assigned to a ObjC property, there would be no error during parsing, and there would be a crash during code gen. This patch makes sure that an error will be issued during parsing in this case. Before the fix, if CXXNewExpr has a typo, its InstantiationDependent will be set to true, but if it is wrapped in a OpaqueValueExpr, the OpaqueValueExpr will not be instantiation dependent, causing the TypoExpr not be to resolved. The fix propagates InstantiationDependent to OpaqueValueExpr from its SourceExpr. It also propagates the other instantiation bits. rdar://24975562 Differential Revision: http://reviews.llvm.org/D18461 llvm-svn: 264444
* CodeGen: Fix a use-after-free in TIIJustin Bogner2016-03-251-2/+4
| | | | | | Found by ASAN with the recycling allocator changes from PR26808. llvm-svn: 264443
* AMDGPU: Fix a use-after free and a missing breakJustin Bogner2016-03-251-1/+2
| | | | | | | | | | | | | | | | We're erasing MI here, but then immediately using it again inside the `if`. This moves the erase after we're done using it. Doing that reveals a second problem though - this case is missing a break, so we fall through to the default and dereference MI again. This is obviously a bug, though I don't know how to write a test that triggers it - all we do in the error case is print some extra debug output. Both of these issue crash on lots of tests under ASAN with the recycling allocator changes from PR26808 applied. llvm-svn: 264442
* Remove declaration of SymbolTable::codegen, this method was deleted in r264091Reid Kleckner2016-03-251-1/+0
| | | | llvm-svn: 264441
* [X86] Use "and $0" and "orl $-1" to store 0 and -1 when optimizing for minsizeHans Wennborg2016-03-253-1/+101
| | | | | | | | | | | | 64-bit, 32-bit and 16-bit move-immediate instructions are 7, 6, and 5 bytes, respectively, whereas and/or with 8-bit immediate is only three bytes. Since these instructions imply an additional memory read (which the CPU could elide, but we don't think it does), restrict these patterns to minsize functions. Differential Revision: http://reviews.llvm.org/D18374 llvm-svn: 264440
* [coff] Accept and ignore another link.exe flag for compatibilityReid Kleckner2016-03-252-0/+2
| | | | | | | | | | | This flag disables link.exe's crash handler so that normal windows error reporting and crash dumping occurs. For now it is reasonable for LLD to ignore the flag. Chromium is currently using this flag to collect minidumps of link.exe crashing, and it breaks the LLD build. llvm-svn: 264439
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-5/+10
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264438
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-23/+42
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264437
* [Object] Remove empty private section from BinaryError.Lang Hames2016-03-251-1/+0
| | | | llvm-svn: 264436
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-2/+11
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264435
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-1/+10
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264434
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-7/+10
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264433
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-5/+12
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264432
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-1/+10
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264431
* [InstCombine] use FileCheck for better checkingSanjay Patel2016-03-251-6/+13
| | | | | | (testing script for autogeneration of check lines) llvm-svn: 264430
* Consider regmasks when computing register-based DBG_VALUE live rangesReid Kleckner2016-03-259-42/+194
| | | | | | | | | | | | | | Now register parameters that aren't saved to the stack or CSRs are considered dead after the first call. Previously the debugger would show whatever was in the register. Fixes PR26589 Reviewers: aprantl Differential Revision: http://reviews.llvm.org/D17211 llvm-svn: 264429
* [ASTMatchers] Fix build for VariadicFunction.Samuel Benzaquen2016-03-251-1/+1
| | | | | | | | Under some conditions the implicit conversion from array to ArrayRef<> is not working. Fix the build by making it explicit. llvm-svn: 264428
* [Kaleidoscope] Rename Error -> LogError in Chapters 2-5.Lang Hames2016-03-257-92/+92
| | | | | | | This keeps the naming consistent with Chapters 6-8, where Error was renamed to LogError in r264426 to avoid clashes with the new Error class in libSupport. llvm-svn: 264427
* [Kaleidoscope] Fix 'Error' name clashes.Lang Hames2016-03-255-103/+103
| | | | llvm-svn: 264426
OpenPOWER on IntegriCloud