summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove all variants of DWARFDie::getAttributeValueAs...() that had ↵Greg Clayton2017-01-115-210/+125
| | | | | | | | | | parameters that specified default values. Now we only support returning Optional<> values and have changed all clients over to use Optional::getValueOr(). Differential Revision: https://reviews.llvm.org/D28569 llvm-svn: 291686
* GlobalISel: only print debug info with -debug. NFC.Tim Northover2017-01-111-1/+1
| | | | | | Turns out DEBUG(...) has uses even inside NDEBUG checks. llvm-svn: 291685
* Revert rL291205 because it breaks Chrome tests under CFI.Ivan Krasin2017-01-119-164/+126
| | | | | | | | | | | | | | | | | | | | | Summary: Revert LowerTypeTests: Split the pass in two: a resolution phase and a lowering phase. This change separates how type identifiers are resolved from how intrinsic calls are lowered. All information required to lower an intrinsic call is stored in a new TypeIdLowering data structure. The idea is that this data structure can either be initialized using the module itself during regular LTO, or using the module summary in ThinLTO backends. Original URL: https://reviews.llvm.org/D28341 Reviewers: pcc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D28532 llvm-svn: 291684
* build_llvm_package.bat: Add note about what SWIG version to useHans Wennborg2017-01-111-0/+4
| | | | llvm-svn: 291682
* Unbreak the clang-fuzzer build after r291184.Benjamin Kramer2017-01-111-1/+1
| | | | llvm-svn: 291681
* Remove trailing whitespace. NFCI.Simon Pilgrim2017-01-111-3/+3
| | | | llvm-svn: 291680
* [MemDep] NFC variable name changePiotr Padlewski2017-01-111-3/+3
| | | | llvm-svn: 291679
* [ARM] Fix test CodeGen/ARM/fpcmp_ueq.ll broken by rL290616Evgeny Astigeevich2017-01-111-1/+5
| | | | | | | | | | | | Commit rL290616 (https://reviews.llvm.org/rL290616) changed a checking command for the triple arm-apple-darwin in LLVM::CodeGen/ARM/fpcmp_ueq.ll. As a result of the changes the test could fail for the valid generated code. These changes fixes the test to check only instructions we would expect. Differential Revision: https://reviews.llvm.org/D28159 llvm-svn: 291678
* builtins: support building ARM builtins for a HF targetSaleem Abdulrasool2017-01-1135-7/+179
| | | | | | | | | | | | | | The `-target` impacts the CC for the builtins. HF targets (with either floating point ABI) always use AAPCS VFP for the builtins unless they are AEABI builtins, in which case they use AAPCS. Non-HF targets (with either floating point ABI) always use AAPCS for the builtins and AAPCS for the AEABI builtins. This introduces the thunks necessary to switch CC for the floating point operations. This is not currently enabled, and should be dependent on the target being used to build compiler-rt. However, as a stop-gap, a define can be added for ASFLAGS to get the thunks. llvm-svn: 291677
* [lib/Object] - Introduce Decompressor class.George Rimar2017-01-114-66/+179
| | | | | | | | | | | | | Decompressor intention is to reduce duplication of code. Currently LLD has own implementation of decompressor for compressed debug sections. This class helps to avoid it and share the code. LLD patch for reusing it is D28106 Differential revision: https://reviews.llvm.org/D28105 llvm-svn: 291675
* Make the -b binary .data section rw.Rafael Espindola2017-01-112-2/+3
| | | | | | | This matches what bfd and gold do. It also matches the common flags of other .data sections. llvm-svn: 291674
* [SystemZ] Improve isFoldableMemAccessOffset().Jonas Paulsson2017-01-111-2/+20
| | | | | | | | | | | A store of an extracted element or a load which gets inserted into a vector, will be combined into a vector load/store element instruction. Therefore, isFoldableMemAccessOffset(), which is called by LSR, should return false in these cases. Reviewer: Ulrich Weigand llvm-svn: 291673
* [ELF] - Ignore R_386_NONE.George Rimar2017-01-112-0/+25
| | | | | | | | | | | | | | We had an error when met this relocation after latest changes aboult listing x86 relocations explicitly. Since we support R_X86_64_NONE, and GNU ld supports R_386_NONE, it seems reasonable to have. Differential revision: https://reviews.llvm.org/D28552 llvm-svn: 291672
* Make processing @llvm.assume more efficient - Add affected values to the ↵Hal Finkel2017-01-115-2/+158
| | | | | | | | | | | | | | | | | | | | | | | | assumption cache Here's my second try at making @llvm.assume processing more efficient. My previous attempt, which leveraged operand bundles, r289755, didn't end up working: it did make assume processing more efficient but eliminating the assumption cache made ephemeral value computation too expensive. This is a more-targeted change. We'll keep the assumption cache, but extend it to keep a map of affected values (i.e. values about which an assumption might provide some information) to the corresponding assumption intrinsics. This allows ValueTracking and LVI to find assumptions relevant to the value being queried without scanning all assumptions in the function. The fact that ValueTracking started doing O(number of assumptions in the function) work, for every known-bits query, has become prohibitively expensive in some cases. As discussed during the review, this is a pragmatic fix that, longer term, will likely be replaced by a more-principled solution (perhaps based on an extended SSA form). Differential Revision: https://reviews.llvm.org/D28459 llvm-svn: 291671
* X86 CodeGen: Optimized pattern for truncate with unsigned saturation.Elena Demikhovsky2017-01-113-0/+328
| | | | | | | | | DAG patterns optimization: truncate + unsigned saturation supported by VPMOVUS* instructions in AVX-512. And VPACKUS* instructions on SEE* targets. Differential Revision: https://reviews.llvm.org/D28216 llvm-svn: 291670
* [find-all-symbols] Index partial template specializations.Haojian Wu2017-01-112-4/+36
| | | | | | | | | | | | | | | Summary: Fix no std::function index. Previously, we don't index all the template specialization declarations of functions and classes (Because we assume that template functions/classes are indexed by their template declarations), but this is not always true in some cases like `std::function` which only has a partial template specialization declaration. Reviewers: ioeric, bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27920 llvm-svn: 291669
* [AMDGPU] Assembler: SDWA/DPP should not accept scalar registers and ↵Sam Kolton2017-01-117-40/+200
| | | | | | | | | | | | immediate operands Reviewers: artem.tamazov, nhaustov, vpykhtin, tstellarAMD Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye Differential Revision: https://reviews.llvm.org/D28157 llvm-svn: 291668
* Remove repeated word in comment (NFC)Malcolm Parsons2017-01-111-1/+1
| | | | llvm-svn: 291667
* Fix unused variable warningSimon Pilgrim2017-01-111-1/+1
| | | | llvm-svn: 291666
* [X86][AVX512BW] Vectorize v64i8 vector shiftsSimon Pilgrim2017-01-118-3118/+212
| | | | | | Differential Revision: https://reviews.llvm.org/D28447 llvm-svn: 291665
* Improve include fixer's ranking by taking the paths into account.Manuel Klimek2017-01-116-22/+66
| | | | | | | | | | | | | | | Instead of just using popularity, we also take into account how similar the path of the current file is to the path of the header. Our first approach is to get popularity into a reasonably small scale by taking log2 (which is roughly intuitive to how humans would bucket popularity), and multiply that with the number of matching prefix path fragments of the included header with the current file. Note that currently we do not take special care for unclean paths containing "../" or "./". Differential Revision: https://reviews.llvm.org/D28548 llvm-svn: 291664
* Fix line endingsSimon Pilgrim2017-01-114-421/+421
| | | | llvm-svn: 291663
* [PM] Separate the LoopAnalysisManager from the LoopPassManager and moveChandler Carruth2017-01-1144-266/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the latter to the Transforms library. While the loop PM uses an analysis to form the IR units, the current plan is to have the PM itself establish and enforce both loop simplified form and LCSSA. This would be a layering violation in the analysis library. Fundamentally, the idea behind the loop PM is to *transform* loops in addition to running passes over them, so it really seemed like the most natural place to sink this was into the transforms library. We can't just move *everything* because we also have loop analyses that rely on a subset of the invariants. So this patch splits the the loop infrastructure into the analysis management that has to be part of the analysis library, and the transform-aware pass manager. This also required splitting the loop analyses' printer passes out to the transforms library, which makes sense to me as running these will transform the code into LCSSA in theory. I haven't split the unittest though because testing one component without the other seems nearly intractable. Differential Revision: https://reviews.llvm.org/D28452 llvm-svn: 291662
* [PM] Take more drastic measures to work around MSVC's failure on thisChandler Carruth2017-01-111-7/+10
| | | | | | | code. If this doesn't work and I can't find someone to help who has MSVC installed, I'll back everything out I guess. =[ llvm-svn: 291661
* [X86] Fix PR30926 - Add patterns for (v)cvtsi2s{s,d} and (v)cvtsd2s{s,d}Elad Cohen2017-01-116-10/+220
| | | | | | | | | | | The code emiited by Clang's intrinsics for (v)cvtsi2ss, (v)cvtsi2sd, (v)cvtsd2ss and (v)cvtss2sd is lowered to a code sequence that includes redundant (v)movss/(v)movsd instructions. This patch adds patterns for optimizing these sequences. Differential revision: https://reviews.llvm.org/D28455 llvm-svn: 291660
* [X86] fixing failed test in commit: r291657 Mohammed Agabaria2017-01-111-0/+1
| | | | | | Missing Requires asserts. llvm-svn: 291659
* [ELF] - Explicitly list supported relocations for x86 target.George Rimar2017-01-113-1/+23
| | | | | | | | | | | | | | | | Previously some value was returned by default for relocations by getRelExpr(), even if relocation actually was not supported. This is orthogonal alternative to D28094. Instead of implementing probably useless R_386_PC8/R_386_8 relocations, this patch uses them in a testcase to demonstrate what happens when LLD mets unsupported relocations. Patch passes all testcases and changes logic only for x86. Differential revision: https://reviews.llvm.org/D28516 llvm-svn: 291658
* [X86] updating TTI costs for arithmetic instructions on X86\SLM arch.Mohammed Agabaria2017-01-1123-29/+616
| | | | | | | | | | | | updated instructions: pmulld, pmullw, pmulhw, mulsd, mulps, mulpd, divss, divps, divsd, divpd, addpd and subpd. special optimization case which replaces pmulld with pmullw\pmulhw\pshuf seq. In case if the real operands bitwidth <= 16. Differential Revision: https://reviews.llvm.org/D28104 llvm-svn: 291657
* [PM] Pull a lambda out of an argument into a named variable to try andChandler Carruth2017-01-111-6/+7
| | | | | | | get a little more clarity about the nature of the issue MSVC is having with this code. llvm-svn: 291656
* [PM] Another attempt to satisfy MSVC.Chandler Carruth2017-01-111-1/+1
| | | | llvm-svn: 291655
* [PM] Try to appease MSVC by explicitly disambiguating a member name asChandler Carruth2017-01-111-1/+1
| | | | | | a template. llvm-svn: 291654
* Only launch asynchronously if threading is enabled.Manuel Klimek2017-01-111-1/+6
| | | | llvm-svn: 291653
* [XRay] Define the library for XRay trace logsDean Michael Berris2017-01-1112-212/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In this change we move the definition of the log reading routines from the tools directory in LLVM to {include/llvm,lib}/XRay. We improve the documentation a little bit for the publicly accessible headers, and adjust the top-matter. This also leads to some refactoring and cleanup in the tooling code. In particular, we do the following: - Rename the class from LogReader to Trace, as it better represents the logical set of records as opposed to a log. - Use file type detection instead of asking the user to say what format the input file is. This allows us to keep the interface simple and encapsulate the logic of loading the data appropriately. In future changes we increase the API surface and write dedicated unit tests for the XRay library. Depends on D24376. Reviewers: dblaikie, echristo Subscribers: mehdi_amini, mgorny, llvm-commits, varno Differential Revision: https://reviews.llvm.org/D28345 llvm-svn: 291652
* [PM] Rewrite the loop pass manager to use a worklist and augmented runChandler Carruth2017-01-1134-387/+2015
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arguments much like the CGSCC pass manager. This is a major redesign following the pattern establish for the CGSCC layer to support updates to the set of loops during the traversal of the loop nest and to support invalidation of analyses. An additional significant burden in the loop PM is that so many passes require access to a large number of function analyses. Manually ensuring these are cached, available, and preserved has been a long-standing burden in LLVM even with the help of the automatic scheduling in the old pass manager. And it made the new pass manager extremely unweildy. With this design, we can package the common analyses up while in a function pass and make them immediately available to all the loop passes. While in some cases this is unnecessary, I think the simplicity afforded is worth it. This does not (yet) address loop simplified form or LCSSA form, but those are the next things on my radar and I have a clear plan for them. While the patch is very large, most of it is either mechanically updating loop passes to the new API or the new testing for the loop PM. The code for it is reasonably compact. I have not yet updated all of the loop passes to correctly leverage the update mechanisms demonstrated in the unittests. I'll do that in follow-up patches along with improved FileCheck tests for those passes that ensure things work in more realistic scenarios. In many cases, there isn't much we can do with these until the loop simplified form and LCSSA form are in place. Differential Revision: https://reviews.llvm.org/D28292 llvm-svn: 291651
* Revert r291645 "[DAGCombiner] Teach DAG combiner to fold (vselect (N0 xor ↵Craig Topper2017-01-114-348/+560
| | | | | | | | AllOnes), N1, N2) -> (vselect N0, N2, N1). Only do this if the target indicates its vector boolean type is ZeroOrNegativeOneBooleanContent." Some test appears to be hanging on the build bots. llvm-svn: 291650
* [LICM] Report failing to hoist conditionally-executed loadsAdam Nemet2017-01-112-6/+67
| | | | | | | | | | | | These are interesting again because the user may not be aware that this is a common reason preventing LICM. A const is removed from an instruction pointer declaration in order to pass it to ORE. Differential Revision: https://reviews.llvm.org/D27940 llvm-svn: 291649
* [LICM] Report failing to hoist a load with an invariant addressAdam Nemet2017-01-113-6/+85
| | | | | | | | | | | | | | | | | These are interesting because lack of precision in alias information could be standing in the way of this optimization. An example is the case in the test suite that I showed in the DevMeeting talk: http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/MultiSource/Benchmarks/FreeBench/distray/CMakeFiles/distray.dir/html/_org_test-suite_MultiSource_Benchmarks_FreeBench_distray_distray.c.html#L236 canSinkOrHoistInst is also used from LoopSink, which does not use opt-remarks so we need to take ORE as an optional argument. Differential Revision: https://reviews.llvm.org/D27939 llvm-svn: 291648
* Fix typo in commentAdam Nemet2017-01-111-1/+1
| | | | llvm-svn: 291647
* [LICM] Report successful hoist/sink/promotionAdam Nemet2017-01-1127-50/+161
| | | | | | Differential Revision: https://reviews.llvm.org/D27938 llvm-svn: 291646
* [DAGCombiner] Teach DAG combiner to fold (vselect (N0 xor AllOnes), N1, N2) ↵Craig Topper2017-01-114-560/+348
| | | | | | -> (vselect N0, N2, N1). Only do this if the target indicates its vector boolean type is ZeroOrNegativeOneBooleanContent. llvm-svn: 291645
* [Modules] Support #import when entering files with modulesBruno Cardoso Lopes2017-01-1125-9/+188
| | | | | | | | | | | | Textual headers and builtins that are #import'd from different modules should get re-entered when these modules are independent from each other. Differential Revision: https://reviews.llvm.org/D26267 rdar://problem/25881934 llvm-svn: 291644
* DAGCombiner: Add hasOneUse checks to fadd/fma combineMatt Arsenault2017-01-112-3/+268
| | | | | | | | Even with aggressive fusion enabled, this requires duplicating the fmul, or increases an fadd to another fma which is not an improvement. llvm-svn: 291642
* [Target] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-01-115-110/+143
| | | | | | other minor fixes (NFC). llvm-svn: 291641
* Re-commit r289955: [X86] Fold (setcc (cmp (atomic_load_add x, -C) C), COND) ↵Hans Wennborg2017-01-112-10/+86
| | | | | | | | | | | | | to (setcc (LADD x, -C), COND) (PR31367) This was reverted because it would miscompile code where the cmp had multiple uses. That was due to a deficiency in the existing code, which was fixed in r291630 (see the PR for details). This re-commit includes an extra test for the kind of code that got miscompiled: @test_sub_1_setcc_jcc. llvm-svn: 291640
* Follow-up for r291277: Add a return to silence GCC's "control reaches end of ↵Kuba Mracek2017-01-111-0/+1
| | | | | | non-void function" warning. llvm-svn: 291639
* Teach Polly's standalone build to work now that we include the gmockChandler Carruth2017-01-111-2/+13
| | | | | | component of gtest. llvm-svn: 291638
* Teach Polly's unittest macro to link LLVMDemangle which LLVMSupport nowChandler Carruth2017-01-111-1/+1
| | | | | | depends on... llvm-svn: 291637
* tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.NAKAMURA Takumi2017-01-113-3/+3
| | | | | | They are oriented from winsock and mingw doesn't import them. llvm-svn: 291636
* [analyzer] Fix crash in body farm for getter without implicit self.Devin Coughlin2017-01-112-0/+28
| | | | | | | | | | | | | | | | | Fix a crash in body farm when synthesizing a getter for a property synthesized for a property declared in a protocol on a class extension that shadows a declaration of the property in a category. In this case, Sema doesn't fill in the implicit 'self' parameter for the getter in the category, which leads to a crash when trying to synthesize the getter for it. To avoid the crash, skip getter synthesis in body farm if the self parameter is not filled int. rdar://problem/29938138 llvm-svn: 291635
* InstSimplify: Refactor function to use more switchesMatt Arsenault2017-01-111-38/+51
| | | | llvm-svn: 291634
OpenPOWER on IntegriCloud