summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Attempt to pacify windows bots, again.Michael Kuperstein2016-07-251-0/+3
| | | | llvm-svn: 276703
* [ARM] Saturation instructions are DSP-onlyRenato Golin2016-07-257-20/+55
| | | | | | | | | | | The saturation instructions appeared in v6T2, with DSP extensions, but they were being accepted / generated on any, with the new introduction of the saturation detection in the back-end. This commit restricts the usage to DSP-enable only cores. Fixes PR28607. llvm-svn: 276701
* Revert "[InstSimplify] Add support for bitcasts"David Majnemer2016-07-254-64/+3
| | | | | | | This reverts commit r276698. Clang has tests which rely on the optimizer :( llvm-svn: 276700
* [InstSimplify] Add support for bitcastsDavid Majnemer2016-07-254-3/+64
| | | | | | | BitCasts of BitCasts can be folded away as can BitCasts which don't change the type of the operand. llvm-svn: 276698
* [WebAssembly] Update for Target API (TargetRegistry::RegisterMCAsmBackend) ↵David Blaikie2016-07-251-1/+2
| | | | | | change llvm-svn: 276694
* [X86] Regenerate v2i256 shift legalization testsSimon Pilgrim2016-07-251-26/+116
| | | | llvm-svn: 276692
* [X86] Regenerate i64 shift legalization testsSimon Pilgrim2016-07-251-38/+160
| | | | llvm-svn: 276691
* GlobalISel: add generic casts to IRTranslatorTim Northover2016-07-258-10/+135
| | | | | | | | | This adds LLVM's 3 main cast instructions (inttoptr, ptrtoint, bitcast) to the IRTranslator. The first two are direct translations (with 2 MachineInstr types each). Since LLT discards information, a bitcast might become trivial and we emit a COPY in those cases instead. llvm-svn: 276690
* GlobalISel[AArch64]: support pointer types in argument lowering.Tim Northover2016-07-253-2/+63
| | | | | | | | They're basically i64 for AArch64, but we'll leave them intact for stranger targets. Also add some tests for the (very few) other cases we can handle right now. llvm-svn: 276689
* [PM] Port SymbolRewriter to the new PMMichael Kuperstein2016-07-257-24/+58
| | | | | | Differential Revision: https://reviews.llvm.org/D22703 llvm-svn: 276687
* Next step along the way to getting good error messages for bad archives.Kevin Enderby2016-07-255-45/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | I consulted with Lang Hames on this work, and the goal was to add a bit of "where" in the archive the error occurred along with what the error was. So this step changes ArchiveMemberHeader into a class with a pointer to the archive header and the parent archive. Which allows the methods in the ArchiveMemberHeader to determine which member the header is for to include that information in the error message. For this first step the "where" is just the offset to the member in the archive. The next step will be a new method on ArchiveMemberHeader to get the full name, if possible, to be use in the error message. Which will now be possible as ArchiveMemberHeader contains a pointer to the Archive with its string table and its size, etc. so the full name can be determined from the header if it is valid. Also this change adds the missing checks the archive header is actually contained in the buffer and is not truncated, as well as if the terminating characters are correct in the header. And changes one error message in Archive::Child::getNext() where the name or offset to member is now added. llvm-svn: 276686
OpenPOWER on IntegriCloud