summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Fix NVPTX/call-with-alloca-buffer.ll after r276777.Justin Lebar2016-07-261-4/+2
| | | | | | | r276777 makes InstSimplify stronger, letting it see through some unnecessary addrspace casts. llvm-svn: 276786
* MIRParser: Use shorter cfi identifiersMatthias Braun2016-07-2620-75/+75
| | | | | | | | | | | | | | | | In an instruction like: CFI_INSTRUCTION .cfi_def_cfa ... we can drop the '.cfi_' prefix since that should be obvious by the context: CFI_INSTRUCTION def_cfa ... While being a terser and cleaner syntax this also prepares to dropping support for identifiers starting with a dot character so we can use it for expressions. Differential Revision: http://reviews.llvm.org/D22388 llvm-svn: 276785
* [MC] Don't crash when trying to emit a relocation against .bss.Davide Italiano2016-07-262-2/+11
| | | | | | Turn that into an error instead. llvm-svn: 276783
* [CMAKE] Find ld64 using xcrunBruno Cardoso Lopes2016-07-261-2/+13
| | | | | | | | | | | | | | | | Given similar reasons from r276710, ld64 scrubs DYLD_* environment if called from the shim executable /usr/bin/ld. Add support for finding ld64 via xcrun. This is needed in order to get LIT to have the full path to the ld4 executable. Differential Revision: https://reviews.llvm.org/D22791 rdar://problem/24300926 llvm-svn: 276781
* [InstSimplify] Cast folding can be made more genericDavid Majnemer2016-07-263-61/+51
| | | | | | Use isEliminableCastPair to determine if a pair of casts are foldable. llvm-svn: 276777
* [LoopUtils] Sort headersAdam Nemet2016-07-261-3/+4
| | | | llvm-svn: 276776
* GlobalISel: add correct operand type to G_FRAME_INDEX instrs.Tim Northover2016-07-262-4/+4
| | | | | | Frame indices should use "addFrameIndex", not "addImm". llvm-svn: 276775
* [Hexagon] Add support for proper handling of H and L constraintsKrzysztof Parzyszek2016-07-262-8/+32
| | | | | | | | | H -> High part of reg pair. L -> Low part of reg pair. Patch by Sundeep Kushwaha. llvm-svn: 276773
* GlobalISel: omit braces on MachineInstr types when there's only one.Tim Northover2016-07-267-60/+67
| | | | | | Tidies up the representation a bit in the common case. llvm-svn: 276772
* Re-committing r275284: add support to inline __builtin_mempcpyAndrew Kaylor2016-07-268-1/+60
| | | | | | | | Patch by Sunita Marathe Differential Revision: http://reviews.llvm.org/D21920 llvm-svn: 276771
* AMDGPU: Make AMDGPUMachineFunction fields privateMatt Arsenault2016-07-2610-56/+80
| | | | | | | | | ABIArgOffset is a problem because properly fsetting the KernArgSize requires that the reserved area before the real kernel arguments be correctly aligned, which requires fixing clover. llvm-svn: 276766
* AMDGPU: Add missing tests for xnack option for HSAMatt Arsenault2016-07-261-5/+21
| | | | llvm-svn: 276765
* AMDGPU: Add fp legacy instruction intrinsicsMatt Arsenault2016-07-268-2/+125
| | | | | | | This could use some additional optimization work to use mad/mac legacy. llvm-svn: 276764
* GlobalISel: add specialized buildCopy function to MachineInstrBuilder.Tim Northover2016-07-264-3/+16
| | | | | | NFC. llvm-svn: 276763
* GlobalISel: give MachineInstrBuilder a uniform interface. NFC.Tim Northover2016-07-263-88/+62
| | | | | | | | | | | Instead of an ad-hoc collection of "buildInstr" functions with varying numbers of registers, this uses variadic templates to provide for as many regs as needed! Also make IRtranslator use new "buildBr" function instead of some weird generic one that no-one else would really use. llvm-svn: 276762
* [mips] Fix typos in spelling of lowerRETURNADDR.Daniel Sanders2016-07-263-3/+3
| | | | | | The first letter was mistakenly capitalized. llvm-svn: 276753
* [Hexagon] Update store offset when not packetizing it with allocframeKrzysztof Parzyszek2016-07-262-15/+51
| | | | | | | | | | When the packetizer wants to put a store to a stack slot in the same packet with an allocframe, it updates the store offset to reflect the value of SP before it is updated by allocframe. If the store cannot be packetized with the allocframe after all, the offset needs to be updated back to the previous value. llvm-svn: 276749
* [ARM] Improve error messages for .arch_extension directiveOliver Stannard2016-07-262-4/+33
| | | | | | | | | | | | - More informative message when extension name is not an identifier token. - Stop parsing directive if extension is unknown (avoid duplicate error messages). - Report unsupported extensions with a source location, rather than report_fatal_error. Differential Revision: https://reviews.llvm.org/D22806 llvm-svn: 276748
* [ARM] Implement -mimplicit-it assembler optionOliver Stannard2016-07-266-38/+820
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option, compatible with gas's -mimplicit-it, controls the generation/checking of implicit IT blocks in ARM/Thumb assembly. This option allows two behaviours that were not possible before: - When in ARM mode, emit a warning when assembling a conditional instruction that is not in an IT block. This is enabled with -mimplicit-it=never and -mimplicit-it=thumb. - When in Thumb mode, automatically generate IT instructions when an instruction with a condition code appears outside of an IT block. This is enabled with -mimplicit-it=thumb and -mimplicit-it=always. The default option is -mimplicit-it=arm, which matches the existing behaviour (allow conditional ARM instructions outside IT blocks without warning, and error if a conditional Thumb instruction is outside an IT block). The general strategy for generating IT blocks in Thumb mode is to keep a small list of instructions which should be in the IT block, and only emit them when we encounter something in the input which means we cannot continue the block. This could be caused by: - A non-predicable instruction - An instruction with a condition not compatible with the IT block - The IT block already contains 4 instructions - A branch-like instruction (including ALU instructions with the PC as the destination), which cannot appear in the middle of an IT block - A label (branching into an IT block is not legal) - A change of section, architecture, ISA, etc - The end of the assembly file. Some of these, such as change of section and end of file, are parsed outside of the ARM asm parser, so I've added a new virtual function to AsmParser to ensure any previously-parsed instructions have been emitted. The ARM implementation of this flushes the currently pending IT block. We now have to try instruction matching up to 3 times, because we cannot know if the current IT block is valid before matching, and instruction matching changes depending on the IT block state (due to the 16-bit ALU instructions, which set the flags iff not in an IT block). In the common case of not having an open implicit IT block and the instruction being matched not needing one, we still only have to run the matcher once. I've removed the ITState.FirstCond variable, because it does not store any information that isn't already represented by CurPosition. I've also updated the comment on CurPosition to accurately describe it's meaning (which this patch doesn't change). Differential Revision: https://reviews.llvm.org/D22760 llvm-svn: 276747
* [lit] Document the 'available_features' member of the config object.Daniel Sanders2016-07-261-0/+3
| | | | llvm-svn: 276744
* [X86][SSE] Added extra memory folding tests for cvtsd2ss intrinsicSimon Pilgrim2016-07-261-0/+36
| | | | | | SSE only fold partial reg update instructions when optsize is enabled llvm-svn: 276743
* [X86][SSE] Fixed issue with memory folding of (v)cvtsd2ss intrinsicsSimon Pilgrim2016-07-263-2/+58
| | | | | | | | Fixed typo in the intrinsic definitions of (v)cvtsd2ss with memory folding. This was only unearthed when rL276102 started using the intrinsic again..... llvm-svn: 276740
* [mips] MIPS64R6 compact branch supportSimon Dardis2016-07-268-17/+387
| | | | | | | | | | | | | MIPS64R6 compact branch support. As the MIPS LLVM backend uses distinct MachineInstrs for certain 32 and 64 bit instructions (e.g. BEQ & BEQ64) that map to the same instruction, extend compact branch support for the corresponding 64bit branches. Reviewers: dsanders Differential Revision: https://reviews.llvm.org/D20164 llvm-svn: 276739
* Fixed spelling in commentSimon Pilgrim2016-07-261-1/+1
| | | | llvm-svn: 276738
* [tblgen] Compare const char * with strcmp instead of creating StringRef.Benjamin Kramer2016-07-261-2/+2
| | | | | | | Avoids a call to strlen on both strings which always reads the entire string. strcmp can use early exit. llvm-svn: 276737
* [mips] sgtu, s[rl]l, sra, dnegu, neg instruction aliasesSimon Dardis2016-07-2621-5/+182
| | | | | | | | | | | Add the instruction alias sgtu (register form only), two operand forms of s[rl]l and sra, and missing single/two operand forms of dnegu/neg. Reviewers: dsanders Differential Revision: https://reviews.llvm.org/D22752 llvm-svn: 276736
* [X86] Remove isCommutable=1 from instructions that also load. Commuting such ↵Craig Topper2016-07-262-9/+13
| | | | | | instruction isn't useful as it would unfold the load. The exception being FMA3 instructions. llvm-svn: 276733
* [AVX512] Don't mark ADDSSZr_Int or MULSSZr_Int as commutable. The intrinsics ↵Craig Topper2016-07-261-2/+2
| | | | | | have one of their arguments indicated as passing through the high bits and we can't commute that. llvm-svn: 276732
* Remove obsolete XFAIL for a test that used to sometimes miscompile underDimitry Andric2016-07-261-5/+0
| | | | | | | FreeBSD with gcc 4.2.1, a long time ago (see r113824). Noticed by Pete Cooper. llvm-svn: 276730
* Reapply: [InstSimplify] Add support for bitcasts"David Majnemer2016-07-265-4/+65
| | | | | | | This reverts commit r276700 and reapplies r276698. The relevant clang tests have been updated. llvm-svn: 276727
* Propery format doccomment in lto.h . NFCAmaury Sechet2016-07-261-4/+4
| | | | llvm-svn: 276725
* LiveIntervalAnalysis: Fix handleMoveDown() problemMatthias Braun2016-07-262-62/+93
| | | | | | | | | | | | If we move a last-use register read to a later position we may skip intermediate segments. This may require us to not only extend the segment before the NewIdx, but also extend the segment live-in to OldIdx. This switches LiveIntervalTest to use AMDGPU so we can test subregister liveness. llvm-svn: 276724
* GlobalISel: remove redundant ';'s. NFCTim Northover2016-07-263-3/+3
| | | | llvm-svn: 276723
* [CMake] Updating Xcode Toolchain creation to support Xcode 7Chris Bieneman2016-07-261-6/+7
| | | | | | | | Recent changes to Xcode have changed the structure of Xcode toolchains. This patch makes the xcode-toolchain goop construct a new-format Xcode toolchain that is compatible with Xcode 7. The new format has a compatibility version key, so when a new format comes out we can support multiple formats in parallel. llvm-svn: 276718
* GVN-hoist: use a DFS numbering of instructions (PR28670)Sebastian Pop2016-07-262-42/+38
| | | | | | | | | | | Instead of DFS numbering basic blocks we now DFS number instructions that avoids the costly operation of which instruction comes first in a basic block. Patch mostly written by Daniel Berlin. Differential Revision: https://reviews.llvm.org/D22777 llvm-svn: 276714
* GVN-hoist: limit hoisting depth (PR28670)Sebastian Pop2016-07-261-0/+11
| | | | | | | | | | This patch adds an option to specify the maximum depth in a BB at which to consider hoisting instructions. Hoisting instructions from a deeper level is not profitable as it increases register pressure and compilation time. Differential Revision: https://reviews.llvm.org/D22772 llvm-svn: 276713
* [safestack] Fix stack guard live range.Evgeniy Stepanov2016-07-263-2/+38
| | | | | | Stack guard slot is live throughout the function. llvm-svn: 276712
* [CMake] Support feeding DYLD_LIBRARY_PATH into archiver callsChris Bieneman2016-07-251-3/+27
| | | | | | | | | | | | | | OS X 10.11 has a feature named System Integrity Protection. The goal of the feature is to make system binaries immutable (even as root). One part of this is that protected binaries do not receive DYLD_* environment variables because the kernel scrubs them before process launch. This causes problems for LTO bootstrap builds on Darwin that try to use the just-built libLTO with the host ar, ranlib, or libtool. This patch addresses two problems. (1) The tools themselves aren't protected binaries but the shim tools installed at / are, so we need to call xcrun -find to find libtool instead of using the one CMake finds. (2) Some build tools (ninja and make) use /bin/sh to invoke their subprocesses. Since /bin/sh is a system binary, the kernel scrubs the DYLD envars from their environment. To work around this we need to set the environment variables as part of the archiver commands, so the envars are set by the shell process instead of on the shell process. llvm-svn: 276710
* [lit] Don't match tool names within new PM's <> markersAdam Nemet2016-07-251-1/+1
| | | | | | For example, stop expanding 'opt' in -passes='require<opt-remark-emit>'. llvm-svn: 276707
OpenPOWER on IntegriCloud