summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* Improve machine schedulers for in-order processorsJaved Absar2017-03-271-0/+2
| | | | | | | | | | | This patch enables schedulers to specify instructions that cannot be issued with any other instructions. It also fixes BeginGroup/EndGroup. Reviewed by: Andrew Trick Differential Revision: https://reviews.llvm.org/D30744 llvm-svn: 298885
* [TableGen] Print #nnn as a name of an non-native reg unit with id nnnKrzysztof Parzyszek2017-03-272-6/+17
| | | | | | | | | When using -debug with -gen-register-info, tablegen will crash when trying to print a name of a non-native register unit. This patch only affects the debug information generated while running llvm-tblgen, and has no impact on the compilable code coming out of it. llvm-svn: 298875
* [tablegen] Use categories on options that only matter to one emitter.Daniel Sanders2017-03-275-12/+25
| | | | | | | | | | | | | | | | Summary: The categories are emitted in a strange order in this patch due to a bug in the CommandLine library. Reviewers: ab Reviewed By: ab Subscribers: ab, llvm-commits Differential Revision: https://reviews.llvm.org/D30995 llvm-svn: 298843
* [TableGen] Make CodeGenMapTable understand the namespace field of an instructionKarl-Johan Karlsson2017-03-271-8/+8
| | | | | | | | | | | | | | | | Do not force the backends to use target name as namespace. Original patch by Mattias Eriksson Reviewers: stoklund, craig.topper Reviewed By: stoklund Subscribers: materi, llvm-commits Differential Revision: https://reviews.llvm.org/D31322 llvm-svn: 298834
* Move spill size and alignment info from MC to TargetRegisterInfoKrzysztof Parzyszek2017-03-241-7/+7
| | | | | | | | | | | | This is another step towards implementing register classes with parametrized register/spill sizes and value types. This is an updated version of r298652. The difference is that MCRegister- Class still contains register size, available as getPhysRegSize(). The old function getSize was retained as a temporary measure to avoid build breakage for out-of-tree targets. llvm-svn: 298739
* Revert r298652 on Quentin's requestKrzysztof Parzyszek2017-03-241-4/+4
| | | | llvm-svn: 298727
* stable-merge-request.sh: Add a script for submitting merge requests via bugzillaTom Stellard2017-03-241-0/+198
| | | | | | | | | | | | | | Summary: This script will automatically create a new stable merge request bug in bugzilla for the given svn revision and release number. Reviewers: hans Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30905 llvm-svn: 298705
* Another instance where GCC doesn't understand implicit construction of ↵Benjamin Kramer2017-03-241-2/+2
| | | | | | StringLiteral. llvm-svn: 298703
* Make GCC happy again.Benjamin Kramer2017-03-241-1/+1
| | | | llvm-svn: 298702
* Don't build up std::vectors with constant sizes when an array suffices.Benjamin Kramer2017-03-241-75/+70
| | | | | | NFC. llvm-svn: 298701
* Move spill size and alignment info from MC to TargetRegisterInfoKrzysztof Parzyszek2017-03-231-4/+4
| | | | | | | | | This is another step towards implementing register classes with parametrized register/spill sizes. Differential Revision: https://reviews.llvm.org/D31299 llvm-svn: 298652
* [PPC] Add generated tests for all atomic operationsTim Shen2017-03-231-0/+4
| | | | | | | | | | | | Summary: Add tests for all atomic operations for powerpc64le, so that all changes can be easily examined. Reviewers: kbarton, hfinkel, echristo Subscribers: mehdi_amini, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D31285 llvm-svn: 298614
* lit: remove python2-ismsBrian Gesiak2017-03-221-2/+2
| | | | | | | | | | | | | | | | | Summary: `assert.assertItemEqual` went away in Python 3. Seeing how lists are ordered, comparing a list against each other should work just as well. Patch by @jbergstroem (Johan Bergström). Reviewers: modocache, gparker42 Reviewed By: modocache Differential Revision: https://reviews.llvm.org/D31229 llvm-svn: 298479
* Rename AttributeSet to AttributeListReid Kleckner2017-03-211-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This class is a list of AttributeSetNodes corresponding the function prototype of a call or function declaration. This class used to be called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is typically accessed by parameter and return value index, so "AttributeList" seems like a more intuitive name. Rename AttributeSetImpl to AttributeListImpl to follow suit. It's useful to rename this class so that we can rename AttributeSetNode to AttributeSet later. AttributeSet is the set of attributes that apply to a single function, argument, or return value. Reviewers: sanjoy, javed.absar, chandlerc, pete Reviewed By: pete Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits Differential Revision: https://reviews.llvm.org/D31102 llvm-svn: 298393
* GlobalISel: add implicit defs & uses when mutating an instruction.Tim Northover2017-03-201-1/+18
| | | | | | Otherwise a scheduler might do bad things to the code we produce. llvm-svn: 298311
* Explicitly add move constructor/assignment operators.Zachary Turner2017-03-201-0/+2
| | | | | | | | | | These are needed due to some obscure rules in the standard about how std::vector selects between copy and move constructors, which can cause a conforming implementation to attempt to select the copy constructor of RuleMatcher, which will fail since std::unique_ptr<> isn't copyable. llvm-svn: 298294
* [tablegen][globalisel] Capture instructions into locals and related ↵Daniel Sanders2017-03-201-60/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | infrastructure for multiple instructions matches. Summary: Prepare the way for nested instruction matching support by having actions like CopyRenderer look up operands in the RuleMatcher rather than a specific InstructionMatcher. This allows actions to reference any operand from any matched instruction. It works by checking the 'shape' of the match and capturing each matched instruction to a local variable. If the shape is wrong (not enough operands, leaf nodes where non-leafs are expected, etc.), then the rule exits early without checking the predicates. Once we've captured the instructions, we then test the predicates as before (except using the local variables). If the match is successful, then we render the new instruction as before using the local variables. It's not noticable in this patch but by the time we support multiple instruction matching, this patch will also cause a significant improvement to readability of the emitted code since MRI.getVRegDef(I->getOperand(0).getReg()) will simply be MI1 after emitCxxCaptureStmts(). This isn't quite NFC because I've also fixed a bug that I'm surprised we haven't encountered yet. It now checks there are at least the expected number of operands before accessing them with getOperand(). Depends on D30531 Reviewers: t.p.northover, qcolombet, aditya_nandakumar, ab, rovka Reviewed By: rovka Subscribers: dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D30535 llvm-svn: 298257
* Add SystemZ to utils/update_llc_test_checks.py.Jonas Paulsson2017-03-171-0/+18
| | | | | | | | | Extend script for auto-generating CHECK lines so that it works for SystemZ. This is a pre-commit for the new tests resulting from https://reviews.llvm.org/D29489 llvm-svn: 298048
* Removed unnecessary semicolon. NFCI.Simon Pilgrim2017-03-151-1/+1
| | | | llvm-svn: 297906
* Add GDB pretty-printer for llvm::Twine typeDavid Blaikie2017-03-151-0/+108
| | | | | | | | Patch by Simon Marchi! Differential Revision: https://reviews.llvm.org/D30994 llvm-svn: 297889
* [tablegen][globalisel] Trivial changes to reduce size of following patch. NFC.Daniel Sanders2017-03-151-77/+90
| | | | | | | | | | | | | | | | | | Summary: * Move namespace { * Trivial: Typo * RuleMatcher: Separate class and definition * Trivial: const findNodeEquiv Reviewers: t.p.northover, qcolombet, aditya_nandakumar, ab, rovka Reviewed By: rovka Subscribers: dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D30531 llvm-svn: 297884
* [globalisel][tblgen] Add support for ComplexPatternsDaniel Sanders2017-03-141-14/+245
| | | | | | | | | | | | | | | | | | | Summary: Adds a new kind of MachineOperand: MO_Placeholder. This operand must not appear in the MIR and only exists as a way of creating an 'uninitialized' operand until a matcher function overwrites it. Depends on D30046, D29712 Reviewers: t.p.northover, ab, rovka, aditya_nandakumar, javed.absar, qcolombet Reviewed By: qcolombet Subscribers: dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D30089 llvm-svn: 297782
* Test commit.James Henderson2017-03-141-1/+1
| | | | llvm-svn: 297731
* [SelectionDAG] Enhance SDTCisSameNumEltsAs to work with scalar types and use ↵Craig Topper2017-03-132-38/+57
| | | | | | | | | | | | it on extend/trunc/round operations. Currently we don't enforce that ISD::ANY_EXTEND, ZERO_EXTEND, SIGN_EXTEND, TRUNC, FP_ROUND, FP_EXTEND have the same number of elements(including scalar) between their input and output. Though we have them documented as such. Up until a few months ago x86 created nodes that violated this rule. That's all been fixed now, and we should enforce the rule going forward. In order to do this we need to allow SDTCisSameNumEltsAs to support scalar types and not enforce being a vector. If one type is scalar we will force the other type to also be scalar. Differential Revision: https://reviews.llvm.org/D30878 llvm-svn: 297648
* [ADT] Improve the genericity of llvm::enumerate().Zachary Turner2017-03-131-2/+2
| | | | | | | | | | | | | | There were some issues in the implementation of enumerate() preventing it from being used in various contexts. These were all related to the fact that it did not supporter llvm's iterator_facade_base class. So this patch adds support for that and additionally exposes a new helper method to_vector() that will evaluate an entire range and store the results in a vector. Differential Revision: https://reviews.llvm.org/D30853 llvm-svn: 297633
* Revert "[AVX-512] EVEX2VEX, don't reject intrinsic instructions when both ↵Craig Topper2017-03-131-3/+2
| | | | | | | | | | have a memory operand. We should just continue to check other operands instead." This reverts r297596. There were other issues that were making this not work that have been fixed now. Reverting this results in a more accurate table. llvm-svn: 297602
* [AVX-512] EVEX2VEX, don't reject intrinsic instructions when both have a ↵Craig Topper2017-03-131-2/+3
| | | | | | | | memory operand. We should just continue to check other operands instead. This exposed that we have several intrinsic instructions that have identical TSFlags to other instructions. We should merge their patterns and kill of the duplicate. I'll fix that in a follow up patch. llvm-svn: 297596
* [X86] Minor formatting tweaks in EVEX to VEX tables. NFCCraig Topper2017-03-131-45/+45
| | | | llvm-svn: 297595
* [FileCheck] Added --enable-var-scope option to enable scope for regex variables.Artem Belevich2017-03-091-8/+33
| | | | | | | | | | | | | If `--enable-var-scope` is in effect, variables with names that start with `$` are considered to be global. All other variables are local. All local variables get undefined at the beginning of each CHECK-LABEL block. Global variables are not affected by CHECK-LABEL. This makes it easier to ensure that individual tests are not affected by variables set in preceding tests. Differential Revision: https://reviews.llvm.org/D30749 llvm-svn: 297396
* [SelectionDAG] Make SelectCode return voidJoey Gouly2017-03-091-2/+1
| | | | | | | | | | | SelectCode has been returning nullptr since 182dac0 ("SDAG: Make SelectCodeCommon return void", 2016-05-10). Make SelectCode also return void instead, as all callers have been updated. Patch by Sven van Haastregt. Review: https://reviews.llvm.org/D30497 llvm-svn: 297377
* Recommit: [globalisel] Change LLT constructor string into an LLT-based ↵Daniel Sanders2017-03-071-16/+35
| | | | | | | | | | | | | | | | | | | | object that knows how to generate it. Summary: This will allow future patches to inspect the details of the LLT. The implementation is now split between the Support and CodeGen libraries to allow TableGen to use this class without introducing layering concerns. Thanks to Ahmed Bougacha for finding a reasonable way to avoid the layering issue and providing the version of this patch without that problem. The problem with the previous commit appears to have been that TableGen was including CodeGen/LowLevelType.h instead of Support/LowLevelTypeImpl.h. Reviewers: t.p.northover, qcolombet, rovka, aditya_nandakumar, ab, javed.absar Subscribers: arsenm, nhaehnle, mgorny, dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30046 llvm-svn: 297241
* Revert r297177: Change LLT constructor string into an LLT-based object ...Daniel Sanders2017-03-071-35/+16
| | | | | | | | | | More module problems. This time it only showed up in the stage 2 compile of clang-x86_64-linux-selfhost-modules-2 but not the stage 1 compile. Somehow, this change causes the build to need Attributes.gen before it's been generated. llvm-svn: 297188
* [globalisel] Change LLT constructor string into an LLT-based object that ↵Daniel Sanders2017-03-071-16/+35
| | | | | | | | | | | | | | | | | | knows how to generate it. Summary: This will allow future patches to inspect the details of the LLT. The implementation is now split between the Support and CodeGen libraries to allow TableGen to use this class without introducing layering concerns. Thanks to Ahmed Bougacha for finding a reasonable way to avoid the layering issue and providing the version of this patch without that problem. Reviewers: t.p.northover, qcolombet, rovka, aditya_nandakumar, ab, javed.absar Subscribers: arsenm, nhaehnle, mgorny, dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30046 llvm-svn: 297177
* [X86] Quick fix for build bot failure (r297127) due to unused variable.Ayman Musa2017-03-071-2/+1
| | | | llvm-svn: 297130
* [X86][AVX512] Adding new LLVM TableGen backend which generates the EVEX2VEX ↵Ayman Musa2017-03-074-0/+353
| | | | | | | | | | | | compressing tables. X86EvexToVex machine instruction pass compresses EVEX encoded instructions by replacing them with their identical VEX encoded instructions when possible. It uses manually supported 2 large tables that map the EVEX instructions to their VEX ideticals. This TableGen backend replaces the tables by automatically generating them. Differential Revision: https://reviews.llvm.org/D30451 llvm-svn: 297127
* [TableGen] Ensure proper ordering of subtarget feature namesKrzysztof Parzyszek2017-03-061-4/+17
| | | | | | | Recommit r297039 without the testcase. The MIR testcase did not work well with MC code emitter. llvm-svn: 297080
* Revert r297039, it's causing some mysterious buildbot failuresKrzysztof Parzyszek2017-03-061-17/+4
| | | | llvm-svn: 297062
* [opt-diff] Fix the case when the script is invoked with directoriesAdam Nemet2017-03-061-1/+3
| | | | llvm-svn: 297055
* [TableGen] Ensure proper ordering of subtarget feature namesKrzysztof Parzyszek2017-03-061-4/+17
| | | | llvm-svn: 297039
* Fix bug in bisect-skip-count not using passed-in argumentsDaniel Berlin2017-03-041-1/+1
| | | | llvm-svn: 296961
* Teach lit to expand glob expressions.Zachary Turner2017-03-033-9/+58
| | | | | | | | | | | This will enable removing hacks throughout the codebase in clang and compiler-rt that feed multiple inputs to a testing utility by globbing, all of which are either disabled on Windows currently or using xargs / find hacks. Differential Revision: https://reviews.llvm.org/D30380 llvm-svn: 296904
* New tool: opt-diff.pyAdam Nemet2017-03-023-3/+88
| | | | | | | | | | This tool allows generating the different between two optimization record files. The result is a YAML file too that can be visualized with opt-viewer. This is very useful to see what optimization were added and removed by a change. llvm-svn: 296767
* [opt-viewer] Treat remarks with different attributes as differentAdam Nemet2017-03-021-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to exclude arguments but for a diffed YAML file, it's interesting to show these as changes. Turns out this also affects gvn/LoadClobbered because we used to squash multiple entries of this on the same line even if they reported clobbers by *different* instructions. This increases the number of unique entries now and the share of gvn/LoadClobbered. Total number of remarks 902287 Top 10 remarks by pass: inline 43% gvn 37% licm 11% loop-vectorize 4% asm-printer 3% regalloc 1% loop-unroll 1% inline-cost 0% slp-vectorizer 0% loop-delete 0% Top 10 remarks: gvn/LoadClobbered 33% inline/Inlined 16% inline/CanBeInlined 14% inline/NoDefinition 7% licm/Hoisted 6% licm/LoadWithLoopInvariantAddressInvalidated 5% gvn/LoadElim 3% asm-printer/InstructionCount 3% inline/TooCostly 2% loop-vectorize/MissedDetails 2% llvm-svn: 296766
* [opt-viewer] Don't use __getattr__ for missing YAML attributesAdam Nemet2017-03-021-5/+6
| | | | | | | __getattr__ does not work well with debugging. If the attribute function has a run-time error, a missing attribute is reported instead. llvm-svn: 296765
* [opt-viewer] Sort entries with identical hotness by source lineAdam Nemet2017-03-021-1/+1
| | | | | | | We want entries that are close to each other in the source appear next to each other. llvm-svn: 296764
* New tool: opt-stats.pyAdam Nemet2017-03-013-188/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am planning to use this tool to find too noisy (missed) optimization remarks. Long term it may actually be better to just have another tool that exports the remarks into an sqlite database and perform queries like this in SQL. This splits out the YAML parsing from opt-viewer.py into a new Python module optrecord.py. This is the result of the script on the LLVM testsuite: Total number of remarks 714433 Top 10 remarks by pass: inline 52% gvn 24% licm 13% loop-vectorize 5% asm-printer 3% loop-unroll 1% regalloc 1% inline-cost 0% slp-vectorizer 0% loop-delete 0% Top 10 remarks: gvn/LoadClobbered 20% inline/Inlined 19% inline/CanBeInlined 18% inline/NoDefinition 9% licm/LoadWithLoopInvariantAddressInvalidated 6% licm/Hoisted 6% asm-printer/InstructionCount 3% inline/TooCostly 3% gvn/LoadElim 3% loop-vectorize/MissedDetails 2% Beside some refactoring, I also changed optrecords not to use context to access global data (max_hotness). Because of the separate module this would have required splitting context into two. However it's not possible to access the optrecord context from the SourceFileRenderer when calling back to Remark.RelativeHotness. llvm-svn: 296682
* [opt-viewer] Suggest installing the faster parser (libYAML)Adam Nemet2017-03-011-3/+2
| | | | llvm-svn: 296553
* [opt-viewer] Handle column number 0Adam Nemet2017-02-281-1/+1
| | | | | | | The asm-printer now emits remarks with function location which have unspecified (0) source column number. llvm-svn: 296547
* This script was meant to be committed with the DebugCounter changes.Daniel Berlin2017-02-281-0/+75
| | | | llvm-svn: 296425
* [utils] allow auto-generation of checks for thumb triplesSanjay Patel2017-02-241-0/+2
| | | | | | | If there's some reason not to do this, feel free to revert and/or fix, but for the cases I'm looking at, the script appears to do fine for these targets. llvm-svn: 296181
OpenPOWER on IntegriCloud