summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Driver: Enable address-significance tables by default when targeting COFF.Peter Collingbourne2018-08-232-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D51049 llvm-svn: 340552
* XFAIL test for older versions of dsymutilAdrian Prantl2018-08-231-0/+1
| | | | llvm-svn: 340550
* [RegisterCoalescer] Fix for assert in removePartialRedundancyTim Renouf2018-08-232-0/+213
| | | | | | | | | | | | | | | | | Summary: I got "Use not jointly dominated by defs" when removePartialRedundancy attempted to prune then re-extend a subrange whose only liveness was a dead def at the copy being removed. V2: Removed junk from test. Improved comment. V3: Addressed minor review comments. Subscribers: MatzeB, qcolombet, nhaehnle, llvm-commits Differential Revision: https://reviews.llvm.org/D50914 Change-Id: I6f894e9f517f71e921e0c6d81d28c5f344db8dad llvm-svn: 340549
* lldbtest.py: Work around macOS SIP when testing ASANified builds.Adrian Prantl2018-08-231-0/+20
| | | | llvm-svn: 340548
* [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr, ↵Shuai Wang2018-08-233-2/+59
| | | | | | | | | | | | CXXDependentScopeMemberExpr Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50617 llvm-svn: 340547
* [ValueTracking] Fix an assert from r340480.Craig Topper2018-08-231-1/+3
| | | | | | | | | | We need to allow ConstantExpr Selects in addition to SelectInst. I'll try to put together a test case, but I wanted to fix the issues being reported. Fixes PR38677 llvm-svn: 340546
* [llvm-mca] Fix wrong call to setCustomStrategy().Andrea Di Biagio2018-08-232-9/+9
| | | | | | | | | Thanks to @waltl for reporting this issue. I have also added an assert to check for invalid null strategy objects, and I have reworded a couple of code comments in Scheduler.h llvm-svn: 340545
* Comment out #define __cpp_lib_node_extract, we only support half of that ↵Erik Pilkington2018-08-231-1/+2
| | | | | | | | functionality Differential revision: https://reviews.llvm.org/D51172 llvm-svn: 340544
* Add libc++ data formatter for std::functionAdrian Prantl2018-08-235-38/+261
| | | | | | | | | | | | - Added LibcxxFunctionSummaryProvider - Removed LibcxxFunctionFrontEnd - Modified data formatter tests to test new summary functionality Patch by Shafik Yaghmour! Differential Revision: https://reviews.llvm.org/D50864 llvm-svn: 340543
* [OpenMP][libomptarget] Bringing up to spec with respect to ↵Alexandre Eichenberger2018-08-234-66/+174
| | | | | | | | | | | | | | | | | | OMP_TARGET_OFFLOAD env var Summary: Right now, only the OMP_TARGET_OFFLOAD=DISABLED was implemented. Added support for the other MANDATORY and DEFAULT values. Reviewers: gtbercea, ABataev, grokos, caomhin, Hahnfeld Reviewed By: Hahnfeld Subscribers: protze.joachim, gtbercea, AlexEichenberger, RaviNarayanaswamy, Hahnfeld, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D50522 llvm-svn: 340542
* Re-land [ASTImporter] Add test for ObjCAtTryStmt/ObjCAtCatchStmt/ObjCAtThrowStmtRaphael Isemann2018-08-232-0/+71
| | | | | | | Lands r340468 again, but this time we mark the test as unsupported on Windows because it seems that try/catch crashes CodeGen at the moment. llvm-svn: 340541
* [x86] add debug option for and-immediate shrinkingSanjay Patel2018-08-231-1/+5
| | | | | | | | | | | | The commit that added this functionality: rL322957 may be causing/exposing a miscompile in PR38648: https://bugs.llvm.org/show_bug.cgi?id=38648 so allow enabling/disabling to make debugging easier. llvm-svn: 340540
* [clangd] Check for include overlapping looks for only the line now.Kadir Cetinkaya2018-08-232-3/+5
| | | | | | | | | | | | | | | | Summary: Currently we match an include only if we are inside filename, with this patch we will match whenever we are on the starting line of the include. Reviewers: ilya-biryukov, hokein, ioeric Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51163 llvm-svn: 340539
* [InstCombine] Fold Select with binary op - FP opcodesDavid Bolvansky2018-08-232-41/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Follow up for https://reviews.llvm.org/rL339520 and https://reviews.llvm.org/rL338300 Alive: ``` %A = fcmp oeq float %x, 0.0 %B = fadd nsz float %x, %z %C = select i1 %A, float %B, float %y => %C = select i1 %A, float %z, float %y ---------- %A = fcmp oeq float %x, 0.0 %B = fadd nsz float %x, %z %C = select %A, float %B, float %y => %C = select %A, float %z, float %y Done: 1 Optimization is correct %A = fcmp une float %x, -0.0 %B = fadd nsz float %x, %z %C = select i1 %A, float %y, float %B => %C = select i1 %A, float %y, float %z ---------- %A = fcmp une float %x, -0.0 %B = fadd nsz float %x, %z %C = select %A, float %y, float %B => %C = select %A, float %y, float %z Done: 1 Optimization is correct ``` Reviewers: spatel, lebedev.ri Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50714 llvm-svn: 340538
* [FunctionAttrs] Infer WriteOnly Function AttributeBrian Homerding2018-08-233-14/+44
| | | | | | | | | | | | These changes expand the FunctionAttr logic in order to mark functions as WriteOnly when appropriate. This is done through an additional bool variable and extended logic. Reviewers: hfinkel, jdoerfert Differential Revision: https://reviews.llvm.org/D48387 llvm-svn: 340537
* [llvm-mca] Allow the definition of custom strategies for selecting processor ↵Andrea Di Biagio2018-08-232-124/+182
| | | | | | | | | | | | | | | | | | | | | | | | | resource units. With this patch, users can now customize the pipeline selection strategy for scheduler resources. The resource selection strategy can be defined at processor resource granularity. This enables the definition of different strategies for different hardware schedulers. To override the strategy associated with a processor resource, users can call method ResourceManager::setCustomStrategy(), and pass a 'ResourceStrategy' object in input. Class ResourceStrategy is an abstract class which declares virtual method `ResourceStrategy::select()`. Method select() is meant to implement the actual strategy; it is responsible for picking the next best resource from a set of available pipeline resources. Custom strategy must simply override that method. By default, processor resources are associated with instances of 'DefaultResourceStrategy'. A 'DefaultResourceStrategy' internally implements a simple round-robin selector. For more details, please refer to the code comments in Scheduler.h. llvm-svn: 340536
* [analyzer] added cache for SMT queries in the SMTConstraintManagerMikhail R. Gadelha2018-08-231-24/+30
| | | | | | | | | | | | | | | | | | | Summary: This patch implements a new cache for the result of SMT queries; with this patch the regression tests are 25% faster. It's implemented as a `llvm::DenseMap` where the key is the hash of the set of the constraints in a state. There is still one method that does not use the cache, `getSymVal`, because it needs to get a symbol interpretation from the SMT, which is not cached yet. Reviewers: NoQ, george.karpenkov Reviewed By: george.karpenkov Subscribers: xazax.hun, szepet, a.sidorin, Szelethus Differential Revision: https://reviews.llvm.org/D50773 llvm-svn: 340535
* [analyzer] Moved all CSA code from the SMT API to a new header, `SMTConv.h`. ↵Mikhail R. Gadelha2018-08-235-731/+804
| | | | | | | | | | | | | | | | | | | | | NFC. Summary: With this patch, the SMT backend is almost completely detached from the CSA. Unfortunate consequence is that we missed the `ConditionTruthVal` from the CSA and had to use `Optional<bool>`. The Z3 solver implementation is still in the same file as the `Z3ConstraintManager`, in `lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp` though, but except for that, the SMT API can be moved to anywhere in the codebase. Reviewers: NoQ, george.karpenkov Reviewed By: george.karpenkov Subscribers: xazax.hun, szepet, a.sidorin, Szelethus Differential Revision: https://reviews.llvm.org/D50772 llvm-svn: 340534
* [analyzer] Templatefy SMTConstraintManager so more generic code can be moved ↵Mikhail R. Gadelha2018-08-234-249/+206
| | | | | | | | | | | | | | | | | | | from solver specific implementations. NFC. Summary: By making SMTConstraintManager a template and passing the SMT constraint type and expr, we can further move code from the Z3ConstraintManager class to the generic SMT constraint Manager. Now, each SMT specific constraint manager only needs to implement the method `bool canReasonAbout(SVal X) const`. Reviewers: NoQ, george.karpenkov Reviewed By: george.karpenkov Subscribers: mgorny, xazax.hun, szepet, a.sidorin, Szelethus Differential Revision: https://reviews.llvm.org/D50770 llvm-svn: 340533
* [analyzer] Delete SMTContext. NFC.Mikhail R. Gadelha2018-08-232-34/+2
| | | | | | | | | | | | | | Summary: There is no reason to have a base class for a context anymore as each SMT object carries a reference to the specific solver context. Reviewers: NoQ, george.karpenkov, hiraditya Reviewed By: hiraditya Subscribers: hiraditya, xazax.hun, szepet, a.sidorin, Szelethus Differential Revision: https://reviews.llvm.org/D50768 llvm-svn: 340532
* Change dyn_cast<CXXMethodDecl>(FD) to isa<CXXMethodDecl>(FD) [NFC]Mikael Holmen2018-08-231-1/+1
| | | | | | The result of the dyn_cast wasn't used to we can just check isa. llvm-svn: 340531
* [clangd] Suggest code-completions for overriding base class virtual methods.Kadir Cetinkaya2018-08-232-9/+125
| | | | | | | | | | | | | | | | | Summary: Whenever a code-completion is triggered within a class/struct/union looks at base classes and figures out non-overriden virtual functions. Than suggests completions for those. Reviewers: ilya-biryukov, hokein, ioeric Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50898 llvm-svn: 340530
* [GVN] Invalidate cached info for phis when setting dead predecessors to undefJohn Brawn2018-08-232-0/+40
| | | | | | | | | | When GVN sets the incoming value for a phi to undef because the incoming block is unreachable it needs to also invalidate the cached info for that phi in MemoryDependenceAnalysis, otherwise later queries will return stale information. Differential Revision: https://reviews.llvm.org/D51099 llvm-svn: 340529
* [DWARF] Unify warning callbacks. NFC.Victor Leschuk2018-08-235-37/+30
| | | | | | | | | | | | | | | | | Both DWARFDebugLine and DWARFDebugAddr used the same callback mechanism for handling recoverable errors. They both implemented similar warn() function to be used as such callbacks. In this revision we get rid of code duplication and move this warn() function to DWARFContext as DWARFContext::dumpWarning(). Reviewers: lhames, jhenderson, aprantl, probinson, dblaikie, JDevlieghere Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D51033 llvm-svn: 340528
* [clangd] Move function argument snippet disable mechanism from LSP rendering ↵Kadir Cetinkaya2018-08-232-57/+38
| | | | | | | | | | | | | | | | | | | to internal clangd reprensentation. Summary: We were handling the EnableFunctionArgSnippets only when we are producing LSP response. Move that code into CompletionItem generation so that internal clients can benefit from that as well. Reviewers: ilya-biryukov, ioeric, hokein Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51102 llvm-svn: 340527
* [SCCP] Remove unused variable added in r340525.Florian Hahn2018-08-231-1/+1
| | | | llvm-svn: 340526
* Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp ↵Florian Hahn2018-08-238-15/+158
| | | | | | | | | | | | | | | | | | | | | | instructions. This version of the patch fixes cleaning up ssa_copy intrinsics, so it does not crash for instructions in blocks that have been marked unreachable. This patch updates IPSCCP to use PredicateInfo to propagate facts to true branches predicated by EQ and to false branches predicated by NE. As a follow up, we should be able to extend it to also propagate additional facts about nonnull. Reviewers: davide, mssimpso, dberlin, efriedma Reviewed By: davide, dberlin Differential Revision: https://reviews.llvm.org/D45330 llvm-svn: 340525
* Removed unused variable [NFC]Mikael Holmen2018-08-231-1/+1
| | | | | | | | | | The compiler warned: ../tools/clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp:329:19: error: unused variable 'MD' [-Werror,-Wunused-variable] if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) { ^ 1 error generated. llvm-svn: 340524
* [clangd] Increase the timeouts in TUScheduler tests to 10 seconds.Ilya Biryukov2018-08-231-9/+9
| | | | | | | | Some of them timeout on our buildbots in certain configurations. The timeouts are there to avoid hanging indefinitely on deadlocks, so the exact number we put there does not matter. llvm-svn: 340523
* Update avr attributes test for output change in r340519Alexander Richardson2018-08-232-2/+2
| | | | | | | | After this commit there is an addrspace(1) before the attribute #. Since these tests are only checking the value of the attribute add a {{.*}} to make the test resilient to future output changes. llvm-svn: 340522
* [libclang] Fix cursors for arguments of Subscript and Call operatorsIvan Donchevskii2018-08-232-1/+215
| | | | | | | | | | | | | | | | | | The DeclRefExpr of CXXOperatorCallExpr refering to the custom operator is visited before the arguments to the operator call. For the Call and Subscript operator the range of this DeclRefExpr includes the whole call expression, so that all tokens in that range were mapped to the operator function, even the tokens of the arguments. Fix this by ensuring that this particular DeclRefExpr is visited last. Fixes PR25775. Fix by Nikolai Kosjar. Differential Revision: https://reviews.llvm.org/D40481 llvm-svn: 340521
* [Support] Fix some Wundef warningsSven van Haastregt2018-08-234-10/+10
| | | | | | | | | | For the _WIN32 macro, it is the definedness that matters rather than the value. Most uses of the macro already rely on the definedness. This commit fixes the few remaining uses that relied on the value. Differential Revision: https://reviews.llvm.org/D51105 llvm-svn: 340520
* Allow creating llvm::Function in non-zero address spacesAlexander Richardson2018-08-2323-118/+368
| | | | | | | | | | | | | | | | | | | | Most users won't have to worry about this as all of the 'getOrInsertFunction' functions on Module will default to the program address space. An overload has been added to Function::Create to abstract away the details for most callers. This is based on https://reviews.llvm.org/D37054 but without the changes to make passing a Module to Function::Create() mandatory. I have also added some more tests and fixed the LLParser to accept call instructions for types in the program address space. Reviewed By: bjope Differential Revision: https://reviews.llvm.org/D47541 llvm-svn: 340519
* TableGen/SearchableTables: Cast enums to unsigned in generated codeNicolai Haehnle2018-08-231-0/+9
| | | | | | | | | | | | | | | Summary: This should fix signedness warnings when compiling with MSVC. Change-Id: I4664cce0ba91e9b42d21a86fd4a7e82f2320c451 Reviewers: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51097 llvm-svn: 340518
* Fix comparison of char and int64 in TestWriteFixNegativeIntVitaly Buka2018-08-231-1/+1
| | | | | | It was broken on clang-ppc64le-linux-lnt bot. llvm-svn: 340517
* Initialize the address-significance table fragment's layout order.Peter Collingbourne2018-08-231-0/+1
| | | | | | | | | This fragment is created after layout, which is where the order normally gets set. Should fix a test failure under msan. llvm-svn: 340516
* [x86/retpoline] Split the LLVM concept of retpolines into separateChandler Carruth2018-08-2319-54/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subtarget features for indirect calls and indirect branches. This is in preparation for enabling *only* the call retpolines when using speculative load hardening. I've continued to use subtarget features for now as they continue to seem the best fit given the lack of other retpoline like constructs so far. The LLVM side is pretty simple. I'd like to eventually get rid of the old feature, but not sure what backwards compatibility issues that will cause. This does remove the "implies" from requesting an external thunk. This always seemed somewhat questionable and is now clearly not desirable -- you specify a thunk the same way no matter which set of things are getting retpolines. I really want to keep this nicely isolated from end users and just an LLVM implementation detail, so I've moved the `-mretpoline` flag in Clang to no longer rely on a specific subtarget feature by that name and instead to be directly handled. In some ways this is simpler, but in order to preserve existing behavior I've had to add some fallback code so that users who relied on merely passing -mretpoline-external-thunk continue to get the same behavior. We should eventually remove this I suspect (we have never tested that it works!) but I've not done that in this patch. Differential Revision: https://reviews.llvm.org/D51150 llvm-svn: 340515
* MC: Don't align COFF section contents.Peter Collingbourne2018-08-232-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Aligning section contents is not required, but only recommended, by the specification. Microsoft's documentation says (https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#section-table-section-headers): "For object files, the value should be aligned on a 4-byte boundary for best performance." However, according to my measurements, aligning section contents has a neutral to negative effect on performance. I measured the median run time of 100 links of Chromium's base_unittests on Linux with lld-link and on Windows with link.exe with both aligned and unaligned sections. On Linux I didn't see a measurable performance difference, and on Windows the link was slightly faster with unaligned sections (presumably because on Windows the bottleneck is I/O). Also, the sections created by cl.exe are unaligned, so we should expect tools to broadly accept unaligned sections. Differential Revision: https://reviews.llvm.org/D51149 llvm-svn: 340514
* Revert r340508: [DebugInfo] Fix bug in LiveDebugVariables.Chandler Carruth2018-08-233-71/+5
| | | | | | | | This patch's test case relies on debug prints which isn't generally an OK way to test stuff in LLVM and fails whenever asserts aren't enabled. I've send a heads-up to the commit and detailed comments on the review. llvm-svn: 340513
* [LibCalls] Added returned attribute to libcallsDavid Bolvansky2018-08-232-9/+22
| | | | | | | | | | | | Reviewers: efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51092 llvm-svn: 340512
* Missing quote in previous commitJF Bastien2018-08-231-1/+1
| | | | | | The test was failing because I missed a quote. llvm-svn: 340511
* Improve incompatible triple errorJF Bastien2018-08-231-1/+1
| | | | | | When complaining that the triple is incompatible with all targets, print out the triple not just a generic error about triples not matching. llvm-svn: 340510
* Improve incompatible triple errorJF Bastien2018-08-231-1/+1
| | | | | | When complaining that the triple is incompatible with all targets, print out the triple not just a generic error about triples not matching. llvm-svn: 340509
* [DebugInfo] Fix bug in LiveDebugVariables.Hsiangkai Wang2018-08-233-5/+71
| | | | | | | | | | | | | | | In lib/CodeGen/LiveDebugVariables.cpp, it uses std::prev(MBBI) to get DebugValue's SlotIndex. However, the previous instruction may be also a debug instruction. It could not use a debug instruction to query SlotIndex in mi2iMap. Scan all debug instructions and use the first debug instruction to query SlotIndex for following debug instructions. Only handle DBG_VALUE in handleDebugValue(). Differential Revision: https://reviews.llvm.org/D50621 llvm-svn: 340508
* Fix undefined behavior in r340457Scott Linder2018-08-231-3/+4
| | | | llvm-svn: 340507
* Add new .def file introduced for BinaryFormat/MsgPackDavid Blaikie2018-08-231-0/+1
| | | | | | Patch by Kristina Brooks! llvm-svn: 340506
* [WebAssembly] SIMD Bitwise binary arithmeticThomas Lively2018-08-232-0/+150
| | | | | | | | | | | | Summary: AND, OR, and XOR. This CL depends on D51113. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51136 llvm-svn: 340505
* [WebAssembly][NFC] Reorganize SIMD instructionsThomas Lively2018-08-231-135/+96
| | | | | | | | | | | | | | | Summary: Reorganize WebAssemblyInstrSIMD.td to put all of the instruction definitions together, making it easier to see which instructions have been implemented already. Depends on D51143. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51113 llvm-svn: 340504
* [WebAssembly][NFC] Move specific instruction formats to specific filesThomas Lively2018-08-235-117/+121
| | | | | | | | | | | | | | Summary: WebAssemblyInstrFormats.td retains only multiclasses that are used in multiple other tablegen files. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D51143 llvm-svn: 340503
* [analyzer] Preliminary version of retain count checking for OSObjectsGeorge Karpenkov2018-08-236-24/+279
| | | | | | | | Has quite a lot of false positives, disabled behind the flag. Differential Revision: https://reviews.llvm.org/D50880 llvm-svn: 340502
OpenPOWER on IntegriCloud