summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [ADCE] Add control dependence computationDavid Callahan2016-08-241-21/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is part of a serious of patches to evolve ADCE.cpp to support removing of unnecessary control flow. This patch adds the ability to compute control dependences using the iterated dominance frontier. We extend the liveness propagation to alternate between data and control dependences until convergences. Modify the pass manager intergation to compute the post-dominator tree needed for iterator dominance frontier. We still force all terminators live for now until we add code to handlinge removing control flow in a later patch. No changes to effective behavior with this patch Previous patches: D23225 [ADCE] Modify data structures to support removing control flow D23065 [ADCE] Refactor anticipating new functionality (NFC) D23102 [ADCE] Refactoring for new functionality (NFC) Reviewers: nadav, majnemer, mehdi_amini Subscribers: twoh, freik, llvm-commits Differential Revision: https://reviews.llvm.org/D23559 llvm-svn: 279594
* [stackmaps] Remove an unneeded member variable [NFC]Philip Reames2016-08-232-5/+3
| | | | llvm-svn: 279590
* [libFuzzer] fix link in docsKostya Serebryany2016-08-231-1/+1
| | | | llvm-svn: 279589
* [libFuzzer] collect 64 states for value profile, not 65Kostya Serebryany2016-08-231-1/+5
| | | | llvm-svn: 279588
* [libFuzzer] docs on value profileKostya Serebryany2016-08-231-0/+28
| | | | llvm-svn: 279587
* [stackmaps] More extraction of common code [NFCI]Philip Reames2016-08-236-24/+55
| | | | | | General cleanup before starting to work on the part I want to actually change. llvm-svn: 279586
* [LoopUnroll] By default disable unrolling when optimizing for size.Michael Zolotukhin2016-08-232-1/+9
| | | | | | | | | | | | | | | | | | | | | Summary: In clang commit r268509 we started to invoke loop-unroll pass from the driver even under -Os. However, we happen to not initialize optsize thresholds properly, which si fixed with this change. r268509 led to some big compile time regressions, because we started to unroll some loops that we didn't unroll before. With this change I hope to recover most of the regressions. We still are slightly slower than before, because we do some checks here and there in loop-unrolling before we bail out, but at least the slowdown is not that huge now. Reviewers: hfinkel, chandlerc Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D23388 llvm-svn: 279585
* Don't use "return {...}" to initialize a std::tuple. This has only been validRichard Smith2016-08-231-2/+2
| | | | | | | | | since 2015 (n4387), though it's allowed by a library DR so new implementations accept it in their C++11 modes... This should unbreak the build with libstdc++ 4.9. llvm-svn: 279583
* #ifdef out validation code when asserts are disabled to remove unused variableRichard Smith2016-08-231-0/+2
| | | | | | warnings. llvm-svn: 279582
* Remove unused data member to unbreak -Werror builds.Richard Smith2016-08-232-5/+1
| | | | llvm-svn: 279581
* Revert r279564. It introduces undefined behavior (binding a reference to aRichard Smith2016-08-2325-115/+171
| | | | | | | dereferenced null pointer) in MachineModuleInfo::MachineModuleInfo that causes -Werror builds (including several buildbots) to fail. llvm-svn: 279580
* GlobalISel: add some G_TRUNCs to make icmp test valid MIR.Tim Northover2016-08-231-11/+17
| | | | llvm-svn: 279579
* [InstCombine] use local variables for repeated values; NFCISanjay Patel2016-08-231-12/+9
| | | | llvm-svn: 279578
* [MC] Support .dc directives in assembler parserPetr Hosek2016-08-232-0/+67
| | | | | | | | | | While these directives are mostly aliases for the existing integer and float value directives, some of them like .dc.a have no direct equivalents and are sometimes being used for convenience. Differential Revision: https://reviews.llvm.org/D23810 llvm-svn: 279577
* [ThinLTO] Add caching to the new LTO APIMehdi Amini2016-08-238-35/+393
| | | | | | | | | | | | Add the ability to plug a cache on the LTO API. I tried to write such that a linker implementation can control the cache backend. This is intrusive and I'm not totally happy with it, but I can't figure out a better design right now. Differential Revision: https://reviews.llvm.org/D23599 llvm-svn: 279576
* [InstCombine] move foldICmpShrConstConst() contents to foldICmpShrConst(); NFCISanjay Patel2016-08-232-77/+65
| | | | | | | There will only be 3 lines of code in foldICmpShrConst() when the cleanup is done, so it doesn't make much sense to have a separate function for a single fold. llvm-svn: 279575
* [stackmaps] Extract out magic constants [NFCI]Philip Reames2016-08-233-6/+40
| | | | | | This is a first step towards clarifying the exact MI semantics of stackmap's "live values". llvm-svn: 279574
* MachineFunction: Introduce NoPHIs propertyMatthias Braun2016-08-2310-4/+52
| | | | | | | | | | | | | I want to compute the SSA property of .mir files automatically in upcoming patches. The problem with this is that some inputs will be reported as static single assignment with some passes claiming not to support SSA form. In reality though those passes do not support PHI instructions => Track the presence of PHI instructions separate from the SSA property. Differential Revision: https://reviews.llvm.org/D22719 llvm-svn: 279573
* GlobalISel: add forgotten test-case for G_ICMPTim Northover2016-08-231-0/+45
| | | | llvm-svn: 279569
* [InstCombine] remove icmp shr folds that are already handled by InstSimplifySanjay Patel2016-08-231-17/+3
| | | | | | | | AFAICT, these already worked in all cases for scalar types, and I enhanced the code to work for vector types in: https://reviews.llvm.org/rL279543 llvm-svn: 279568
* GlobalISel: make truncate/extend casts uniformTim Northover2016-08-2315-73/+100
| | | | | | | They really should have both types represented, but early variants were created before MachineInstrs could have multiple types so they're rather ambiguous. llvm-svn: 279567
* GlobalISel: legalize integer comparisons on AArch64.Tim Northover2016-08-235-3/+80
| | | | | | | Next step is doing both legalizations at the same time! Marvel at GlobalISel's cunning. llvm-svn: 279566
* GlobalISel: legalize conditional branches on AArch64.Tim Northover2016-08-235-1/+30
| | | | llvm-svn: 279565
* CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePassesMatthias Braun2016-08-2325-171/+115
| | | | | | | | | | | | | | | | | | | | | | | Re-apply this commit with the deletion of a MachineFunction delegated to a separate pass to avoid use after free when doing this directly in AsmPrinter. This patch removes the MachineFunctionAnalysis. Instead we keep a map from IR Function to MachineFunction in the MachineModuleInfo. This allows the insertion of ModulePasses into the codegen pipeline without breaking it because the MachineFunctionAnalysis gets dropped before a module pass. Peak memory should stay unchanged without a ModulePass in the codegen pipeline: Previously the MachineFunction was freed at the end of a codegen function pipeline because the MachineFunctionAnalysis was dropped; With this patch the MachineFunction is freed after the AsmPrinter has finished. Differential Revision: http://reviews.llvm.org/D23736 llvm-svn: 279564
* [ValueTracking] Use a function_ref to avoid multiple instantiationsDavid Majnemer2016-08-231-5/+5
| | | | | | | No functional change intended, this should just be a code size improvement. llvm-svn: 279563
* [SLP] Avoid signed integer overflowMatthew Simpson2016-08-232-9/+39
| | | | | | | | | | | | | | | | | | | The test case included with r279125 exposed an existing signed integer overflow. Since getTreeCost can return INT_MAX, we can't sum this cost together with other costs, such as getReductionCost. This patch removes the possibility of assigning a cost of INT_MAX. Since we were previously using INT_MAX as an indicator for "should not vectorize", we now explicitly check this condition with "isTreeTinyAndNotFullyVectorizable" before computing a cost. This patch adds a run-line to the test case used for r279125 that ensures we don't vectorize. Previously, this line would vectorize the test case by chance due to undefined behavior in the cost calculation. Differential Revision: https://reviews.llvm.org/D23723 llvm-svn: 279562
* Remove unused translation unit.Zachary Turner2016-08-232-14/+0
| | | | llvm-svn: 279561
* Update coding standards for include style.Zachary Turner2016-08-231-1/+11
| | | | | | | Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D23591 llvm-svn: 279560
* [LTO] Fix test following r279550Mehdi Amini2016-08-231-1/+1
| | | | | | | The output name changed, but it was passing locally using the old output still present in the build dir. llvm-svn: 279556
* GlobalISel: extend legalizer interface to handle multiple types.Tim Northover2016-08-236-84/+171
| | | | | | | | Instructions like G_ICMP have multiple types that may need to be legalized (the boolean output and nearly arbitrary inputs in this case). So the legalizer must be capable of deciding what to do for each of them separately. llvm-svn: 279554
* GlobalISel: mark pointer casts legal on AArch64.Tim Northover2016-08-232-0/+32
| | | | llvm-svn: 279553
* [ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)Mehdi Amini2016-08-232-0/+45
| | | | | | | | This adds a test for r279532, thanks David Li for noticing :) Recommit r279545 after committing first a dependent patch. llvm-svn: 279551
* Stop always creating and running an LTO compilation if there is not a single ↵Mehdi Amini2016-08-232-22/+14
| | | | | | | | | | | | | | | | | | | | LTO object Summary: I assume there was a use case, so maybe this strawman patch will help clarifying if it is legit. In any case the current situation is not legit: a ThinLTO compilation should not trigger an unexpected full LTO compilation. Right now, adding a --save-temps option triggers this and makes the number of output differs. Reviewers: tejohnson Subscribers: pcc, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23600 llvm-svn: 279550
* Revert "[ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is ↵Mehdi Amini2016-08-232-45/+0
| | | | | | | | enabled (NFC)" This reverts commit r279545, test is failing, my Output dir was dirty and making the test pass. llvm-svn: 279549
* GlobalISel: legalize 1-bit load/store and mark 8/16 bit variants legal on ↵Tim Northover2016-08-233-7/+113
| | | | | | AArch64. llvm-svn: 279548
* [ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)Mehdi Amini2016-08-232-0/+45
| | | | | | This adds a test for r279532, thanks David Li for noticing :) llvm-svn: 279545
* [CMake] [OCaml] Add -DLLVM_ENABLE_OCAMLDOC switchPeter Zotov2016-08-232-1/+2
| | | | | | Patch by Michael Gorny. llvm-svn: 279544
* [InstSimplify] allow icmp with constant folds for splat vectors, part 2Sanjay Patel2016-08-232-143/+97
| | | | | | | | | | | | Completes the m_APInt changes for simplifyICmpWithConstant(). Other commits in this series: https://reviews.llvm.org/rL279492 https://reviews.llvm.org/rL279530 https://reviews.llvm.org/rL279534 https://reviews.llvm.org/rL279538 llvm-svn: 279543
* Possible fix of test failures on win bots Xinliang David Li2016-08-231-3/+3
| | | | llvm-svn: 279542
* [InstSimplify] allow icmp with constant folds for splat vectors, part 1Sanjay Patel2016-08-232-10/+12
| | | | llvm-svn: 279538
* [SelectionDAG] Use a union of bitfield structs for SDNode::SubclassData.Justin Lebar2016-08-233-98/+140
| | | | | | | | | | | | | | | | | | Summary: This greatly simplifies our handling of SDNode::SubclassData. NFC, hopefully. :) See discussion in D23035 for discussion about the design API of these bitfields. Reviewers: chandlerc Subscribers: llvm-commits, rnk Differential Revision: https://reviews.llvm.org/D23036 llvm-svn: 279537
* [CodeGen] Convert a loop to a for-each loop. NFCJustin Lebar2016-08-231-7/+5
| | | | llvm-svn: 279536
* Fix some Clang-tidy modernize-use-using and Include What You Use warnings; ↵Eugene Zelenko2016-08-2313-93/+156
| | | | | | | | other minor fixes. Differential revision: https://reviews.llvm.org/D23789 llvm-svn: 279535
* [InstSimplify] add tests to show missing vector icmp foldsSanjay Patel2016-08-231-0/+238
| | | | llvm-svn: 279534
* [ThinLTO] Make sure the Context used for the ThinLTO backend has all the ↵Mehdi Amini2016-08-232-1/+3
| | | | | | | | | | | | | appropriate options An important performance setting on the LLVMContext for LTO is enableDebugTypeODRUniquing(), this adds an automatic merging of debug information in the context based on type ids. Also, the lto::Config includes a diagnostic handler that needs to be set on the Context, as well as the setDiscardValueNames() setting. llvm-svn: 279532
* [InstSimplify] move icmp with constant tests to another file; NFCSanjay Patel2016-08-232-165/+222
| | | | | | | | | | | ...because like the corresponding code, this is just too big to keep adding to. And the next step is to add a vector version of each of these tests to show missed folds. Also, auto-generate CHECK lines and add comments for the tests that correspond to the source code. llvm-svn: 279530
* Fix some more asserts after r279466.Pete Cooper2016-08-233-3/+3
| | | | | | | | | | | | | | | | That commit added a new version of Intrinsic::getName which should only be called when the intrinsic has no overloaded types. There are several debugging paths, such as SDNode::dump which are printing the name of the intrinsic but don't have the overloaded types. These paths should be ok to just print the name instead of crashing. The fix here is ultimately to just add a 'None' second argument as that calls the overload capable getName, which is less efficient, but this is a debugging path anyway, and not perf critical. Thanks to Björn Pettersson for pointing out that there were more crashes. llvm-svn: 279528
* [X86][SSE] Demonstrate inability to recognise that (v)cvtpd2dq & ↵Simon Pilgrim2016-08-231-0/+38
| | | | | | (v)cvttpd2dq intrinsics implicitly zeroes the upper half of the xmm llvm-svn: 279527
* [Hexagon] Packetize return value setup with the return instructionKrzysztof Parzyszek2016-08-232-3/+41
| | | | | | Commit r279241 unintentionally reverted that ability. llvm-svn: 279526
* Fix windows build failureXinliang David Li2016-08-231-1/+2
| | | | llvm-svn: 279525
OpenPOWER on IntegriCloud