summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [ArchiveWriter] Use EndianStream. No functional change intended.Benjamin Kramer2015-06-171-9/+4
| | | | llvm-svn: 239913
* [MC/Dwarf] Encode DW_CFA_advance_loc in target endianess.Benjamin Kramer2015-06-171-9/+8
| | | | | | This matches GNU as output. llvm-svn: 239911
* [mips] [IAS] Add support for expanding LASym with a source register operand.Toma Tabacu2015-06-171-12/+19
| | | | | | | | | | | | Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9348 llvm-svn: 239910
* Tweak wording of alignment static_assert messages.James Y Knight2015-06-173-12/+14
| | | | llvm-svn: 239907
* [mips] [IAS] Add support for the B{L,G}{T,E}(U) branch pseudo-instructions.Toma Tabacu2015-06-172-0/+234
| | | | | | | | | | | | | | | | Summary: This does not include support for the immediate variants of these pseudo-instructions. Fixes llvm.org/PR20968. Reviewers: dsanders Reviewed By: dsanders Subscribers: seanbruno, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D8537 llvm-svn: 239905
* [mips] [IAS] Fix LA with relative label operands.Toma Tabacu2015-06-171-12/+9
| | | | | | | | | | | | | | | | | Summary: Call MCSymbolRefExpr::create() with a MCSymbol* argument, not with a StringRef of the Symbol's name, in order to avoid creating invalid temporary symbols for relative labels (e.g. {$,.L}tmp00, {$,.L}tmp10 etc.). Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10498 llvm-svn: 239901
* [mips] [IAS] Fix LW with relative label operands.Toma Tabacu2015-06-171-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, MCSymbolRefExpr::create() was called with a StringRef of the symbol name, which it would then search for in the Symbols StringMap (from MCContext). However, relative labels (which are temporary symbols) are apparently not stored in the Symbols StringMap, so we end up creating a new {$,.L}tmp symbol ({$,.L}tmp00, {$,.L}tmp10 etc.) each time we create an MCSymbolRefExpr by passing in the symbol name as a StringRef. Fortunately, there is a version of MCSymbolRefExpr::create() which takes an MCSymbol* and we already have an MCSymbol* at that point, so we can just pass that in instead of the StringRef. I also removed the local StringRef calls to MCSymbolRefExpr::create() from expandMemInst(), as those cases can be handled by evaluateRelocExpr() anyway. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9938 llvm-svn: 239897
* AVX-512: cvtusi2ss/d intrinsics.Igor Breger2015-06-173-35/+61
| | | | | | | | | Change builtin function name and signature ( add third parameter - rounding mode ). Added tests for intrinsics. Differential Revision: http://reviews.llvm.org/D10473 llvm-svn: 239888
* [PM/AA] Suffix lots of member variables that directly use enumerationChandler Carruth2015-06-171-48/+72
| | | | | | | | | | | | | | names for counts with the word 'Count' to make them less ambiguous. This will be an actual error if we use unscoped enums for any of these, and generally this seems much clearer to read. Also, use clang-format to normalize the formatting of this code which seems to have been needlessly odd. No functionality changed here. llvm-svn: 239887
* [PM/AA] Remove the UnknownSize static member from AliasAnalysis.Chandler Carruth2015-06-1710-69/+74
| | | | | | | | This is now living in MemoryLocation, which is what it pertains to. It is also an enum there rather than a static data member which is left never defined. llvm-svn: 239886
* [PM/AA] Remove the Location typedef from the AliasAnalysis class nowChandler Carruth2015-06-1730-245/+233
| | | | | | | | | | | | that it is its own entity in the form of MemoryLocation, and update all the callers. This is an entirely mechanical change. References to "Location" within AA subclases become "MemoryLocation", and elsewhere "AliasAnalysis::Location" becomes "MemoryLocation". Hope that helps out-of-tree folks update. llvm-svn: 239885
* [PM/AA] Split the location computation out of getArgLocation so theChandler Carruth2015-06-174-91/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | virtual interface on AliasAnalysis only deals with ModRef information. This interface was both computing memory locations by using TLI and other tricks to estimate the size of memory referenced by an operand, and computing ModRef information through similar investigations. This change narrows the scope of the virtual interface on AliasAnalysis slightly. Note that all of this code could live in BasicAA, and be done with a single investigation of the argument, if it weren't for the fact that the generic code in AliasAnalysis::getModRefBehavior for a callsite calls into the virtual aspect of (now) getArgModRefInfo. But this patch's arrangement seems a not terrible way to go for now. The other interesting wrinkle is how we could reasonably extend LLVM with support for custom memory location sizes and mod/ref behavior for library routines. After discussions with Hal on the review, the conclusion is that this would be best done by fleshing out the much desired support for extensions to TLI, and support these types of queries in that interface where we would likely be doing other library API recognition and analysis. Differential Revision: http://reviews.llvm.org/D10259 llvm-svn: 239884
* Revert "AArch64: Use CMP;CCMP sequences for and/or/setcc trees."Matthias Braun2015-06-174-255/+72
| | | | | | | | | The patch triggers a miscompile on SPEC 2006 403.gcc with the (ref) 200.i and scilab.i inputs. I opened PR23866 to track analysis of this. This reverts commit r238793. llvm-svn: 239880
* [Hexagon] Adding MC ELF streamer and updating addend relocation test which ↵Colin LeMahieu2015-06-177-4/+307
| | | | | | shows correct ELF symbol. llvm-svn: 239876
* Fix alignment issues in LLVM.James Y Knight2015-06-173-7/+37
| | | | | | | | | | | | | | | | | | Adds static_asserts to ensure alignment of concatenated objects is correct, and fixes them where they are not. Also changes the definition of AlignOf to use constexpr, except on MSVC, to avoid enum comparison warnings from GCC. (There's not too much of this in llvm itself, most of the fun is in clang). This seems to make LLVM actually work without Bus Error on 32bit sparc. Differential Revision: http://reviews.llvm.org/D10271 llvm-svn: 239872
* Handle forward referenced function when streaming bitcode.Rafael Espindola2015-06-171-24/+35
| | | | | | | | Without this the included unit test would assert in assert(BasicBlockFwdRefs.empty() && "Unresolved blockaddress fwd references"); llvm-svn: 239871
* Handle MaterializeAll in getLazyBitcodeModuleImpl. NFC.Rafael Espindola2015-06-171-15/+11
| | | | | | | | This just handles both cases in the same place. Extracted from a patch by Karl Schimpf. llvm-svn: 239870
* Use std::unique_ptr to manage the DataStreamer in bitcode parsing.Rafael Espindola2015-06-163-37/+41
| | | | | | We were already deleting it, this just makes it explicit. llvm-svn: 239867
* Rename and improve emitSectionOffset.Rafael Espindola2015-06-164-29/+19
| | | | | | | | | | | | | | | | | | | | | | | Different object formats represent references from dwarf in different ways. ELF uses a relocation to the referenced point (except for .dwo) and COFF/MachO use the offset of the referenced point inside its section. This patch renames emitSectionOffset because * It doesn't produce an offset on ELF. * It changes behavior depending on how DWARF is represented, so adding dwarf to its name is probably a good thing. The patch also adds an option to force the use of offsets.That avoids funny looking code like if (!UseOffsets) Asm->emitSectionOffset.... It was correct, but read as if the ! was inverted. llvm-svn: 239866
* Refactor RecurrenceInstDescTyler Nowicki2015-06-162-45/+42
| | | | | | Moved RecurrenceInstDesc into RecurrenceDescriptor to simplify the namespaces. llvm-svn: 239862
* Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC.Rafael Espindola2015-06-165-38/+36
| | | | llvm-svn: 239858
* [X86][SSE] Vectorize v2i32 to v2f64 conversionsSimon Pilgrim2015-06-164-4/+32
| | | | | | | | This patch enables support for the conversion of v2i32 to v2f64 to use the CVTDQ2PD xmm instruction and stay on the SSE unit instead of scalarizing, sign extending to i64 and using CVTSI2SDQ scalar conversions. Differential Revision: http://reviews.llvm.org/D10433 llvm-svn: 239855
* rename variables; NFCSanjay Patel2015-06-161-13/+13
| | | | | | ...because I see 'StoreBW' and read it as 'store bandwidth' llvm-svn: 239850
* Reapply 239795 - [InstCombine] Propagate non-null facts to call parametersPhilip Reames2015-06-161-0/+18
| | | | | | | | | | | The original change broke clang side tests. I will be submitting those momentarily. This change includes post commit feedback on the original change from from Pete Cooper. Original Submission comments: If a parameter to a function is known non-null, use the existing parameter attributes to record that fact at the call site. This has no optimization benefit by itself - that I know of - but is an enabling change for http://reviews.llvm.org/D9129. Differential Revision: http://reviews.llvm.org/D9132 llvm-svn: 239849
* extract some code into a helper function for MergeConsecutiveStores(); NFCISanjay Patel2015-06-161-43/+57
| | | | llvm-svn: 239847
* Improve handling of end of file in the bitcode reader.Rafael Espindola2015-06-161-40/+5
| | | | | | | | | | | | | | | | | | | | | | Before this patch the bitcode reader would read a module from a file that contained in order: * Any number of non MODULE_BLOCK sub blocks. * One MODULE_BLOCK * Any number of non MODULE_BLOCK sub blocks. * 4 '\n' characters to handle OS X's ranlib. Since we support lazy reading of modules, any information that is relevant for the module has to be in the MODULE_BLOCK or before it. We don't gain anything from checking what is after. This patch then changes the reader to stop once the MODULE_BLOCK has been successfully parsed. This avoids the ugly special case for .bc files in an archive and makes it easier to embed bitcode files. llvm-svn: 239845
* Fix PR 23525 - Separate header mass propagation in irregular loops.Diego Novillo2015-06-161-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When propagating mass through irregular loops, the mass flowing through each loop header may not be equal. This was causing wrong frequencies to be computed for irregular loop headers. Fixed by keeping track of masses flowing through each of the headers in an irregular loop. To do this, we now keep track of per-header backedge weights. After the loop mass is distributed through the loop, the backedge weights are used to re-distribute the loop mass to the loop headers. Since each backedge will have a mass proportional to the different branch weights, the loop headers will end up with a more approximate weight distribution (as opposed to the current distribution that assumes that every loop header is the same). Reviewers: dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10348 llvm-svn: 239843
* VirtRegMap: Add undef flag when reading undefined subregisters.Matthias Braun2015-06-161-18/+63
| | | | | | | | | | | | | | | | | While completely undefined registers are easy to catch and get their <undef> flag early in ProcessImplicitDefs/RegisterCoalescer reading from a partially defined register where just the subreg happens to be undefined is harder to catch so we only add the undef flag in the virtual register rewriting step. No testcase as I cannot reproduce the problem on any of the in-tree targets at the moment. This fixes rdar://21387089 Differential Revision: http://reviews.llvm.org/D10470 llvm-svn: 239838
* TargetRegisterInfo: Make the concept of imprecise lane masks explicitMatthias Braun2015-06-161-1/+2
| | | | | | | | | | | | | | | | | | | | LaneMasks as given by getSubRegIndexLaneMask() have a limited number of of bits, so for targets with more than 31 disjunct subregister there may be cases where: getSubReg(Reg,A) does not overlap getSubReg(Reg,B) but we still have (getSubRegIndexLaneMask(A) & getSubRegIndexLaneMask(B)) != 0. I had hoped to keep this an implementation detail of the tablegen but as my next commit shows we can avoid unnecessary imp-defs operands if we know that the lane masks in use are precise. This is in preparation to http://reviews.llvm.org/D10470. llvm-svn: 239837
* [X86] Rename some frame lowering variablesReid Kleckner2015-06-161-26/+28
| | | | | | | | | | | | | | | | Old names, new names, and what they really mean: - IsWin64 -> IsWin64CC: This is true on non-Windows x86_64 platforms when the ms_abi calling convention is used. - IsWinEH -> IsWin64Prologue: True when the target is Win64, regardless of calling convention. Changes the prologue to obey the constraints of the Win64 unwinder. - NeedsWinEH -> NeedsWinCFI: We're using the win64 prologue *and* the we want .xdata unwind tables. Analogous to NeedsDwarfCFI. NFC llvm-svn: 239836
* Rename Reduction variables/structures to Recurrence.Tyler Nowicki2015-06-163-86/+86
| | | | | | | | A reduction is a special kind of recurrence. In the loop vectorizer we currently identify basic reductions. Future patches will extend this to identifying basic recurrences. llvm-svn: 239835
* Have MachOObjectFile::isValidArch() accept armv7Frederic Riss2015-06-161-0/+1
| | | | llvm-svn: 239833
* MIR Parser: Report an error when a machine function doesn't have a ↵Alex Lorenz2015-06-161-0/+3
| | | | | | | | | | | | | corresponding function. This commit reports an error when a machine function from a MIR file that contains LLVM IR can't find a function with the same name in the loaded LLVM IR module. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10468 llvm-svn: 239831
* propagate IR-level fast-math-flags to DAG nodes, disabled by defaultSanjay Patel2015-06-164-51/+63
| | | | | | | | | | | | | | | | | | | | | | | This is an updated version of the patch that was checked in at: http://reviews.llvm.org/rL237046 but subsequently reverted because it exposed a bug in the DAG Combiner: http://reviews.llvm.org/D9893 This time, there's an enablement flag ("EnableFMFInDAG") around the code in SelectionDAGBuilder where we copy the set of FP optimization flags from IR instructions to DAG nodes. So, in theory, there should be no functional change from this patch as-is, but it will allow testing with the added functionality to proceed via "-enable-fmf-dag" passed to llc. This patch adds the minimum plumbing necessary to use IR-level fast-math-flags (FMF) in the backend without actually using them for anything yet. This is a follow-on to: http://reviews.llvm.org/rL235997 Differential Revision: http://reviews.llvm.org/D10403 llvm-svn: 239828
* Properly handle the mftb instruction.Kit Barton2015-06-165-36/+58
| | | | | | | | | | | | | | | | | | | | The mftb instruction was incorrectly marked as deprecated in the PPC Backend. Instead, it should not be treated as deprecated, but rather be implemented using the mfspr instruction. A similar patch was put into GCC last year. Details can be found at: https://sourceware.org/ml/binutils/2014-11/msg00383.html. This change will replace instances of the mftb instruction with the mfspr instruction for all CPUs except 601 and pwr3. This will also be the default behaviour. Additional details can be found in: https://llvm.org/bugs/show_bug.cgi?id=23680 Phabricator review: http://reviews.llvm.org/D10419 llvm-svn: 239827
* [Hexagon] Alphabetical ordering of functions, NFC.Colin LeMahieu2015-06-161-5/+5
| | | | llvm-svn: 239826
* Revert "Revert "Fix merges of non-zero vector stores""Matt Arsenault2015-06-161-6/+20
| | | | | | | | Reapply r239539. Don't assume the collected number of stores is the same vector size. Just take the first N stores to fill the vector. llvm-svn: 239825
* Clean up redundant copies of Triple objects. NFCDaniel Sanders2015-06-1629-58/+54
| | | | | | | | | | | | | | Summary: Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10382 llvm-svn: 239823
* [InstSimplify] Allow folding of fdiv X, X with just NaNs ignoredBenjamin Kramer2015-06-161-3/+3
| | | | | | | | Any combination of +-inf/+-inf is NaN so it's already ignored with nnan and we can skip checking for ninf. Also rephrase logic in comments a bit. llvm-svn: 239821
* [mips][ias] Expand on r238751 to cover as many relocs as possible.Daniel Sanders2015-06-161-22/+36
| | | | | | | | | | | | | | | | | | | | | | | Summary: Relocs that can be converted from absolute to PC-relative now do so if IsPCRel is true. Relocs that require PC-relative now call llvm_unreachable() if IsPCRel is false and similarly those that require absolute assert that IsPCRel is false. Note that while it looks like some relocs (e.g. R_MIPS_26) can be converted into the MIPS32r6/MIPS64r6 relocs (R_MIPS_PC*_S2), it isn't actually valid to do so. Placeholders have been left in the testcase for unsupported relocs and relocs that cannot be generated at the moment. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits, rafael Differential Revision: http://reviews.llvm.org/D10184 llvm-svn: 239817
* Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-166-26/+27
| | | | | | | | | | | | | | | | | | TargetMachine::getTargetTriple(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10381 llvm-svn: 239815
* Silence an MSVC warning about not all control paths returning a value; NFC.Aaron Ballman2015-06-161-0/+1
| | | | llvm-svn: 239814
* Recommit r239721: Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-163-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | InitMCObjectFileInfo. NFC. Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. The first time this was committed it accidentally fixed an inconsistency in triples in llvm-mc and this caused a failure. This inconsistency was fixed in r239808. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239812
* [mips] [IAS] Refactor symbol-address loading code into a helper function. NFC.Toma Tabacu2015-06-161-17/+23
| | | | | | | | | | | | Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9523 llvm-svn: 239811
* [MachineSink] Address post-commit review commentsArnaud A. de Grandmaison2015-06-161-21/+28
| | | | | | | The successors cache is now a local variable, making it more visible that it is only valid for the MBB being processed. llvm-svn: 239807
* [AVX512] add integer min/max intrinsics support.Asaf Badouh2015-06-162-24/+48
| | | | | | | review: http://reviews.llvm.org/D10439 llvm-svn: 239806
* X86: optimized i64 vector multiply with constantElena Demikhovsky2015-06-161-5/+11
| | | | | | | | | When we multiply two 64-bit vectors, we extract lower and upper part and use the PMULUDQ instruction. When one of the operands is a constant, the upper part may be zero, we know this at compile time. Example: %a = mul <4 x i64> %b, <4 x i64> < i64 5, i64 5, i64 5, i64 5>. I'm checking the value of the upper part and prevent redundant "multiply", "shift" and "add" operations. llvm-svn: 239802
* Revert 239795Philip Reames2015-06-161-18/+0
| | | | | | I forgot to update some clang test cases. I'll fix and resubmit tomorrow. llvm-svn: 239800
* [AArch64] Generalize extract-high DUP extension to MOVI/MVNI.Ahmed Bougacha2015-06-161-15/+24
| | | | | | | | | | | | | | | | | | These are really immediate DUPs, and suffer from the same problem with long instructions with a high/2 variant (e.g. smull). By extending a MOVI (or DUP, before this patch), we can avoid an ext on the other operand of the long instruction, e.g. turning: ext.16b v0, v0, v0, #8 movi.4h v1, #0x53 smull.4s v0, v0, v1 into: movi.8h v1, #0x53 smull2.4s v0, v0, v1 While there, add a now-necessary combine to fold (VT NVCAST (VT x)). llvm-svn: 239799
* Move logic from JumpThreading into LazyValue info to simplify caller. Philip Reames2015-06-162-53/+51
| | | | | | | | This change is hopefully NFC. The only tricky part is that I changed the context instruction being used to the branch rather than the comparison. I believe both to be correct, but the branch is strictly more powerful. With the moved code, using the branch instruction is required for the basic block comparison test to return the same result. The previous code was able to directly access both the branch and the comparison where the revised code is not. Differential Revision: http://reviews.llvm.org/D9652 llvm-svn: 239797
OpenPOWER on IntegriCloud