summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* fix trivial typos, NFCHiroshi Inoue2017-07-012-2/+2
| | | | llvm-svn: 306952
* Revert "Revert "Replace trivial use of external rc.exe by writing our own ↵Eric Beckmann2017-07-012-11/+44
| | | | | | | | | | | | | | | | | | .res file."" Summary: This reverts commit 51931072a7c9a52540baf76fc30ef391d2529a2f. This revert was originally done because the integrations of the new WindowsResource library into LLD was causing error in chromium, due to bugs in how resource sections were handled. These bugs were fixed, meaning that the features may be reintegrated. Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D34922 llvm-svn: 306941
* [ObjectYAML] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-07-0111-136/+230
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 306925
* [Dominators] Reapply r306892, r306893, r306893.Jakub Kuderski2017-07-013-59/+134
| | | | | | | | | This reverts commit r306907 and reapplies the patches in the title. The patches used to make one of the CodeGen/ARM/2011-02-07-AntidepClobber.ll test to fail because of a missing null check. llvm-svn: 306919
* A little wordsmithing of dominator verification comments.Daniel Berlin2017-06-301-6/+6
| | | | llvm-svn: 306916
* Add comments on sibling and parent properties in dominator treesDaniel Berlin2017-06-301-0/+36
| | | | llvm-svn: 306913
* [ORE] Add diagnostics hotness thresholdBrian Gesiak2017-06-301-0/+9
| | | | | | | | | | | | | | | | | | | | Summary: Add an option to prevent diagnostics that do not meet a minimum hotness threshold from being output. When generating optimization remarks for large codebases with a ton of cold code paths, this option can be used to limit the optimization remark output at a reasonable size. Discussion of this change can be read here: http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html Reviewers: anemet, davidxl, hfinkel Reviewed By: anemet Subscribers: qcolombet, javed.absar, fhahn, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D34867 llvm-svn: 306912
* [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-06-3017-162/+181
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 306911
* Revert "[Dominators] Teach IDF to use level information"Jakub Kuderski2017-06-303-132/+60
| | | | | | | | | | | | | | This reverts commit r306894. Revert "[Dominators] Add NearestCommonDominator verification" This reverts commit r306893. Revert "[Dominators] Keep tree level in DomTreeNode and use it to find NCD and answer dominance queries" This reverts commit r306892. llvm-svn: 306907
* Rename and adjust processFixupValue.Rafael Espindola2017-06-301-5/+6
| | | | | | | It was not processing any value. All that it ever did was force relocations, so name it shouldForceRelocation. llvm-svn: 306906
* [Dominators] Teach IDF to use level informationJakub Kuderski2017-06-301-1/+0
| | | | | | | | | | | | | | Summary: This patch teaches IteratedDominanceFrontier to use the level information stored in DomTreeNodes instead of calculating it manually. Reviewers: dberlin, sanjoy, davide Reviewed By: davide Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D34703 llvm-svn: 306894
* [Dominators] Add NearestCommonDominator verificationJakub Kuderski2017-06-302-3/+44
| | | | | | | | | | | | | | | | Summary: This patch adds another verification function for checking correctness of findNearestCommonDominator. For every edge from U to V in the input graph, `NCD(U, V) == IDom(V) or V` -- the new function checks this condition. Reviewers: dberlin, sanjoy, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34575 llvm-svn: 306893
* [Dominators] Keep tree level in DomTreeNode and use it to find NCD and ↵Jakub Kuderski2017-06-302-58/+90
| | | | | | | | | | | | | | | | | | | | | answer dominance queries Summary: This patch makes DomTreeNodes keep their level (depth) in the DomTree. By having this information always available, it is possible to speedup and simplify findNearestCommonDominator and certain dominance queries. In the future, level information will be also needed to perform incremental updates. My testing doesn't show any noticeable performance differences after applying this patch. There may be some improvements when other passes are thought to use the level information. Reviewers: dberlin, sanjoy, chandlerc, grosser Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34548 llvm-svn: 306892
* [llvm-pdbutil] Output the symbol offset when dumping.Zachary Turner2017-06-304-2/+18
| | | | | | | | | | | | | | | | Type records have a unique type index, but symbol records do not. Instead, symbol records refer to other symbol records by referencing their offset in the symbol stream. In a sense this is the analogue of the TypeIndex, but we are not printing it in the dumper. Printing it not only gives us more useful information when manually investigating the contents of a PDB, but also allows us to write better tests by enabling us to verify that fields that reference other symbol records do so correctly. Differential Revision: https://reviews.llvm.org/D34906 llvm-svn: 306890
* [LV] Sink casts to unravel first order recurrenceAyal Zaks2017-06-301-3/+8
| | | | | | | | | | | Check if a single cast is preventing handling a first-order-recurrence Phi, because the scheduling constraints it imposes on the first-order-recurrence shuffle are infeasible; but they can be made feasible by moving the cast downwards. Record such casts and move them when vectorizing the loop. Differential Revision: https://reviews.llvm.org/D33058 llvm-svn: 306884
* Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTORRichard Smith2017-06-305-45/+74
| | | | | | | | | | | | | | | | | | | | | | | | This is a short-term fix for PR33650 aimed to get the modules build bots green again. Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR macros to try to locally specialize a global template for a global type. That's not how C++ works. Instead, we now centrally define how to format vectors of fundamental types and of string (std::string and StringRef). We use flow formatting for the former cases, since that's the obvious right thing to do; in the latter case, it's less clear what the right choice is, but flow formatting is really bad for some cases (due to very long strings), so we pick block formatting. (Many of the cases that were using flow formatting for strings are improved by this change.) Other than the flow -> block formatting change for some vectors of strings, this should result in no functionality change. Differential Revision: https://reviews.llvm.org/D34907 Corresponding updates to clang, clang-tools-extra, and lld to follow. llvm-svn: 306878
* GlobalISel: add G_IMPLICIT_DEF instruction.Tim Northover2017-06-302-0/+8
| | | | | | | | | It looks like there are two target-independent but not GISel instructions that need legalization, IMPLICIT_DEF and PHI. These are already anomalies since their operands have important LLTs attached, so to make things more uniform it seems like a good idea to add generic variants. Starting with G_IMPLICIT_DEF. llvm-svn: 306875
* [ORE] Remove old "diagnostic hotness" spellingBrian Gesiak2017-06-301-9/+0
| | | | | | | | | | | | | | | | | | | Summary: Depends on https://reviews.llvm.org/D34865. With the Clang uses of the old spelling having been removed in https://reviews.llvm.org/D34865, get rid of the old "diagnostic hotness" spellings in favor of the new "diagnostics hotness". Reviewers: anemet, davidxl Reviewed By: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34866 llvm-svn: 306866
* [InstCombine] Add m_BitReverse pattern match helper. NFCI.Simon Pilgrim2017-06-301-0/+5
| | | | llvm-svn: 306860
* Completely disable git/svn version checking if not needed.Rafael Espindola2017-06-301-18/+20
| | | | | | | | | | Working with git on a branch I find it really annoying that committing a change causes ninja to think that stuff needs to be rebuilt. With this change at least nothing in llvm needs to be rebuild when something is committed. llvm-svn: 306858
* Fix opt --help ordering of available optimizations.Erich Keane2017-06-301-5/+5
| | | | | | | | | | | | | | | Introduced in -r283004, the PassNameParser sorts Optimization options in reverse. This is because the commit replaced a compare function with "<" (which would seemingly be proper based on the name of the comparison function). The result is the 'true' result is converted to '1', which is inverted. This patch fixes this by replacing the '<' operator call on StringRef with a call to the StringRef compare function. It also renames the function to better reflect its meaning. Differential Revision: https://reviews.llvm.org/D34831 llvm-svn: 306857
* [llvm-pdbutil] Add the ability to dump the dependency tree for a typeZachary Turner2017-06-301-0/+2
| | | | | | | | | | | | | | | Previously we had the -type-index option which would dump the record of a single, but we had no way to follow the dependency graph backwards and also dump all dependent types. Having this option makes test-writing better, because we can limit the test to only those records that are of importance for the thing we're trying to test, which allows us to use things like CHECK-NEXT to reduce fragility. Differential Revision: https://reviews.llvm.org/D34899 llvm-svn: 306852
* [ORE] Unify spelling as "diagnostics hotness"Brian Gesiak2017-06-303-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: To enable profile hotness information in diagnostics output, Clang takes the option `-fdiagnostics-show-hotness` -- that's "diagnostics", with an "s" at the end. Clang also defines `CodeGenOptions::DiagnosticsWithHotness`. LLVM, on the other hand, defines `LLVMContext::getDiagnosticHotnessRequested` -- that's "diagnostic", not "diagnostics". It's a small difference, but it's confusing, typo-inducing, and frustrating. Add a new method with the spelling "diagnostics", and "deprecate" the old spelling. Reviewers: anemet, davidxl Reviewed By: anemet Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D34864 llvm-svn: 306848
* Remove unnecessary commented out argument. NFCI.Simon Pilgrim2017-06-301-1/+1
| | | | llvm-svn: 306824
* Revert of r306525: "Canonicalize clamp of float types to minmax"Nikolai Bozhenov2017-06-301-24/+0
| | | | llvm-svn: 306815
* [GlobalISel] Make multi-step legalization work.Kristof Beyls2017-06-301-5/+17
| | | | | | | | | | | | | | | | In r301116, a custom lowering needed to be introduced to be able to legalize 8 and 16-bit divisions on ARM targets without a division instruction, since 2-step legalization (WidenScalar from 8 bit to 32 bit, then Libcall the 32-bit division) doesn't work. This fixes this and makes this kind of multi-step legalization, where first the size of the type needs to be changed and then some action is needed that doesn't require changing the size of the type, straighforward to specify. Differential Revision: https://reviews.llvm.org/D32529 llvm-svn: 306806
* Remove the BBVectorize pass.Chandler Carruth2017-06-305-11/+1
| | | | | | | | | | | | | It served us well, helped kick-start much of the vectorization efforts in LLVM, etc. Its time has come and past. Back in 2014: http://lists.llvm.org/pipermail/llvm-dev/2014-November/079091.html Time to actually let go and move forward. =] I've updated the release notes both about the removal and the deprecation of the corresponding C API. llvm-svn: 306797
* [SCEV] Use depth limit instead of local cache for SExt and ZExtMax Kazantsev2017-06-301-14/+2
| | | | | | | | | | | | | | | | In rL300494 there was an attempt to deal with excessive compile time on invocations of getSign/ZeroExtExpr using local caching. This approach only helps if we request the same SCEV multiple times throughout recursion. But in the bug PR33431 we see a case where we request different values all the time, so caching does not help and the size of the cache grows enormously. In this patch we remove the local cache for this methods and add the recursion depth limit instead, as we do for arithmetics. This gives us a guarantee that the invocation sequence is limited and reasonably short. Differential Revision: https://reviews.llvm.org/D34273 llvm-svn: 306785
* [Dominators] Don't compute DFS InOut numbers eagerly.Jakub Kuderski2017-06-301-2/+0
| | | | | | | | | | | | | | | | | Summary: DFS InOut numbers currently get eagerly computer upon DomTree construction. They are only needed to answer dome dominance queries and they get invalidated by updates and recalculations. Because of that, it is faster in practice to compute them lazily when they are actually needed. Clang built without this patch takes 6m 45s to boostrap on my machine, and with the patch applied 6m 38s. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D34296 llvm-svn: 306778
* [Coverage] Remove two overloads of CoverageMapping::load. NFC.Vedant Kumar2017-06-301-11/+0
| | | | | | | | | | These overloads are essentially dead, and pose a maintenance cost without adding any benefit. This is coming up now because I'd like to experiment with changing the way we store coverage mapping data, and would rather not have to fix up the old overloads while doing so. Testing: check-{llvm,profile}, build clang. llvm-svn: 306776
* [WebAssembly] Add support for exception handling instructionsHeejin Ahn2017-06-301-0/+4
| | | | | | | | | | | | | | | | | | | Summary: This adds backend support for throw, rethrow, try, and try_end instructions. This needs the corresponding clang builtin support: https://reviews.llvm.org/D34783 This follows the Wasm exception handling proposal in https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md Reviewers: sunfish, dschuff Reviewed By: dschuff Subscribers: jfb, sbc100, jgravelle-google Differential Revision: https://reviews.llvm.org/D34826 llvm-svn: 306774
* Unified logic for computing target ABI in backend and front end by moving ↵Eric Christopher2017-06-301-0/+3
| | | | | | | | | | this common code to Support/TargetParser. Modeled Triple::GNU after front end code (aapcs abi) and updated tests that expect apcs abi. Based heavily on a patch by Ana Pazos! llvm-svn: 306768
* [GISel]: New Opcode G_FLOG/G_FLOG2Aditya Nandakumar2017-06-293-0/+22
| | | | | | https://reviews.llvm.org/D34837 llvm-svn: 306766
* Hook the sample PGO machinery in the new PMDehao Chen2017-06-292-1/+5
| | | | | | | | | | | | | | Summary: This patch hooks up SampleProfileLoaderPass with the new PM. Reviewers: chandlerc, davidxl, davide, tejohnson Reviewed By: chandlerc, tejohnson Subscribers: tejohnson, llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D34720 llvm-svn: 306763
* [DWARF] Added verification checks for the .apple_names section.Spyridoula Gravani2017-06-292-0/+15
| | | | | | | | This patch verifies the number of atoms, the validity of the form for each atom, as well as the validity of the hashdata. For hashdata, we're verifying that the hashdata offset is correct and that the offset in the .debug_info for each DIE in the hashdata is also valid. llvm-svn: 306735
* Remove `inline` keyword from inline `classof` methodsSam Clegg2017-06-2935-235/+233
| | | | | | | | | | | | | | | | | | | | | | The style guide states that the explicit `inline` should not be used with inline methods. classof is very common inline method with a fair amount on inconsistency: $ git grep classof ./include | grep inline | wc -l 230 $ git grep classof ./include | grep -v inline | wc -l 257 I chose to target this method rather the larger change since this method is easily cargo-culted (I did it at least once). I considered doing the larger change and removing all occurrences but that would be a much larger change. Differential Revision: https://reviews.llvm.org/D33906 llvm-svn: 306731
* [AliasSetTracker] Don't drop AA MD so eagerlyKeno Fischer2017-06-292-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: When we have patterns like loop: %la = load %ptr, !tbaa %lba = load %ptr, !tbaa !noalias AliasSetTracker would previously think that the two types of annotation for the pointer conflict, dropping both for the purpose of determining alias sets. That is clearly way too conservative, as the tbaa is still valid whether or not one of the memory accesses has additional AA metadata. We could go one step further and attempt to properly merge the AA metadata, but it's not clear that that would be worth it since that may introduce additional MD nodes, which may be undesirable since this is merely an Analysis. Reviewers: hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32139 llvm-svn: 306727
* Reverting r306695 while investigating failing test case.Alexandre Isoard2017-06-291-1/+0
| | | | | | | Failing test case: Transforms/LoopVectorize.iv_outside_user.ll llvm-svn: 306723
* [OrderedInst] Add const to constant parameter. NFCIXin Tong2017-06-291-1/+1
| | | | llvm-svn: 306717
* [Dominators] Rearrange access specifiers in DominatorTreeBaseJakub Kuderski2017-06-291-98/+94
| | | | | | | | | | | | | | | | | | Summary: This patch makes DominatorTreeBase more readable by putting most important members on top of the class. Before, the class looked like that: private -> protected (including data members) -> public -> protected. The patch changes it to: protected (data members only) -> public -> protected -> public. Reviewers: dberlin, sanjoy, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34527 llvm-svn: 306714
* [Dominators] Remove DominatorBase classJakub Kuderski2017-06-291-42/+19
| | | | | | | | | | | | | | | | | | | Summary: DominatorBase class was only used by DominatorTreeBase. It didn't provide any useful abstractions, nor simplified anything, so I see no point keeping it. This commit removes the DominatorBase class and moves its content into DominatorTreeBase. This is the first patch in a series that tries to make all DomTrees have a single virtual root, which will allow to further simplify code (especially when it comes to incremental updates). Reviewers: dberlin, sanjoy, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34493 llvm-svn: 306713
* [Dominators] Add parent and sibling property verification (non-hacky)Jakub Kuderski2017-06-293-16/+158
| | | | | | | | | | | | | | | | | | | Summary: This patch adds an additional level of verification - it checks parent and sibling properties of a tree. By definition, every tree with these two properties is a dominator tree. It is possible to run those check by running llvm with `-verify-dom-info=1`. Bootstrapping clang and building the llvm test suite with this option enabled doesn't yield any errors. Reviewers: dberlin, sanjoy, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34482 llvm-svn: 306711
* [ConstantHoisting] Avoid hoisting constants in GEPs that index into a struct ↵Leo Li2017-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | type. Summary: Indices for GEPs that index into a struct type should always be constants. This added more checks in `collectConstantCandidates:` which make sure constants for GEP pointer type are not hoisted. This fixed Bug https://bugs.llvm.org/show_bug.cgi?id=33538 Reviewers: ributzka, rnk Reviewed By: ributzka Subscribers: efriedma, llvm-commits, srhines, javed.absar, pirama Differential Revision: https://reviews.llvm.org/D34576 llvm-svn: 306704
* PredicateInfo: Use OrderedInstructions instead of our homemadeDaniel Berlin2017-06-291-4/+4
| | | | | | version. llvm-svn: 306703
* [DWARF] NFC: DWARFDataExtractor combines relocs with DataExtractor.Paul Robinson2017-06-2911-51/+82
| | | | | | | | | | | Requires callers to directly associate relocations with a DataExtractor used to read data from a DWARF section, which helps a callee not make assumptions about which section it is reading. This is the next step in reducing DWARFFormValue's dependence on DWARFUnit. Differential Revision: https://reviews.llvm.org/D34704 llvm-svn: 306699
* ScalarEvolution: Add URem supportAlexandre Isoard2017-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | In LLVM IR the following code: %r = urem <ty> %t, %b is equivalent to: %q = udiv <ty> %t, %b %s = mul <ty> nuw %q, %b %r = sub <ty> nuw %t, %q ; (t / b) * b + (t % b) = t As UDiv, Mul and Sub are already supported by SCEV, URem can be implemented with minimal effort this way. Note: While SRem and SDiv are also related this way, SCEV does not provides SDiv yet. llvm-svn: 306695
* [DAG] Fold FrameIndex offset into BaseIndexOffset analysis. NFCI.Nirav Dave2017-06-291-1/+1
| | | | | | | | | | | Relanding after restricting equalBaseIndex to not erroneuosly consider a FrameIndices stemming from alloca from being comparable as its offset is set post-selectionDAG. Pull FrameIndex comparision reasoning from DAGCombiner::isAlias to general BaseIndexOffset. llvm-svn: 306688
* Revert "r306529 - [X86] Correct dwarf unwind information in function epilogue"Daniel Jasper2017-06-296-72/+1
| | | | | | | | | | I am 99% sure that this breaks the PPC ASAN build bot: http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/3112/steps/64-bit%20check-asan/logs/stdio If it doesn't go back to green, we can recommit (and fix the original commit message at the same time :) ). llvm-svn: 306676
* [TargetTransformInfo, API] Add a list of operands to TTI::getUserCostEvgeny Astigeevich2017-06-292-7/+24
| | | | | | | | | | | | | | | | | | | | The changes are a result of discussion of https://reviews.llvm.org/D33685. It solves the following problem: 1. We can inform getGEPCost about simplified indices to help it with calculating the cost. But getGEPCost does not take into account the context which GEPs are used in. 2. We have getUserCost which can take the context into account but we cannot inform about simplified indices. With the changes getUserCost will have access to additional information as getGEPCost has. The one parameter getUserCost is also provided. Differential Revision: https://reviews.llvm.org/D34057 llvm-svn: 306674
* Recommit "[Support] Add RetryAfterSignal helper function"Pavel Labath2017-06-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The difference from the previous version is the use of decltype, as the implementation of std::result_of in libc++ did not work correctly for variadic function like open(2). Original summary: This function retries an operation if it was interrupted by a signal (failed with EINTR). It's inspired by the TEMP_FAILURE_RETRY macro in glibc, but I've turned that into a template function. I've also added a fail-value argument, to enable the function to be used with e.g. fopen(3), which is documented to fail for any reason that open(2) can fail (which includes EINTR). The main user of this function will be lldb, but there were also a couple of uses within llvm that I could simplify using this function. Reviewers: zturner, silvas, joerg Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33895 llvm-svn: 306671
OpenPOWER on IntegriCloud