summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [AArch64] Mark various *Info classes as 'final'. NFC.Ahmed Bougacha2016-07-275-5/+5
| | | | llvm-svn: 276874
* [AArch64] Define AArch64RegisterInfo as a class, not a struct. NFC.Ahmed Bougacha2016-07-271-2/+1
| | | | llvm-svn: 276873
* GlobalISel: remove variable_ops from output list.Tim Northover2016-07-271-1/+1
| | | | | | | | | | | The instance in the input operand list allows both inputs and outputs, but the one in (outs) is not treated specially which leads to the MachineVerifier invoking UB (looking at an invalid MCInstrDesc field). No functional change except in UBSan builds (maybe, who knows!), where it fixes the legalize-add.mir test. llvm-svn: 276872
* [mips][ias] Check '$rs = $rd' constraints when both registers are in AsmText.Daniel Sanders2016-07-278-49/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is one possible solution to the problem of ignoring constraints that Simon raised in D21473 but it's a bit of a hack. The integrated assembler currently ignores violations of the tied register constraints when the operands involved in a tie are both present in the AsmText. For example, 'dati $rs, $rt, $imm' with the '$rs = $rt' will silently replace $rt with $rs. So 'dati $2, $3, 1' is processed as if the user provided 'dati $2, $2, 1' without any diagnostic being emitted. This is difficult to solve properly because there are multiple parts of the matcher that are silently forcing these constraints to be met. Tied operands are rendered to instructions by cloning previously rendered operands but this is unnecessary because the matcher was already instructed to render the operand it would have cloned. This is also unnecessary because earlier code has already replaced the MCParsedOperand with the one it was tied to (so the parsed input is matched as if it were 'dati <RegIdx 2>, <RegIdx 2>, <Imm 1>'). As a result, it looks like fixing this properly amounts to a rewrite of the tied operand handling which affects all targets. This patch however, merely inserts a checking hook just before the substitution of MCParsedOperands and the Mips target overrides it. It's not possible to accurately check the registers are the same this early (because numeric registers haven't been bound to a register class yet) so it cheats a bit and checks that the tokens that produced the operand are lexically identical. This works because tied registers need to have the same register class but it does have a flaw. It will reject 'dati $4, $a0, 1' for violating the constraint even though $a0 ends up as the same register as $4. Reviewers: sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: https://reviews.llvm.org/D21994 llvm-svn: 276867
* [PowerPC] Fix typo in PPCHazardRecognizers.cppNemanja Ivanovic2016-07-271-1/+1
| | | | | | Fixes PR28731. llvm-svn: 276865
* PowerPC: Avoid implicit iterator conversions, NFCDuncan P. N. Exon Smith2016-07-277-174/+170
| | | | | | | | | | | | | | | | | Avoid implicit conversions from MachineInstrBundleIterator to MachineInstr* in the PowerPC backend, mainly by preferring MachineInstr& over MachineInstr* when a pointer isn't nullable and using range-based for loops. There was one piece of questionable code in PPCInstrInfo::AnalyzeBranch, where a condition checked a pointer converted from an iterator for nullptr. Since this case is impossible (moreover, the code above guarantees that the iterator is valid), I removed the check when I changed the pointer to a reference. Despite that case, there should be no functionality change here. llvm-svn: 276864
* [test/gold] Add gold test subdirectory tests needing v1.12 (or higher)Teresa Johnson2016-07-273-0/+63
| | | | | | | | | | | | | | | | Summary: As discussed in the review for D22677, added a subdirectory to enable tests that require at least version 1.12 of gold. Add an initial test requiring this version. Reviewers: davidxl, mehdi_amini Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D22827 llvm-svn: 276860
* [ARM] Set a non-conflicting comment character for assembly in MSVC modeRenato Golin2016-07-272-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Currently, for ARMCOFFMCAsmInfoMicrosoft, no comment character is set, thus the idefault, '#', is used. The hash character doesn't work as comment character in ARM assembly, since '#' is used for immediate values. The comment character is set to ';', which is the comment character used by MS armasm.exe. (The microsoft armasm.exe uses a different directive syntax than what LLVM currently supports though, similar to ARM's armasm.) This allows inline assembly with immediate constants to be built (and brings the assembly output from clang -S closer to being possible to assemble). A test is added that verifies that ';' is correctly interpreted as comments in this mode, and verifies that assembling code that includes literal constants with a '#' works. Patch by Martin Storsjö. llvm-svn: 276859
* [ARM] Adds test for immediate encodingRenato Golin2016-07-271-0/+29
| | | | | | | | | The encoding of expressions as immediates wasn't correct, and was reported in PR23000. However, we have done some refactoring on how immediates are handled and now it seems the problem is fixed. This is a test just to make sure it won't regress again. llvm-svn: 276858
* Revert r276856 "Adjust Registry interface to not require plugins to export a ↵John Brawn2016-07-273-26/+59
| | | | | | | | registry" This is causing a huge pile of buildbot failures. llvm-svn: 276857
* Adjust Registry interface to not require plugins to export a registryJohn Brawn2016-07-273-59/+26
| | | | | | | | | | | | | | | | | | | | Currently the Registry class contains the vestiges of a previous attempt to allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a plugin would have its own copy of a registry and export it to be imported by the tool that's loading the plugin. This only works if the plugin is entirely self-contained with the only interface between the plugin and tool being the registry, and in particular this conflicts with how IR pass plugins work. This patch changes things so that instead the add_node function of the registry is exported by the tool and then imported by the plugin, which solves this problem and also means that instead of every plugin having to export every registry they use instead LLVM only has to export the add_node functions. This allows plugins that use a registry to work on Windows if LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used. Differential Revision: http://reviews.llvm.org/D21385 llvm-svn: 276856
* [DAGCombiner] Use APInt directly to detect out of range shift constantsSimon Pilgrim2016-07-272-12/+97
| | | | | | | | Using getZExtValue() will assert if the value doesn't fit into uint64_t - SHL was already doing this, I've just updated ASHR/LSHR to match As mentioned on D22726 llvm-svn: 276855
* Removed unusued template function declaration that has no definition - fixes ↵Simon Pilgrim2016-07-271-3/+1
| | | | | | MSVC warning. llvm-svn: 276852
* [mips] Update the link to the MIPS documentation in CompilerWriterInfo.rst.Daniel Sanders2016-07-271-1/+1
| | | | llvm-svn: 276850
* [MBP] Added some more debug messages and some clean ups /NFCSjoerd Meijer2016-07-271-11/+31
| | | | | | Differential Revision: https://reviews.llvm.org/D22669 llvm-svn: 276849
* Refactor - CodeExtractor : Move check for valid block to static utilitySean Silva2016-07-272-2/+8
| | | | | | | | | | | This lets you actually check to see if a block is valid before trying to extract. Patch by River Riddle! Differential Revision: https://reviews.llvm.org/D22699 llvm-svn: 276846
* [GVNHoist] Fix typo in assert.George Burgess IV2016-07-271-1/+1
| | | | | | This fixes PR28730. llvm-svn: 276844
* Fix Coroutines doc exampleMehdi Amini2016-07-271-1/+1
| | | | | | SSA was broken. llvm-svn: 276843
* [MC] Add command-line option to choose the max nest level in asm macros.Davide Italiano2016-07-272-4/+37
| | | | | | | Submitted by: t83wCSLq Differential Revision: https://reviews.llvm.org/D22313 llvm-svn: 276842
* GVN-hoist: improve code generation for recursive GEPsSebastian Pop2016-07-272-42/+185
| | | | | | | | | | | | | | | | | | | When loading or storing in a field of a struct like "a.b.c", GVN is able to detect the equivalent expressions, and GVN-hoist would fail in the code generation. This is because the GEPs are not hoisted as scalar operations to avoid moving the GEPs too far from their ld/st instruction when the ld/st is not movable. So we end up having to generate code for the GEP of a ld/st when we move the ld/st. In the case of a GEP referring to another GEP as in "a.b.c" we need to code generate all the GEPs necessary to make all the operands available at the new location for the ld/st. With this patch we recursively walk through the GEP operands checking whether all operands are available, and in the case of a GEP operand, it recursively makes all its operands available. Code generation happens from the inner GEPs out until reaching the GEP that appears as an operand of the ld/st. Differential Revision: https://reviews.llvm.org/D22599 llvm-svn: 276841
* GVN-hoist: use DFS numbers instead of walking the instruction streamSebastian Pop2016-07-271-10/+3
| | | | | | | | | The patch replaces a function that walks the IR with a call to firstInBB() that uses the DFS numbering. NFC. Differential Revision: https://reviews.llvm.org/D22809 llvm-svn: 276840
* [coroutines] Part 2 of N: Adding Coroutine IntrinsicsDavid Majnemer2016-07-273-27/+72
| | | | | | | | | | | This is the second patch in the coroutine series. It adds coroutine intrinsics and updates intrinsic cost in TargetTransformInfoImpl.h. Patch by Gor Nishanov! Differential Revision: https://reviews.llvm.org/D22659 llvm-svn: 276839
* add a verbose mode to Loop->print() to print all the basic blocks of a loopSebastian Pop2016-07-273-7/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D22817 llvm-svn: 276838
* add function isLoopLatchSebastian Pop2016-07-271-0/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D22817 llvm-svn: 276837
* refactor code in verifyLoop: NFC.Sebastian Pop2016-07-271-23/+15
| | | | | | Use std::any_of as requested in https://reviews.llvm.org/D22816 llvm-svn: 276835
* [llvm-cov] Escape '\' in strings when emitting JSONVedant Kumar2016-07-272-3/+15
| | | | | | | Test that Windows path separators are escaped properly. Add a round-trip test to verify the JSON produced by the exporter. llvm-svn: 276832
* Move assert as early as possibleSebastian Pop2016-07-271-2/+3
| | | | | | | | Patch written by Aditya Kumar. Differential Revision: https://reviews.llvm.org/D22816 llvm-svn: 276830
* [llvm-go] parameterize $GOPATH constructionAndrew Wilkins2016-07-272-5/+26
| | | | | | | | | | | | | | | | | | | | Summary: To build llgo, you must currently ensure that llgo is in the tools/llgo directory, due to a hard-coded path in llvm-go. To support the use of LLVM_EXTERNAL_LLGO_SOURCE_DIR, we introduce a flag to llvm-go that enables the caller to specify the paths to symlink in the temporary $GOPATH. Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D21634 llvm-svn: 276829
* [ConstantFolding] Correctly handle failures in ↵David Majnemer2016-07-272-4/+27
| | | | | | | | | | | ConstantFoldConstantExpressionImpl Failures in ConstantFoldConstantExpressionImpl were ignored causing crashes down the line. This fixes PR28725. llvm-svn: 276827
* Reverting r276771 due to MSan failures.Andrew Kaylor2016-07-278-60/+1
| | | | llvm-svn: 276824
* AMDGPU: Use rcp for fdiv 1, x with fpmath metadataMatt Arsenault2016-07-264-19/+95
| | | | | | | Using rcp should be OK for safe math usually, so this should not be replacing the original fdiv. llvm-svn: 276823
* Revert r276136 "Use ValueOffsetPair to enhance value reuse during SCEV ↵Hans Wennborg2016-07-265-147/+36
| | | | | | | | | | expansion." It causes Clang tests to fail after Windows self-host (PR28705). (Also reverts follow-up r276139.) llvm-svn: 276822
* AMDGPU: Add more tests for LDS size with occupancyMatt Arsenault2016-07-261-2/+149
| | | | llvm-svn: 276821
* [docs] Fix a sphinx error in llvm-cov.rstVedant Kumar2016-07-261-0/+4
| | | | | | | | | | Failing bot: http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/12025 Fix tested with `ninja docs-llvm-html`. llvm-svn: 276820
* AMDGPU: Use implicit_def for selecting anyextMatt Arsenault2016-07-261-4/+7
| | | | llvm-svn: 276819
* Retry: [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar2016-07-2617-4/+758
| | | | | | | | | | | | | | | | | | | | | | | | This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Changes since the initial commit (r276813): - Fixed the regexes in the tests to handle Windows filepaths. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 llvm-svn: 276818
* docs: Add reference to type metadata to langref.Peter Collingbourne2016-07-261-0/+4
| | | | llvm-svn: 276817
* Revert "[llvm-cov] Add support for exporting coverage data to JSON"Vedant Kumar2016-07-2617-759/+4
| | | | | | | | | This reverts commit r276813. The Windows bots are complaining about some of the filename regexes in the tests: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/5299 llvm-svn: 276816
* MIRParser: Use dot instead of colon to mark subregistersMatthias Braun2016-07-2612-101/+109
| | | | | | | | | | | | | | | | | Change the syntax to use `%0.sub8` to denote a subregister. This seems like a more natural fit to denote subregisters; I also plan to introduce a new ":classname" syntax in upcoming patches to denote the register class of a vreg. Note that this commit disallows plain identifiers to start with a '.' character. This shouldn't affect anything as external names/IR references are all prefixed with '$'/'%', plain identifiers are only used for instruction names, register mask names and subreg indexes. Differential Revision: https://reviews.llvm.org/D22390 llvm-svn: 276815
* [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar2016-07-2617-4/+759
| | | | | | | | | | | | | | | | | | | | This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 llvm-svn: 276813
* Fix docs/Coroutines.rst syntax highlighting on LinuxSanjoy Das2016-07-261-5/+5
| | | | | | | | | | | | | Summary: s/code-block:: C++/code-block:: c++ in docs/Coroutines.rst . Patch by Gor Nishanov! Edited by Sanjoy to fix a missing s/C/c/. Reviewers: sanjoy, rengolin Differential Revision: https://reviews.llvm.org/D22832 llvm-svn: 276806
* AMDGPU/R600: Remove dead custom insertersMatt Arsenault2016-07-261-209/+1
| | | | | | The intrinsics for these were removed, so this is dead. llvm-svn: 276805
* AMDGPU: Minor AsmPrinter cleanupsMatt Arsenault2016-07-261-79/+84
| | | | llvm-svn: 276804
* [Hexagon] Post-increment loads/stores enhancementsKrzysztof Parzyszek2016-07-266-112/+168
| | | | | | | - Generate vector post-increment stores more aggressively. - Predicate post-increment and vector stores in early if-conversion. llvm-svn: 276800
* GlobalISel: add generic load and store instructions.Tim Northover2016-07-267-1/+162
| | | | | | | Pretty straightforward, the only oddity is the MachineMemOperand (which it's surprisingly difficult to share code for). llvm-svn: 276799
* [X86] Split out absdiff detection from SAD combine. NFC.Michael Kuperstein2016-07-261-59/+64
| | | | | | Preparation for supporting PSADBW emission for straight-line code. llvm-svn: 276798
* [Hexagon] Gracefully handle reg class mismatch in HexagonLoopRescheduleKrzysztof Parzyszek2016-07-262-13/+49
| | | | llvm-svn: 276793
* [Hexagon] Rerun bit tracker on new instructions in RIEKrzysztof Parzyszek2016-07-264-5/+225
| | | | | | | | | | | | | | | | | | | Consider this case: vreg1 = A2_zxth vreg0 (1) ... vreg2 = A2_zxth vreg1 (2) Redundant instruction elimination could delete the instruction (1) because the user (2) only cares about the low 16 bits. Then it could delete (2) because the input is already zero-extended. The problem is that the properties allowing each individual instruction to be deleted depend on the existence of the other instruction, so either one can be deleted, but not both. The existing check for this situation in RIE was insufficient. The fix is to update all dependent cells when an instruction is removed (replaced via COPY) in RIE. llvm-svn: 276792
* Add link to the Hexagon documentationKrzysztof Parzyszek2016-07-261-0/+5
| | | | llvm-svn: 276788
* [Hexagon] Bitwise operations for insert/extract word not simplifiedKrzysztof Parzyszek2016-07-264-29/+132
| | | | | | | Change the bit simplifier to generate REG_SEQUENCE instructions in addition to COPY, which will handle cases of word insert/extract. llvm-svn: 276787
OpenPOWER on IntegriCloud