summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* This patch solves a problem with passing varargs parameters under the PPC64Bill Schmidt2012-10-291-1/+11
| | | | | | | | | | | | | | | | | | ELF ABI. A varargs parameter consisting of a single-precision floating-point value, or of a single-element aggregate containing a single-precision floating-point value, must be passed in the low-order (rightmost) four bytes of the doubleword stack slot reserved for that parameter. If there are GPR protocol registers remaining, the parameter must also be mirrored in the low-order four bytes of the reserved GPR. Prior to this patch, such parameters were being passed in the high-order four bytes of the stack slot and the mirrored GPR. The patch adds a new test case to verify the correct code generation. llvm-svn: 166968
* Implement patterns for extloadi8 and extloadi16Reed Kotler2012-10-291-0/+4
| | | | llvm-svn: 166960
* In various places throughout the code generator, there were specialUlrich Weigand2012-10-293-85/+66
| | | | | | | | | checks to avoid performing compile-time arithmetic on PPCDoubleDouble. Now that APFloat supports arithmetic on PPCDoubleDouble, those checks are no longer needed, and we can treat the type like any other. llvm-svn: 166958
* APFloat cleanup: Remove now unused "arithmeticOK" logic.Ulrich Weigand2012-10-291-42/+8
| | | | llvm-svn: 166954
* APFloat cleanup: Remove now unused fields "sign2" and "exponent2".Ulrich Weigand2012-10-291-21/+9
| | | | llvm-svn: 166952
* Implement arithmetic on APFloat with PPCDoubleDouble semantics byUlrich Weigand2012-10-291-76/+65
| | | | | | | | | | | | treating it as if it were an IEEE floating-point type with 106-bit mantissa. This makes compile-time arithmetic on "long double" for PowerPC in clang (in particular parsing of floating point constants) work, and fixes all "long double" related failures in the test suite. llvm-svn: 166951
* [ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] isChad Rosier2012-10-291-10/+37
| | | | | | | equivalent to [expr1 + expr2]. See test cases for more examples. rdar://12470392 llvm-svn: 166949
* Rename the BB-vectorize flag to match the dragonegg nameNadav Rotem2012-10-291-2/+2
| | | | llvm-svn: 166948
* Fix PR14204Michael Liao2012-10-291-0/+15
| | | | | | - Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled. llvm-svn: 166947
* Fix typoJoerg Sonnenberger2012-10-291-2/+2
| | | | llvm-svn: 166945
* Completely disallow partial copies in adjustCopiesBackFrom().Jakob Stoklund Olesen2012-10-291-1/+2
| | | | | | | | | | | | Partial copies can show up even when CoalescerPair.isPartial() returns false. For example: %vreg24:dsub_0<def> = COPY %vreg31:dsub_0; QPR:%vreg24,%vreg31 Such a partial-partial copy is not good enough for the transformation adjustCopiesBackFrom() needs to do. llvm-svn: 166944
* Allow i32/i64 for 'f' constraint on PowerPC.Ulrich Weigand2012-10-291-2/+2
| | | | | | This fixes PR12757. llvm-svn: 166943
* Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (theDuncan Sands2012-10-295-25/+19
| | | | | | | | | wrapper returns a vector of integers when passed a vector of pointers) by having getIntPtrType itself return a vector of integers in this case. Outside of this wrapper, I didn't find anywhere in the codebase that was relying on the old behaviour for vectors of pointers, so give this a whirl through the buildbots. llvm-svn: 166939
* Remove code to saturate profile counts.Bob Wilson2012-10-291-8/+1
| | | | | | | | | We may need to change the way profile counter values are stored, but saturation is the wrong thing to do. Just remove it for now. Patch by Alastair Murray! llvm-svn: 166938
* Change the PassManagerBuilder (used by -O3) loop vectorizer flag from ↵Nadav Rotem2012-10-291-4/+8
| | | | | | -vectorize to -vectorize-loops because we dont want to share the same flag as the bb-vectorizer. llvm-svn: 166937
* Minor style fixes for TargetTransformationInfo and TargetTransformImplHans Wennborg2012-10-291-3/+3
| | | | llvm-svn: 166936
* Expand all atomic ops for mips16.Reed Kotler2012-10-291-2/+23
| | | | llvm-svn: 166935
* PPCSubtarget.h: Add explicit braces.NAKAMURA Takumi2012-10-291-1/+2
| | | | llvm-svn: 166932
* PPCSubtarget.h: Whitespace.NAKAMURA Takumi2012-10-291-22/+22
| | | | llvm-svn: 166931
* This patch addresses a problem with the Post RA scheduler generating anPreston Gurd2012-10-291-0/+5
| | | | | | | | | | | | | | incorrect instruction sequence due to it not being aware that an inline assembly instruction may reference memory. This patch fixes the problem by causing the scheduler to always assume that any inline assembly code instruction could access memory. This is necessary because the internal representation of the inline instruction does not include any information about memory accesses. This should fix PR13504. llvm-svn: 166929
* This patch adds alignment information for long double to the 64-bit PowerPCBill Schmidt2012-10-291-0/+6
| | | | | | | | | | | | | | | | | ELF subtarget. The existing logic is used as a fallback to avoid any changes to the Darwin ABI. PPC64 ELF now has two possible data layout strings: one for FreeBSD, which requires 8-byte alignment, and a default string that requires 16-byte alignment. I've added a test for PPC64 Linux to verify the 16-byte alignment. If somebody wants to add a separate test for FreeBSD, that would be great. Note that there is a companion patch to update the alignment information in Clang, which I am committing now as well. llvm-svn: 166928
* Factorize code: rather than duplication the logic in getPointerTypeSizeInBits,Duncan Sands2012-10-291-14/+2
| | | | | | just call getPointerTypeSizeInBits. No functionality change. llvm-svn: 166926
* Silence a GCC warning about comparing signed and unsigned types.Duncan Sands2012-10-291-2/+2
| | | | llvm-svn: 166922
* Make use of common-symbol alignment info in ELF loader.Tim Northover2012-10-294-18/+47
| | | | | | Patch by Amara Emerson. llvm-svn: 166919
* Add interface for querying object files for symbol values.Tim Northover2012-10-292-0/+9
| | | | | | | | Currently only implemented for ELF. Patch by Amara Emerson. llvm-svn: 166918
* Calling TLI->getNumRegisters creates a circular dependency when building ↵Nadav Rotem2012-10-291-2/+4
| | | | | | | | | | LLVM using cmake. Get the number of registers by calling getTypeLegalizationCost. PR14199. llvm-svn: 166911
* Remove unused typedef.Lang Hames2012-10-291-1/+0
| | | | llvm-svn: 166910
* llvm-extract changes linkages so that functions on both sides of theRafael Espindola2012-10-291-12/+25
| | | | | | | split module can see each other. If it is keeping a symbol that already has a non local linkage, it doesn't need to change it. llvm-svn: 166908
* llvm-extract was unable to handle aliases. It would leave a copy on theRafael Espindola2012-10-291-0/+30
| | | | | | | | | | | | | | | | | | output of both llvm-extract foo.ll -func=bar and llvm-extract foo.ll -func=bar -delete so the two new files could not be linked together anymore. With this change alias are handled almost like functions and global variables. Almost because with alias we cannot just clear the initializer/body, we have to create a new declaration and replace the alias with it. The net result is that now the output of the above commands can be linked even if foo.ll has aliases. llvm-svn: 166907
* Implement brind operator for mips16.Reed Kotler2012-10-281-0/+19
| | | | llvm-svn: 166903
* Remove TargetELFWriterInfo.Rafael Espindola2012-10-2822-719/+2
| | | | | | All the credit goes to Jan Voung for noticing it was dead! llvm-svn: 166902
* This patch is for the implementation of mips16 complex pattern addr16.Reed Kotler2012-10-287-48/+276
| | | | | | | | | | | | | | | | | | | | | Previously mips16 was sharing the pattern addr which is used for mips32 and mips64. This had a number of problems: 1) Storing and loading byte and halfword quantities for mips16 has particular problems due to the primarily non mips16 nature of SP. When we must load/store byte/halfword stack objects in a function, we must create a mips16 alias register for SP. This functionality is tested in stchar.ll. 2) We need to have an FP register under certain conditions (such as dynamically sized alloca). We use mips16 register S0 for this purpose. In this case, we also use this register when accessing frame objects so this issue also affects the complex pattern addr16. This functionality is tested in alloca16.ll. The Mips16InstrInfo.td has been updated to use addr16 instead of addr. The complex pattern C++ function for addr has been copied to addr16 and updated to reflect the above issues. llvm-svn: 166897
* Never attempt to join an early-clobber def with a regular kill.Jakob Stoklund Olesen2012-10-271-0/+14
| | | | | | This fixes PR14194. llvm-svn: 166880
* LoopIdiom: Add checks to avoid turning memmove into an infinite loop.Benjamin Kramer2012-10-271-2/+2
| | | | | | I don't think this is possible with the current implementation but that may change eventually. llvm-svn: 166877
* LoopIdiom: Recognize memmove loops.Benjamin Kramer2012-10-271-10/+24
| | | | | | | | | | | This turns loops like for (unsigned i = 0; i != n; ++i) p[i] = p[i+1]; into memmove, which has a highly optimized implementation in most libcs. This was really easy with the new DependenceAnalysis :) llvm-svn: 166875
* LoopIdiom: Replace custom dependence analysis with DependenceAnalysis.Benjamin Kramer2012-10-271-80/+45
| | | | | | | | | | | Requires a lot less code and complexity on loop-idiom's side and the more precise analysis can catch more cases, like the one I included as a test case. This also fixes the edge-case miscompilation from PR9481. Compile time performance seems to be slightly worse, but this is mostly due to an extra LCSSA run scheduled by the PassManager and should be fixed there. llvm-svn: 166874
* SCEV validator: Ignore CouldNotCompute/undef on both sides. This is mostly ↵Benjamin Kramer2012-10-271-3/+6
| | | | | | noise and blocks finding more severe bugs. llvm-svn: 166873
* SCEV validator: Add workarounds for some common false positives due to the ↵Benjamin Kramer2012-10-271-0/+18
| | | | | | way it handles strings. llvm-svn: 166872
* Update BBVectorize to use the new VTTI instr. cost interfaces.Hal Finkel2012-10-271-3/+58
| | | | | | | | The monolithic interface for instruction costs has been split into several functions. This is the corresponding change. No functionality change is intended. llvm-svn: 166865
* 1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to ↵Nadav Rotem2012-10-271-1/+1
| | | | | | | | | return the type of the split result. 2. Change the maximum vectorization width from 4 to 8. 3. A test for both. llvm-svn: 166864
* [code size][ARM] Emit regular call instructions instead of the move, branch ↵Quentin Colombet2012-10-271-2/+8
| | | | | | sequence llvm-svn: 166854
* Implement MipsHi for mips16Reed Kotler2012-10-271-2/+8
| | | | llvm-svn: 166852
* [mips] Do not tail-call optimize vararg functions or functions with byvalAkira Hatanaka2012-10-272-9/+8
| | | | | | | | arguments. This is rather conservative and should be fixed later to be more aggressive. llvm-svn: 166851
* [mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in theAkira Hatanaka2012-10-271-1/+4
| | | | | | previous iteration. llvm-svn: 166850
* Use the methods and classes that were added to simplify LowerCall and Akira Hatanaka2012-10-272-425/+41
| | | | | | | | LowerFormalArguments in MipsTargetLowering. No functionality change intended. llvm-svn: 166846
* Add method MipsTargetLowering::writeVarArgRegs which copies argument registersAkira Hatanaka2012-10-272-0/+51
| | | | | | of vararg functions back to the stack. llvm-svn: 166844
* Add method MipsTargetLowering::passByValArg.Akira Hatanaka2012-10-272-0/+105
| | | | | | | | This method emits nodes for passing byval arguments in registers and stack. This has the same functionality as existing functions PassByValArg64 and WriteByValArg which will be deleted later. llvm-svn: 166843
* Add method MipsTargetLowering::copyByValRegs.Akira Hatanaka2012-10-272-0/+53
| | | | | | | | This method copies byval arguments passed in registers onto the stack and has the same functionality as existing functions CopyMips64ByValRegs and ReadByValArg which will be deleted later. llvm-svn: 166841
* Add class MipsCC which provides methods used to analyze formal and callAkira Hatanaka2012-10-262-0/+192
| | | | | | arguments and inquire about calling convention information. llvm-svn: 166840
* Delete MipsFunctionInfo::InArgFIRange. Akira Hatanaka2012-10-262-13/+1
| | | | llvm-svn: 166837
OpenPOWER on IntegriCloud