summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[gn build] (manually) merge 68a235d07f9e70"Nico Weber2020-01-025-8/+12
| | | | | This reverts commit 6ff6d32ebfec3150aa462cd31042b5719edb84da, because 68a235d07f9e70 was reverted in e406cca5f9.
* [gn build] (manually) merge 24ab9b537e61b3Nico Weber2020-01-021-0/+1
|
* Generalize the pass registration mechanism used by Polly to any third-party toolserge_sans_paille2020-01-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | There's quite a lot of references to Polly in the LLVM CMake codebase. However the registration pattern used by Polly could be useful to other external projects: thanks to that mechanism it would be possible to develop LLVM extension without touching the LLVM code base. This patch has two effects: 1. Remove all code specific to Polly in the llvm/clang codebase, replaicing it with a generic mechanism 2. Provide a generic mechanism to register compiler extensions. A compiler extension is similar to a pass plugin, with the notable difference that the compiler extension can be configured to be built dynamically (like plugins) or statically (like regular passes). As a result, people willing to add extra passes to clang/opt can do it using a separate code repo, but still have their pass be linked in clang/opt as built-in passes. Differential Revision: https://reviews.llvm.org/D61446
* [gn build] (manually) merge 68a235d07f9e70Nico Weber2020-01-015-12/+8
|
* [Utils] Deal with occasionally deleted functionsJohannes Doerfert2019-12-311-4/+25
| | | | | | | | | | | | When functions exist for some but not all run lines we need to be careful when selecting the prefix. So far, a common prefix was potentially chosen as there was never a "conflict" that would have caused otherwise. With this patch we avoid common prefixes if they are used by run lines that do not emit the function. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68850
* [Utils] Reuse argument variable names in the bodyJohannes Doerfert2019-12-311-4/+4
| | | | | | | | | | If we have `int foo(int a) { return a; }` and we run with --function-signature enabled, we want a single variable declaration for `a` which is reused later. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D69722
* [Utils] Allow update_test_checks to scrub attribute annotationsJohannes Doerfert2019-12-312-1/+12
| | | | | | | | | Attribute annotations on calls, e.g., #0, are not useful on their own. This patch adds a flag to update_test_checks.py to scrub them. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68851
* TableGen: Fix assert on PatFrags with predicate codeMatt Arsenault2019-12-301-5/+21
| | | | | | | | This assumed a single pattern if there was a predicate. Relax this a bit, and allow multiple patterns as long as they have the same class. This was only broken for the DAG path. GlobalISel seems to have handled this correctly already.
* [Intrinsic] Delete tablegen rules of llvm.{sig,}{setjmp,longjmp}Fangrui Song2019-12-271-28/+0
|
* [gn build] Port eca40066ebbLLVM GN Syncbot2019-12-232-1/+1
|
* [find_interesting_reviews.py] Add git blame output cacheKristof Beyls2019-12-231-14/+57
| | | | | | | | | | | | | The majority of the running time of this script tends to be spent in running git blame on source files touched by patches under review. By introducing a git blame output cache, some of the git blame commands don't have to re-run, and the blame information can be retrieved from a cache. I've observed that in a typical run matching patches available for review with potential reviewers, this speeds up the script's running time by a factor of about 2.5x.
* [TableGen] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-225-10/+10
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71807
* [gn build] Port 7376d9eb389LLVM GN Syncbot2019-12-221-2/+6
|
* [gn build] fixup after c3d13d9c56Nico Weber2019-12-211-1/+1
|
* [gn build] fold Basic:version into BasicNico Weber2019-12-211-19/+5
| | | | | | | This now defines HAVE_VCS_VERSION_INC for all files in Basic, but now the BUILD.gn file has only a single "sources" field again, and the automerger requires that. Having the automerger work for clang/lib/Basic is a very nice to have, and the downside seems tiny.
* gn build: Silence mismatched-new-delete warning in scudo C++ wrapper tests.Peter Collingbourne2019-12-201-0/+4
| | | | | | | These tests are deliberately mismatching new and delete, so the warnings are just noise. Differential Revision: https://reviews.llvm.org/D71783
* [gn build] Port 82923c71efaLLVM GN Syncbot2019-12-201-0/+1
|
* Re-land "[cmake] Add dependency on llvm-dwarfdump to llvm-locstats"David Spickett2019-12-201-0/+4
| | | | This reverts commit f8e2ab3cd347cb7fb959ea0ece795f4eb347094c.
* [lit] Add "from .main import main" back into lit/__init__.pyJessica Paquette2019-12-191-0/+1
| | | | | | | | | | | | | | | A refactoring commit (cf252240) removed this line. Removing it broke installing lit with pip and setup.py. This adds the line back in so that we can install lit again. For an example of how this appeared, see: http://green.lab.llvm.org/green/job/LNT_Tests/5853/ File "/Users/buildslave/jenkins/...s/__init__.py", line 2453, in resolve raise ImportError(str(exc)) ImportError: 'module' object has no attribute 'main'
* [gn build] Port 3075cd5c9fcLLVM GN Syncbot2019-12-192-3/+2
|
* Revert "[cmake] Add dependency on llvm-dwarfdump to llvm-locstats"David Spickett2019-12-191-4/+0
| | | | | | This reverts commit ba430f503244d1498529d47f31090cdf79b5c231. Which appears to have caused a failure on the lld-x86_64-ubuntu-fast buildbot.
* [cmake] Add dependency on llvm-dwarfdump to llvm-locstatsDavid Spickett2019-12-191-0/+4
| | | | | | | | | | | | Though llvm-locstat is a "util" it requires llvm-dwarfdump to be useful. So what happens now is that unless LLVM_BUILD_TOOLS is ON llvm-locstats won't be part of the "all" target. However given that it requires llvm-dwarfdump, this is less confusing/build time consuming than suddenly having llvm-dwarfdump build when all other tools are disabled. Differential Revision: https://reviews.llvm.org/D71705
* [gn build] Port abc7f6800dfLLVM GN Syncbot2019-12-192-2/+3
|
* [cmake] Include the llvm-locstats target whenDavid Spickett2019-12-191-1/+1
| | | | | | | | | | | | | utils and tools are not being built. This was uncovered by: https://reviews.llvm.org/D71611 Which added llvm-locstats to the test dependencies. Previously the build target was only added if you were building tools. This meant that you couldn't configure at all if you had LLVM_BUILD_TOOLS=OFF. Differential revision: https://reviews.llvm.org/D71695
* [gn build] Update console print to match the commit message (NFC)Mehdi Amini2019-12-181-1/+1
|
* Tweak commit message for auto update of gn build scriptMehdi Amini2019-12-181-1/+1
| | | | | Use `[tag]` as a prefix and "port" instead of "merge" to avoid confusing with "git merge".
* gn build: Merge 9883d7edc65LLVM GN Syncbot2019-12-181-0/+1
|
* [globalisel] Small correction to the fixup in 0a0813962d6. The two ID's are ↵Daniel Sanders2019-12-181-2/+2
| | | | | | | not the same size The rule ID is a uint64_t as it has global scope but the UID is scoped to the rule and expected to be much smaller so it's only unsigned.
* [gicombiner] Import tryCombineIndexedLoadStore()Daniel Sanders2019-12-181-3/+4
| | | | | | | | | | | | | | | | | Summary: Now that arbitrary data is supported, import tryCombineIndexedLoadStore() Depends on D69147 Reviewers: bogner, volkan Reviewed By: volkan Subscribers: hiraditya, arphaman, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69151
* [globalisel] Attempt to fix ARM bots that emit the correct number in the ↵Daniel Sanders2019-12-181-4/+5
| | | | wrong place
* [gicombiner] Add support for arbitrary match data being passed from match to ↵Daniel Sanders2019-12-181-0/+83
| | | | | | | | | | | | | | | | | | | | | apply Summary: This is used by the extending_loads combine to tell the apply step which use is the preferred one to fold and the other uses should be re-written to consume. Depends on D69117 Reviewers: volkan, bogner Reviewed By: volkan Subscribers: hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69147
* gn build: Merge 7ea2e5195a8LLVM GN Syncbot2019-12-181-0/+6
|
* Revert "Temporarily Revert "[gicombiner] Add the MatchDag structure and ↵Daniel Sanders2019-12-1814-3/+1361
| | | | | | | | | | | | | | | | | | | parse instruction DAG's from the input"" This reverts commit e62e760f29567fe0841af870c65a4f8ef685d217. The issue @uweigand raised should have been fixed by iterating over the vector that owns the operand list data instead of the FoldingSet. The MSVC issue raised by @thakis should have been fixed by relaxing the regexes a little. I don't have a Windows machine available to test that so I tested it by using `perl -p -e 's/0x([0-9a-f]+)/\U\1\E/g' to convert the output of %p to the windows style. I've guessed at the issue @phosek raised as there wasn't enough information to investigate it. What I think is happening on that bot is the -debug option isn't available because the second stage build is a release build. I'm not sure why other release-mode bots didn't report it though.
* gn build: Merge 1ad15046dcfLLVM GN Syncbot2019-12-181-0/+3
|
* gn build: Merge e62e760f295LLVM GN Syncbot2019-12-181-6/+0
|
* Temporarily Revert "[gicombiner] Add the MatchDag structure and parse ↵Eric Christopher2019-12-1714-1361/+3
| | | | | | | | | | | | instruction DAG's from the input" and follow-on patches. This is breaking a few build bots and local builds with follow-up already on the patch thread. This reverts commits 390c8baa5440dda8907688d9ef860f6982bd925f and 520e3d66e7257c77f1226185504bbe1cb90afcfa.
* Fix buildbot failures after removing REQUIRES-ANYNemanja Ivanovic2019-12-171-10/+3
| | | | | | | It would appear that the removal of this lit feature was incomplete and there is a test case that still tests for this. This patch removes the remaining tests to bring the bots back to green. I would encourage the author to do a post-commit review on this in case there is a more desirable fix.
* [gicombiner] Process the MatchDag such that every node is reachable from the ↵Daniel Sanders2019-12-174-0/+93
| | | | | | | | | | | | | | | | | roots Summary: When we build the walk across these DAG's we need to be able to reach every node from the roots. Flip and traversal edges (so that use->def becomes def->uses) that make nodes unreachable. Note that early on we'll just error out on these flipped edges as def->uses edges are more complicated to match due to their one->many nature. Depends on D69077 Reviewers: volkan, bogner Subscribers: llvm-commits
* [lit] Fix internal diff newlines for -w/-bJoel E. Denny2019-12-175-3/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, without this patch: ``` $ python $LIT_BUILTINS/diff.py -b foo.txt bar.txt *** /tmp/foo.txt --- /tmp/bar.txt *************** *** 1,2 **** 1! 2--- 1,2 ---- 1! 20 ``` With this patch: ``` $ python $LIT_BUILTINS/diff.py -b foo.txt bar.txt *** /tmp/foo.txt --- /tmp/bar.txt *************** *** 1,2 **** 1 ! 2 --- 1,2 ---- 1 ! 20 ``` Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71577
* gn build: Merge 390c8baa544LLVM GN Syncbot2019-12-171-0/+6
|
* [gicombiner] Add the MatchDag structure and parse instruction DAG's from the ↵Daniel Sanders2019-12-1714-3/+1268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | input Summary: The MatchDag structure is a representation of the checks that need to be performed and the dependencies that limit when they can happen. There are two kinds of node in the MatchDag: * Instrs - Represent a MachineInstr * Predicates - Represent a check that needs to be performed (i.e. opcode, is register, same machine operand, etc.) and two kinds of edges: * (Traversal) Edges - Represent a register that can be traversed to find one instr from another * Predicate Dependency Edges - Indicate that a predicate requires a piece of information to be tested. For example, the matcher: (match (MOV $t, $s), (MOV $d, $t)) with MOV declared as an instruction of the form: %dst = MOV %src1 becomes the following MatchDag with the following instruction nodes: __anon0_0 // $t=getOperand(0), $s=getOperand(1) __anon0_1 // $d=getOperand(0), $t=getOperand(1) traversal edges: __anon0_1[src1] --[t]--> __anon0_0[dst] predicate nodes: <<$mi.getOpcode() == MOV>>:$__anonpred0_2 <<$mi.getOpcode() == MOV>>:$__anonpred0_3 and predicate dependencies: __anon0_0 ==> __anonpred0_2[mi] __anon0_0 ==> __anonpred0_3[mi] The result of this parse is currently unused but can be tested using -gicombiner-stop-after-parse as done in parse-match-pattern.td. The dump for testing includes a graphviz format dump to allow the rule to be viewed visually. Later on, these MatchDag's will be used to generate code and to build an efficient decision tree. Reviewers: volkan, bogner Reviewed By: volkan Subscribers: arsenm, mgorny, mgrang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69077
* [lit] Remove lit's REQUIRES-ANY directiveThomas Preud'homme2019-12-173-21/+0
| | | | | | | | | | | | | | | | | Summary: Remove REQUIRES-ANY alias lit directive since it is hardly used and can be easily implemented using an OR expression using REQUIRES. Fixup remaining testcases still using REQUIRES-ANY. Reviewers: probinson, jdenny, gparker42 Reviewed By: gparker42 Subscribers: eugenis, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, delcypher, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits, #sanitizers, llvm-commits Tags: #llvm, #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D71408
* [lit] [windows] Make sure to convert all path separators to backslashes in ↵Martin Storsjö2019-12-171-0/+4
| | | | | | | | | | | | NT style \\?\... paths E.g. the mingw python distributed in msys2 (the mingw one, which is a normal win32 application and doesn't use the msys2 runtime itself), despite being a normal win32 python, still uses forward slashes. This works fine for other cases (many, but not all), but when constructing a raw NT path, all path separators must be backslashes. Differential Revision: https://reviews.llvm.org/D71490
* gn build: Merge ec4749e3b8dLLVM GN Syncbot2019-12-171-1/+0
|
* gn build: Merge c066ff11d84LLVM GN Syncbot2019-12-171-0/+1
|
* [RISCV] Added isCompressibleInst() to estimate size in getInstSizeInBytes()Ana Pazos2019-12-161-69/+150
| | | | | | | | | | | | | | | | | | | Summary: Modified compression emitter tablegen backend to emit isCompressibleInst() check which in turn is used by getInstSizeInBytes() to better estimate instruction size. Note the generation of compressed instructions in RISC-V happens late in the assembler therefore instruction size estimate might be off if computed before. Reviewers: lenary, asb, luismarques, lewis-revill Reviewed By: asb Subscribers: sameer.abuasal, lewis-revill, hiraditya, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68290
* git-llvm: Add option to push to Github with SSHValentin Churavy2019-12-161-4/+11
| | | | | | | | | | | | | | | | Summary: For users with 2FA Github password challenge can be rather cumbersome and I personally use key based authentication through SSH. This fixes the SSH feature that was present and exposes it as a command line option. Reviewers: tstellar Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71534
* gn build: (manually) merge c82e4ef69Nico Weber2019-12-162-26/+9
|
* [lit] max_failures does not need to be stored in LitConfigJulian Lettner2019-12-164-22/+24
|
* gn build: Merge 0add79aec2eLLVM GN Syncbot2019-12-161-0/+1
|
OpenPOWER on IntegriCloud