summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add -alias and -ralias options to match what we have for functions andRafael Espindola2012-10-29
| | | | | | globals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166909 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-extract changes linkages so that functions on both sides of theRafael Espindola2012-10-29
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166908 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-extract was unable to handle aliases. It would leave a copy on theRafael Espindola2012-10-29
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166907 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement brind operator for mips16.Reed Kotler2012-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166903 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove TargetELFWriterInfo.Rafael Espindola2012-10-28
| | | | | | All the credit goes to Jan Voung for noticing it was dead! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166902 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch is for the implementation of mips16 complex pattern addr16.Reed Kotler2012-10-28
| | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166897 91177308-0d34-0410-b5e6-96231b3b80d8
* Never attempt to join an early-clobber def with a regular kill.Jakob Stoklund Olesen2012-10-27
| | | | | | This fixes PR14194. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166880 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopIdiom: Add checks to avoid turning memmove into an infinite loop.Benjamin Kramer2012-10-27
| | | | | | I don't think this is possible with the current implementation but that may change eventually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166877 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopIdiom: Recognize memmove loops.Benjamin Kramer2012-10-27
| | | | | | | | | | | 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 :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166875 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopIdiom: Replace custom dependence analysis with DependenceAnalysis.Benjamin Kramer2012-10-27
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166874 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEV validator: Ignore CouldNotCompute/undef on both sides. This is mostly ↵Benjamin Kramer2012-10-27
| | | | | | noise and blocks finding more severe bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166873 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEV validator: Add workarounds for some common false positives due to the ↵Benjamin Kramer2012-10-27
| | | | | | way it handles strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166872 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify that there is an option other than OAuth for Phabricator andChandler Carruth2012-10-27
| | | | | | | | offer up my email to the spam lords for it. Hopefully this will eventually be more automatic, but we don't want people to think there is only one option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166870 91177308-0d34-0410-b5e6-96231b3b80d8
* Update BBVectorize to use the new VTTI instr. cost interfaces.Hal Finkel2012-10-27
| | | | | | | | The monolithic interface for instruction costs has been split into several functions. This is the corresponding change. No functionality change is intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166865 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to ↵Nadav Rotem2012-10-27
| | | | | | | | | | | return the type of the split result. 2. Change the maximum vectorization width from 4 to 8. 3. A test for both. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166864 91177308-0d34-0410-b5e6-96231b3b80d8
* [code size][ARM] Emit regular call instructions instead of the move, branch ↵Quentin Colombet2012-10-27
| | | | | | sequence git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166854 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement MipsHi for mips16Reed Kotler2012-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166852 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Do not tail-call optimize vararg functions or functions with byvalAkira Hatanaka2012-10-27
| | | | | | | | | | arguments. This is rather conservative and should be fixed later to be more aggressive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166851 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in theAkira Hatanaka2012-10-27
| | | | | | | | previous iteration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166850 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the methods and classes that were added to simplify LowerCall and Akira Hatanaka2012-10-27
| | | | | | | | | | LowerFormalArguments in MipsTargetLowering. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166846 91177308-0d34-0410-b5e6-96231b3b80d8
* Add method MipsTargetLowering::writeVarArgRegs which copies argument registersAkira Hatanaka2012-10-27
| | | | | | | | of vararg functions back to the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166844 91177308-0d34-0410-b5e6-96231b3b80d8
* Add method MipsTargetLowering::passByValArg.Akira Hatanaka2012-10-27
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166843 91177308-0d34-0410-b5e6-96231b3b80d8
* Add method MipsTargetLowering::copyByValRegs.Akira Hatanaka2012-10-27
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166841 91177308-0d34-0410-b5e6-96231b3b80d8
* Add class MipsCC which provides methods used to analyze formal and callAkira Hatanaka2012-10-26
| | | | | | | | arguments and inquire about calling convention information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166840 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete MipsFunctionInfo::InArgFIRange. Akira Hatanaka2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166837 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the VectorTargetTransformInfo interface.Nadav Rotem2012-10-26
| | | | | | | | | | | | Add getCostXXX calls for different families of opcodes, such as casts, arithmetic, cmp, etc. Port the LoopVectorizer to the new API. The LoopVectorizer now finds instructions which will remain uniform after vectorization. It uses this information when calculating the cost of these instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166836 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."Jakob Stoklund Olesen2012-10-26
| | | | | | | Keep the integer_insertelement test case, the new coalescer can handle this kind of lane insertion without help from pseudo-instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166835 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid an unused-variable warning when asserts are disabled.Kaelyn Uhrain2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166834 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce indentation with early exit.Jakob Stoklund Olesen2012-10-26
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166829 91177308-0d34-0410-b5e6-96231b3b80d8
* Also make the current basic block a class member.Jakob Stoklund Olesen2012-10-26
| | | | | | Don't pass it around everywhere as a function argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166828 91177308-0d34-0410-b5e6-96231b3b80d8
* implement mips16 tls global addrReed Kotler2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166827 91177308-0d34-0410-b5e6-96231b3b80d8
* MCRegisterClass should be returned by const ref, not by value.Lang Hames2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166822 91177308-0d34-0410-b5e6-96231b3b80d8
* Suggest llvm_unreachable over assert(0).Jordan Rose2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166821 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the Processed set a class member.Jakob Stoklund Olesen2012-10-26
| | | | | | Don't pass it everywhere as an argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166820 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Add a comment.Chad Rosier2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166819 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col.Jakob Stoklund Olesen2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166818 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ARMBaseRegisterInfo::isReservedReg().Jakob Stoklund Olesen2012-10-26
| | | | | | It is just as easy to use MRI::isReserved() now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166817 91177308-0d34-0410-b5e6-96231b3b80d8
* Add GPRPair Register class to ARM.Jakob Stoklund Olesen2012-10-26
| | | | | | | | | Some instructions in ARM require 2 even-odd paired GPRs. This patch adds support for such register class. Patch by Weiming Zhao! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166816 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace and function names to be coding standardy.Jakob Stoklund Olesen2012-10-26
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166814 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the canCombineSubRegIndices() target hook.Jakob Stoklund Olesen2012-10-26
| | | | | | | The new coalescer can already do all of this, so there is no need to duplicate the efforts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166813 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LoopDependenceAnalysis.Benjamin Kramer2012-10-26
| | | | | | | It was unmaintained and not much more than a stub. The new DependenceAnalysis pass is both more general and complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166810 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the unneeded initializers.Bill Wendling2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166804 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop APInt::shl from generating llvm.trapDerek Schuff2012-10-26
| | | | | | | | | | | APInt::shl generated llvm.trap to guard against shifts greater than bit-width. This was already checked with an assert, and there was a special case for shifts equal to bit-width. Modify this check to catch shifts greater than or equal to bit-width, so llvm.trap isn't generated. Patch contributed by JF Bastien git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166803 91177308-0d34-0410-b5e6-96231b3b80d8
* Move target-specific BBVectorize tests into a separate directory.Hal Finkel2012-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166802 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the target-specific tests, which require specific backends, to dirs ↵Nadav Rotem2012-10-26
| | | | | | that only run if the target is present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166796 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the internalize pass to internalize all symbols when given an emptyRafael Espindola2012-10-26
| | | | | | | list of externals. This makes sense since a shared library with no symbols can still be useful if it has static constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166795 91177308-0d34-0410-b5e6-96231b3b80d8
* Lowercase the argument for TargetTransformInfo so it's consistent with all ↵Benjamin Kramer2012-10-26
| | | | | | other passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166794 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.Chad Rosier2012-10-26
| | | | | | | Part of rdar://12576868 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166792 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Add support for the TYPE operator.Chad Rosier2012-10-26
| | | | | | | Part of rdar://12576868 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166790 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopSimplify: Preserve DependenceAnalysis.Benjamin Kramer2012-10-26
| | | | | | | | | | This is currently true, but may change when DA grows more aggressive caching. Without this setting it's impossible to use DA from a LoopPass because DA is a function pass and cannot be properly scheduled in between LoopPasses. The LoopManager reacts to this with an infinite loop which made this really annoying to debug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166788 91177308-0d34-0410-b5e6-96231b3b80d8