summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[globalisel][tablegen] Import rules containing intrinsic_wo_chain."Quentin Colombet2017-05-171-22/+3
| | | | | | | | | This reverts commit r303259. This breaks the GISel bot: http://lab.llvm.org:8080/green/job/Compiler_Verifiers_GlobalISEL/5163/consoleFull#-134276167849ba4694-19c4-4d7e-bec5-911270d8a58c llvm-svn: 303313
* Add back a dummy --use-processes.Rafael Espindola2017-05-171-0/+3
| | | | | | Some bots are using it. llvm-svn: 303282
* Always use the multiprocess module.Rafael Espindola2017-05-172-115/+3
| | | | | | This seems to work on freebsd and openbsd these days. llvm-svn: 303280
* [globalisel][tablegen] Import rules containing intrinsic_wo_chain.Daniel Sanders2017-05-171-3/+22
| | | | | | | | | | | | | | | | | Summary: As of this patch, 1018 out of 3938 rules are currently imported. Depends on D32275 Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar Reviewed By: qcolombet Subscribers: dberris, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D32278 llvm-svn: 303259
* [globalisel][tablegen] Require that all registers between instructions of a ↵Daniel Sanders2017-05-171-0/+2
| | | | | | | | | | | | | | | | | | | match are virtual. Summary: Without this, it's possible to encounter multiple defs for a register. This is triggered by the current version of D32868 when applied to trunk. Reviewers: qcolombet, ab, t.p.northover, rovka, kristof.beyls Reviewed By: qcolombet Subscribers: llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D32869 llvm-svn: 303253
* Fixup r303240: Use llvm::to_string instead of std::to_stringDiana Picus2017-05-171-3/+3
| | | | | | | It turns out some of the buildbots don't have std::to_string around, even in this day and age... llvm-svn: 303243
* [GlobalISel][TableGen] Fix handling of default operandsDiana Picus2017-05-171-48/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | When looping through a destination pattern's operands to decide how many default operands we need to introduce, we used to count the "expanded" number of operands. So if one default operand would be rendered as 2 values, we'd count it as 2 operands, when in fact it needs to count as only 1 operand regardless of how many values it expands to. This turns out to be a problem only in some very specific cases, e.g. when we have one operand with multiple default values followed by more operands with default values (see the new test). In such a situation we'd stop looping before looking at all the operands, and then error out assuming that we don't have enough default operands to make up the shortfall. At the moment this only affects ARM. The patch removes the loop counting default operands entirely and assumes that we'll have to introduce values for any default operand that we find (i.e. we're assuming it cannot be given as a child at all). It also extracts the code for adding renderers for default operands into a helper method. Differential Revision: https://reviews.llvm.org/D33031 llvm-svn: 303240
* Added LLVM_DUMP_METHOD attributes for MatchableInfo::dump(). Defined it only ↵Galina Kistanova2017-05-171-1/+3
| | | | | | if dump is enabled. llvm-svn: 303229
* build_llvm_package.bat: Minor updatesHans Wennborg2017-05-151-4/+4
| | | | llvm-svn: 303080
* [TableGen] Add EncoderMethod to RegisterOperandSam Kolton2017-05-151-0/+1
| | | | | | | | Reviewers: stoklund, grosbach, vpykhtin Differential Revision: https://reviews.llvm.org/D32493 llvm-svn: 303044
* [git-llvm] Fix svn:eol-style issue for one-file patchesReid Kleckner2017-05-121-14/+19
| | | | llvm-svn: 302853
* [X86] Moving X86Local namespace from .cpp to .h file to use it in memory ↵Ayman Musa2017-05-112-124/+123
| | | | | | | | folding TableGen backend. Differential Revision: https://reviews.llvm.org/D32797 llvm-svn: 302791
* Adding VSCode syntax colorizer to utils (generated from textmate colorizer).Puyan Lotfi2017-05-098-0/+263
| | | | | | | | | | | | | | | | | | | --This line, and those below, will be igored-- A utils/vscode A utils/vscode/README A utils/vscode/tablegen A utils/vscode/tablegen/.vscode A utils/vscode/tablegen/.vscode/launch.json A utils/vscode/tablegen/CHANGELOG.md A utils/vscode/tablegen/README.md A utils/vscode/tablegen/language-configuration.json A utils/vscode/tablegen/package.json A utils/vscode/tablegen/syntaxes A utils/vscode/tablegen/syntaxes/TableGen.tmLanguage A utils/vscode/tablegen/vsc-extension-quickstart.md llvm-svn: 302553
* Fix comment typos.Geoff Berry2017-05-081-1/+1
| | | | llvm-svn: 302432
* Note addition of NetBSD support in googletestKamil Rytarowski2017-05-061-1/+1
| | | | | | Recreated patch for __NetBSD__ has been pushed upstream to Google. llvm-svn: 302329
* Add NetBSD to the list of platforms supporting death tests. Two unitJoerg Sonnenberger2017-05-052-1/+3
| | | | | | tests require this for compilation. llvm-svn: 302264
* [test-release] Status update *before* long gzipRenato Golin2017-05-041-5/+5
| | | | llvm-svn: 302165
* [IR] Abstract away ArgNo+1 attribute indexing as much as possibleReid Kleckner2017-05-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Do three things to help with that: - Add AttributeList::FirstArgIndex, which is an enumerator currently set to 1. It allows us to change the indexing scheme with fewer changes. - Add addParamAttr/removeParamAttr. This just shortens addAttribute call sites that would otherwise need to spell out FirstArgIndex. - Remove some attribute-specific getters and setters from Function that take attribute list indices. Most of these were only used from BuildLibCalls, and doesNotAlias was only used to test or set if the return value is malloc-like. I'm happy to split the patch, but I think they are probably easier to review when taken together. This patch should be NFC, but it sets the stage to change the indexing scheme to this, which is more convenient when indexing into an array: 0: func attrs 1: retattrs 2...: arg attrs Reviewers: chandlerc, pete, javed.absar Subscribers: david2050, llvm-commits Differential Revision: https://reviews.llvm.org/D32811 llvm-svn: 302060
* Support arbitrary address space pointers in masked gather/scatter intrinsics.Elad Cohen2017-05-031-5/+11
| | | | | | | | | | | | Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a non-default address space pointer we fail with a "Calling a function with a bad singature!" assertion. This patch solves this by adding the 'vector of pointers' argument as an overloaded type which will determine the address space. Differential revision: https://reviews.llvm.org/D31490 llvm-svn: 302018
* [lit] Try to exit more cleanlyReid Kleckner2017-05-022-11/+25
| | | | | | | | | | | | | | | If all jobs complete successfully, use pool.close() instead of pool.terminate() before waiting for the workers. Zach Turner reported that he was getting "access denied" exceptions from pool.terminate(). Make the workers abort immediately without printing to stderr when they are interrupted. Finally, catch exceptions when attempting to remove our temporary testing directory. On abnormal exit, there can often be open handles that haven't been cleaned up yet. llvm-svn: 301941
* [ARM] GlobalISel: Use TableGen instruction selectorDiana Picus2017-05-021-3/+9
| | | | | | | | | | | Emit and use the TableGen instruction selector for ARM. At the moment, this allows us to remove the hand-written code for selecting G_SDIV and G_UDIV. Future commits will focus on increasing the code coverage for it and removing more dead code from the current instruction selector. llvm-svn: 301905
* [globalisel][tablegen] Silence unused variable warning.Daniel Sanders2017-04-291-1/+0
| | | | llvm-svn: 301755
* [globalisel][tablegen] Compute available feature bits correctly.Daniel Sanders2017-04-293-47/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Predicate<> now has a field to indicate how often it must be recomputed. Currently, there are two frequencies, per-module (RecomputePerFunction==0) and per-function (RecomputePerFunction==1). Per-function predicates are currently recomputed more frequently than necessary since the only predicate in this category is cheap to test. Per-module predicates are now computed in getSubtargetImpl() while per-function predicates are computed in selectImpl(). Tablegen now manages the PredicateBitset internally. It should only be necessary to add the required includes. Also fixed a problem revealed by the test case where constrainSelectedInstRegOperands() would attempt to tie operands that BuildMI had already tied. Reviewers: ab, qcolombet, t.p.northover, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D32491 llvm-svn: 301750
* TableGen: Add IntrHasSideEffects property for intrinsicsMatt Arsenault2017-04-284-1/+12
| | | | | | | | | | | | | | | The IntrNoMem, IntrReadMem, IntrWriteMem, and IntrArgMemOnly intrinsic properties differ from their corresponding LLVM IR attributes by specifying that the intrinsic, in addition to its memory properties, has no other side effects. The IntrHasSideEffects flag used in combination with one of the memory flags listed above, makes it possible to define an intrinsic such that its properties at the CodeGen layer match its properties at the IR layer. Patch by Tom Stellard llvm-svn: 301685
* Add speculatable function attributeMatt Arsenault2017-04-283-1/+16
| | | | | | | | This attribute tells the optimizer that the function may be speculated. Patch by Tom Stellard llvm-svn: 301680
* Fixed assert message to correctly refer to MRMSrcReg4VOp3Frm/MRMSrcMeg4VOp3Frm.Simon Pilgrim2017-04-271-2/+2
| | | | llvm-svn: 301544
* [globalisel][tablegen] Fix vector element sizeIgor Breger2017-04-261-1/+1
| | | | | | | | | | | | | | Summary: Fix vector element size. Reviewers: dsanders Reviewed By: dsanders Subscribers: rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D32537 llvm-svn: 301421
* [git-llvm] Remove CR from middle of svn propget outputReid Kleckner2017-04-241-0/+2
| | | | llvm-svn: 301268
* [git-llvm] Make `push` work on CRLF files with svn:eol-style=nativeReid Kleckner2017-04-241-7/+60
| | | | | | | | | | | | | | | | | | | | | | Summary: `git apply` on Windows doesn't work for files that SVN checks out as CRLF. There is no way to force SVN to check everything out with Unix line endings on Windows. Files with svn:eol-style=native will always come out with CRLF, breaking `git apply`, which wants Unix line endings. My workaround is to list all files with this property set in the change, and run `dos2unix` on them. SVN doesn't commit a massive line ending change because the svn:eol-style property indicates that these are text files. Tested on r301245. Reviewers: zturner, jlebar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32452 llvm-svn: 301262
* [globalisel][tablegen] Add support for RegisterOperand.Daniel Sanders2017-04-221-1/+10
| | | | | | | | | | | | | | | | | | Summary: It functions just like RegisterClass except that the class is obtained from a field. Depends on D31761. Reviewers: ab, qcolombet, t.p.northover, rovka, kristof.beyls, aditya_nandakumar Reviewed By: ab Subscribers: dberris, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D32229 llvm-svn: 301080
* [globalisel][tablegen] Revise API for ComplexPattern operands to improve ↵Daniel Sanders2017-04-221-103/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flexibility. Summary: Some targets need to be able to do more complex rendering than just adding an operand or two to an instruction. For example, it may need to insert an instruction to extract a subreg first, or it may need to perform an operation on the operand. In SelectionDAG, targets would create SDNode's to achieve the desired effect during the complex pattern predicate. This worked because SelectionDAG had a form of garbage collection that would take care of SDNode's that were created but not used due to a later predicate rejecting a match. This doesn't translate well to GlobalISel and the churn was wasteful. The API changes in this patch enable GlobalISel to accomplish the same thing without the waste. The API is now: InstructionSelector::OptionalComplexRendererFn selectArithImmed(MachineOperand &Root) const; where Root is the root of the match. The return value can be omitted to indicate that the predicate failed to match, or a function with the signature ComplexRendererFn can be returned. For example: return OptionalComplexRendererFn( [=](MachineInstrBuilder &MIB) { MIB.addImm(Immed).addImm(ShVal); }); adds two immediate operands to the rendered instruction. Immed and ShVal are captured from the predicate function. As an added bonus, this also reduces the amount of information we need to provide to GIComplexOperandMatcher. Depends on D31418 Reviewers: aditya_nandakumar, t.p.northover, qcolombet, rovka, ab, javed.absar Reviewed By: ab Subscribers: dberris, kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D31761 llvm-svn: 301079
* [globalisel][tablegen] Fix PR32733 by checking which instruction operands ↵Daniel Sanders2017-04-221-2/+3
| | | | | | | | | | | | | belong to. canMutate() was returning true when the operands were all in the same order as the matched instruction. However, it wasn't checking the operands were actually on that instruction. This worked when we could only match a single instruction but the addition of nested instruction matching led to cases where the operands could be split across multiple instructions. canMutate() now returns false if operands belong to instructions other than the root of the match. llvm-svn: 301077
* [globalisel][tablegen] Import SelectionDAG's rule predicates and support the ↵Daniel Sanders2017-04-216-27/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | equivalent in GIRule. Summary: The SelectionDAG importer now imports rules with Predicate's attached via Requires, PredicateControl, etc. These predicates are implemented as bitset's to allow multiple predicates to be tested together. However, unlike the MC layer subtarget features, each target only pays for it's own predicates (e.g. AArch64 doesn't have 192 feature bits just because X86 needs a lot). Both AArch64 and X86 derive at least one predicate from the MachineFunction or Function so they must re-initialize AvailableFeatures before each function. They also declare locals in <Target>InstructionSelector so that computeAvailableFeatures() can use the code from SelectionDAG without modification. Reviewers: rovka, qcolombet, aditya_nandakumar, t.p.northover, ab Reviewed By: rovka Subscribers: aemerson, rengolin, dberris, kristof.beyls, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D31418 llvm-svn: 300993
* Revert r300964 + r300970 - [globalisel][tablegen] Import SelectionDAG's rule ↵Daniel Sanders2017-04-216-141/+27
| | | | | | | | | predicates and support the equivalent in GIRule. It's causing llvm-clang-x86_64-expensive-checks-win to fail to compile and I haven't worked out why. Reverting to make it green while I figure it out. llvm-svn: 300978
* [globalisel][tablegen] Try again to fix builds on old MSVC's after r300964Daniel Sanders2017-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This should fix llvm-clang-x86_64-expensive-checks-win I reproduced the error using the following code: namespace llvm { // Moving this out of the llvm namespace fixes the error. template<unsigned NumBits> class PredicateBitsetImpl {}; } namespace { const unsigned MAX_SUBTARGET_PREDICATES = 11; // This works on Clang but is broken on MSVC // using PredicateBitset = PredicateBitsetImpl<MAX_SUBTARGET_PREDICATES>; // Some versions emit a syntax error here ("error C2061: syntax error: identifier // 'PredicateBitsetImpl'") but others accept it and only emit the C3646 below. // // This works on Clang and MSVC using PredicateBitset = llvm::PredicateBitsetImpl<MAX_SUBTARGET_PREDICATES>; class Foo { private: PredicateBitset A; // error C3646: 'A': unknown override specifier }; } llvm-svn: 300970
* Revert: r300966 - [globalisel][tablegen] Attempt to fix builds on old MSVC's ↵Daniel Sanders2017-04-211-2/+2
| | | | | | | | after r300964 It didn't fix the builder. llvm-svn: 300968
* [globalisel][tablegen] Attempt to fix builds on old MSVC's after r300964Daniel Sanders2017-04-211-2/+2
| | | | | | This should fix llvm-clang-x86_64-expensive-checks-win llvm-svn: 300966
* [globalisel][tablegen] Import SelectionDAG's rule predicates and support the ↵Daniel Sanders2017-04-216-27/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | equivalent in GIRule. Summary: The SelectionDAG importer now imports rules with Predicate's attached via Requires, PredicateControl, etc. These predicates are implemented as bitset's to allow multiple predicates to be tested together. However, unlike the MC layer subtarget features, each target only pays for it's own predicates (e.g. AArch64 doesn't have 192 feature bits just because X86 needs a lot). Both AArch64 and X86 derive at least one predicate from the MachineFunction or Function so they must re-initialize AvailableFeatures before each function. They also declare locals in <Target>InstructionSelector so that computeAvailableFeatures() can use the code from SelectionDAG without modification. Reviewers: rovka, qcolombet, aditya_nandakumar, t.p.northover, ab Reviewed By: rovka Subscribers: aemerson, rengolin, dberris, kristof.beyls, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D31418 llvm-svn: 300964
* [MVT][SVE] Scalable vector MVTs (2/3)Amara Emerson2017-04-201-0/+39
| | | | | | | | | | | Adds scalable vector machine value types, and updates the switch statements required for tablegen. Patch by Graham Hunter. Differential Revision: https://reviews.llvm.org/D32018 llvm-svn: 300840
* [tblgen] GCC/MS builtin to target intrisics map.Aditya Nandakumar2017-04-191-7/+15
| | | | | | | | | | | Patch by Ettore Speziale Allow TableGen to generate static functions to perform GCC/MS builtin name to target specific intrinsic ID mapping. https://reviews.llvm.org/D31150 llvm-svn: 300735
* build_llvm_package.bat: Move to VS2017Hans Wennborg2017-04-131-7/+7
| | | | | | It's required for building the clang-format plugin after r300225. llvm-svn: 300273
* [globalisel][tablegen] Report more detail in some SelectionDAG import ↵Daniel Sanders2017-04-131-19/+98
| | | | | | | | | | | | | | failures. NFC Reviewers: ab, t.p.northover, qcolombet, aditya_nandakumar, rovka Reviewed By: ab Subscribers: dberris, kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D31325 llvm-svn: 300186
* [globalisel][tablegen] Add experimental support for OperandWithDefaultOps, ↵Daniel Sanders2017-04-121-4/+78
| | | | | | | | | | | | | | | | | | | | | | PredicateOperand, and OptionalDefOperand Summary: As far as instruction selection is concerned, all three appear to be same thing. Support for these operands is experimental since AArch64 doesn't make use of them and the in-tree targets that do use them (AMDGPU for OperandWithDefaultOps, AMDGPU/ARM/Hexagon/Lanai for PredicateOperand, and ARM for OperandWithDefaultOps) are not using tablegen-erated GlobalISel yet. Reviewers: rovka, aditya_nandakumar, t.p.northover, qcolombet, ab Reviewed By: rovka Subscribers: inglorion, aemerson, rengolin, mehdi_amini, dberris, kristof.beyls, igorb, tpr, llvm-commits Differential Revision: https://reviews.llvm.org/D31135 llvm-svn: 300037
* [lit] Try using process pools by default againReid Kleckner2017-04-071-1/+1
| | | | | | | | | | | Both pickling errors encountered on clang bots and Darwin compiler-rt should now be fixed. This has no impact on testing time on Linux, and on Windows goes from 88s to 63s for 'check'. The tests pass on Mac, but I haven't compared execution time. llvm-svn: 299775
* [lit] Implement timeouts and max_time for process pool testingReid Kleckner2017-04-063-50/+83
| | | | | | | | | | | | | | | | | | | This is necessary to pass the lit test suite at llvm/utils/lit/tests. There are some pre-existing failures here, but now switching to pools doesn't regress any tests. I had to change test-data/lit.cfg to import DummyConfig from a module to fix pickling problems, but I think it'll be OK if we require test formats to be written in real .py modules outside lit.cfg files. I also discovered that in some circumstances AsyncResult.wait() will not raise KeyboardInterrupt in a timely manner, but you can pass a non-zero timeout to work around this. This makes threading.Condition.wait use a polling loop that runs through the interpreter, so it's capable of asynchronously raising KeyboardInterrupt. llvm-svn: 299605
* [lit] Revert to old execution strategy while I debug these pickling errorsReid Kleckner2017-04-051-1/+1
| | | | llvm-svn: 299565
* [lit] Use Python 3 style print to satisfy some botsReid Kleckner2017-04-051-1/+1
| | | | llvm-svn: 299564
* [lit] Use process pools for test execution by defaultReid Kleckner2017-04-052-42/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This drastically reduces lit test execution startup time on Windows. Our previous strategy was to manually create one Process per job and manage the worker pool ourselves. Instead, let's use the worker pool provided by multiprocessing. multiprocessing.Pool(jobs) returns almost immediately, and initializes the appropriate number of workers, so they can all start executing tests immediately. This avoids the ramp-up period that the old implementation suffers from. This appears to speed up small test runs. Here are some timings of the llvm-readobj tests on Windows using the various execution strategies: # multiprocessing.Pool: $ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-process-pool |& grep real: ; done real: 0m1.156s real: 0m1.078s real: 0m1.094s # multiprocessing.Process: $ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-processes |& grep real: ; done real: 0m6.062s real: 0m5.860s real: 0m5.984s # threading.Thread: $ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-threads |& grep real: ; done real: 0m9.438s real: 0m10.765s real: 0m11.079s I kept the old code to launch processes in case this change doesn't work on all platforms that LLVM supports, but at some point I would like to remove both the threading and old multiprocessing execution strategies. Reviewers: modocache, rafael Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31677 llvm-svn: 299560
* [globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.Daniel Sanders2017-04-051-41/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Temporaries are now allocated to operands instead of predicates and this allocation is used to correctly pair up the rendered operands with the matched operands. Previously, ComplexPatterns were allocated temporaries independently in the Src Pattern and Dst Pattern, leading to mismatches. Additionally, the Dst Pattern failed to account for the allocated index and therefore always used temporary 0, 1, ... when it should have used base+0, base+1, ... Thanks to Aditya Nandakumar for noticing the bug. Depends on D30539 Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Reviewed By: rovka Subscribers: igorb, dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D31054 llvm-svn: 299538
* [lit] Add a minimum export implementation.Rafael Espindola2017-04-041-9/+21
| | | | llvm-svn: 299475
OpenPOWER on IntegriCloud