summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [Bitcode] Replace hand-coded little endian handling with Endian.h functions.Benjamin Kramer2015-06-173-22/+8
| | | | | | No functional change intended. llvm-svn: 239944
* AMDGPU: Change unreachable into reported errorMatt Arsenault2015-06-171-2/+4
| | | | llvm-svn: 239943
* remove unnecessary casts; NFCSanjay Patel2015-06-171-4/+2
| | | | llvm-svn: 239942
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-17313-1258/+1350
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* [CodeGenPrepare] Generalize inserted set from truncs to any inst.Ahmed Bougacha2015-06-172-21/+44
| | | | | | | | | It's been used before to avoid infinite loops caused by separate CGP optimizations undoing one another. We found one more such issue caused by r238054. To avoid it, generalize the "InsertedTruncs" set to any inst, and use it to avoid touching those again. llvm-svn: 239938
* [Hexagon] Adding a number of other tests for min/max instructions and ↵Colin LeMahieu2015-06-1719-2/+327
| | | | | | loading i1s. llvm-svn: 239935
* Move IsUsedInReloc from MCSymbolELF to MCSymbol.Rafael Espindola2015-06-177-38/+14
| | | | | | There is a free bit is MCSymbol and MachO needs the same information. llvm-svn: 239933
* LowerBitSets: Do not assign names to aliases of unnamed bitset element objects.Peter Collingbourne2015-06-172-4/+4
| | | | | | | The restriction on unnamed aliases was removed in r239921. Mostly reverts r239590, but we keep the test. llvm-svn: 239923
* Allow aliases to be unnamed.Rafael Espindola2015-06-174-8/+22
| | | | | | | | | | If globals can be unnamed, there is no reason for aliases to be different. The restriction was there since the original implementation in r36435. I can only guess it was there because of the old bison parser for the old alias syntax. llvm-svn: 239921
* Use a range loop. NFC.Rafael Espindola2015-06-171-16/+11
| | | | llvm-svn: 239919
* [Hexagon] Adding some compare tests, fixing existing XFAILed tests, and ↵Colin LeMahieu2015-06-179-8/+331
| | | | | | removing mcpu=hexagonv4 since that's the minimum version anyway. llvm-svn: 239917
* fix typos in comments; NFCSanjay Patel2015-06-171-2/+2
| | | | llvm-svn: 239916
* Add documentation for new backedge mass propagation in irregular loops.Diego Novillo2015-06-174-87/+17
| | | | | | Tweak test cases and rename headerIndexFor -> getHeaderIndex. llvm-svn: 239915
* Use named temporaries for directional labels.Rafael Espindola2015-06-173-12/+17
| | | | | | | | | | Directional labels can show up in symbol tables (and we have a llvm-mc test for that). Given that, we need to make sure they are named. With that out of the way, use setUseNamesOnTempLabels in llvm-mc so that it too benefits from the memory saving. llvm-svn: 239914
* [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-172-9/+76
| | | | | | This matches GNU as output. llvm-svn: 239911
* [mips] [IAS] Add support for expanding LASym with a source register operand.Toma Tabacu2015-06-172-12/+25
| | | | | | | | | | | | 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-174-14/+16
| | | | llvm-svn: 239907
* [mips] [IAS] Add support for the B{L,G}{T,E}(U) branch pseudo-instructions.Toma Tabacu2015-06-175-0/+556
| | | | | | | | | | | | | | | | 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-172-12/+14
| | | | | | | | | | | | | | | | | 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] Add test for SW with relative label operands. NFC.Toma Tabacu2015-06-171-0/+5
| | | | | | | | | | | | Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10497 llvm-svn: 239899
* [mips] [IAS] Fix LW with relative label operands.Toma Tabacu2015-06-172-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-175-50/+165
| | | | | | | | | 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-1712-79/+81
| | | | | | | | 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-1735-303/+285
| | | | | | | | | | | | 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-176-98/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-175-295/+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
* Try to fix the MSVC build.Rafael Espindola2015-06-171-1/+1
| | | | llvm-svn: 239877
* [Hexagon] Adding MC ELF streamer and updating addend relocation test which ↵Colin LeMahieu2015-06-178-5/+308
| | | | | | shows correct ELF symbol. llvm-svn: 239876
* Fix alignment issues in LLVM.James Y Knight2015-06-176-9/+59
| | | | | | | | | | | | | | | | | | 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-172-24/+80
| | | | | | | | 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-168-48/+55
| | | | | | We were already deleting it, this just makes it explicit. llvm-svn: 239867
* Rename and improve emitSectionOffset.Rafael Espindola2015-06-165-34/+25
| | | | | | | | | | | | | | | | | | | | | | | 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-163-95/+87
| | | | | | Moved RecurrenceInstDesc into RecurrenceDescriptor to simplify the namespaces. llvm-svn: 239862
* Add some tests based on PR21711Sanjay Patel2015-06-161-0/+61
| | | | | | | | These were originally added in r227242, but that patch was reverted because it caused a failure on AArch64. llvm-svn: 239860
* Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC.Rafael Espindola2015-06-168-44/+42
| | | | llvm-svn: 239858
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-165-0/+45
| | | | llvm-svn: 239856
* [X86][SSE] Vectorize v2i32 to v2f64 conversionsSimon Pilgrim2015-06-166-73/+42
| | | | | | | | 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-165-3/+25
| | | | | | | | | | | 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-163-42/+12
| | | | | | | | | | | | | | | | | | | | | | 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-164-40/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [Statepoints] Test only change. Check that statepoint lowering didn't ↵Igor Laevsky2015-06-161-0/+2
| | | | | | | | generate more than expected amount of spills. See http://reviews.llvm.org/D10402 for related discussion. llvm-svn: 239842
* 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-162-1/+15
| | | | | | | | | | | | | | | | | | | | 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-164-137/+150
| | | | | | | | 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
OpenPOWER on IntegriCloud