oota-llvm.git
12 years agoAPFloat cleanup: Remove now unused "arithmeticOK" logic.
Ulrich Weigand [Mon, 29 Oct 2012 18:18:44 +0000 (18:18 +0000)]
APFloat cleanup: Remove now unused "arithmeticOK" logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166954 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove redundant test case from r166949, per Eli's suggestion.
Chad Rosier [Mon, 29 Oct 2012 18:18:26 +0000 (18:18 +0000)]
Remove redundant test case from r166949, per Eli's suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166953 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAPFloat cleanup: Remove now unused fields "sign2" and "exponent2".
Ulrich Weigand [Mon, 29 Oct 2012 18:17:42 +0000 (18:17 +0000)]
APFloat cleanup: Remove now unused fields "sign2" and "exponent2".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement arithmetic on APFloat with PPCDoubleDouble semantics by
Ulrich Weigand [Mon, 29 Oct 2012 18:09:01 +0000 (18:09 +0000)]
Implement arithmetic on APFloat with PPCDoubleDouble semantics by
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166951 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] is
Chad Rosier [Mon, 29 Oct 2012 18:01:54 +0000 (18:01 +0000)]
[ms-inline asm] Add support for the [] operator.  Essentially, [expr1][expr2] is
equivalent to [expr1 + expr2].  See test cases for more examples.
rdar://12470392

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166949 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename the BB-vectorize flag to match the dragonegg name
Nadav Rotem [Mon, 29 Oct 2012 18:01:14 +0000 (18:01 +0000)]
Rename the BB-vectorize flag to match the dragonegg name

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166948 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix PR14204
Michael Liao [Mon, 29 Oct 2012 17:57:12 +0000 (17:57 +0000)]
Fix PR14204

- Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166947 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix typo
Joerg Sonnenberger [Mon, 29 Oct 2012 17:56:15 +0000 (17:56 +0000)]
Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166945 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCompletely disallow partial copies in adjustCopiesBackFrom().
Jakob Stoklund Olesen [Mon, 29 Oct 2012 17:51:52 +0000 (17:51 +0000)]
Completely disallow partial copies in adjustCopiesBackFrom().

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166944 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAllow i32/i64 for 'f' constraint on PowerPC.
Ulrich Weigand [Mon, 29 Oct 2012 17:49:34 +0000 (17:49 +0000)]
Allow i32/i64 for 'f' constraint on PowerPC.
This fixes PR12757.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166943 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
Duncan Sands [Mon, 29 Oct 2012 17:31:46 +0000 (17:31 +0000)]
Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166939 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove code to saturate profile counts.
Bob Wilson [Mon, 29 Oct 2012 17:27:39 +0000 (17:27 +0000)]
Remove code to saturate profile counts.

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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166938 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize...
Nadav Rotem [Mon, 29 Oct 2012 16:36:25 +0000 (16:36 +0000)]
Change the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize to -vectorize-loops because we dont want to share the same flag as the bb-vectorizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166937 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMinor style fixes for TargetTransformationInfo and TargetTransformImpl
Hans Wennborg [Mon, 29 Oct 2012 16:26:52 +0000 (16:26 +0000)]
Minor style fixes for TargetTransformationInfo and TargetTransformImpl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166936 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExpand all atomic ops for mips16.
Reed Kotler [Mon, 29 Oct 2012 16:16:54 +0000 (16:16 +0000)]
Expand all atomic ops for mips16.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166935 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agollvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.
NAKAMURA Takumi [Mon, 29 Oct 2012 16:07:28 +0000 (16:07 +0000)]
llvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166934 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPPCSubtarget.h: Add explicit braces.
NAKAMURA Takumi [Mon, 29 Oct 2012 15:51:42 +0000 (15:51 +0000)]
PPCSubtarget.h: Add explicit braces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166932 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPPCSubtarget.h: Whitespace.
NAKAMURA Takumi [Mon, 29 Oct 2012 15:51:35 +0000 (15:51 +0000)]
PPCSubtarget.h: Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166931 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis patch addresses a problem with the Post RA scheduler generating an
Preston Gurd [Mon, 29 Oct 2012 15:01:23 +0000 (15:01 +0000)]
This patch addresses a problem with the Post RA scheduler generating an
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166929 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThis patch adds alignment information for long double to the 64-bit PowerPC
Bill Schmidt [Mon, 29 Oct 2012 14:59:36 +0000 (14:59 +0000)]
This patch adds alignment information for long double to the 64-bit PowerPC
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166928 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFactorize code: rather than duplication the logic in getPointerTypeSizeInBits,
Duncan Sands [Mon, 29 Oct 2012 14:30:05 +0000 (14:30 +0000)]
Factorize code: rather than duplication the logic in getPointerTypeSizeInBits,
just call getPointerTypeSizeInBits.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166926 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLoads and stores without an explicit alignment use the abi alignment not the
Duncan Sands [Mon, 29 Oct 2012 14:12:44 +0000 (14:12 +0000)]
Loads and stores without an explicit alignment use the abi alignment not the
preferred alignment.  Correct the documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166925 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRather than duplicating the getPointerSize code just call getPointerSize.
Duncan Sands [Mon, 29 Oct 2012 12:19:04 +0000 (12:19 +0000)]
Rather than duplicating the getPointerSize code just call getPointerSize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166923 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSilence a GCC warning about comparing signed and unsigned types.
Duncan Sands [Mon, 29 Oct 2012 11:29:53 +0000 (11:29 +0000)]
Silence a GCC warning about comparing signed and unsigned types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166922 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAlign the data section correctly when loading an ELF file.
Tim Northover [Mon, 29 Oct 2012 10:47:07 +0000 (10:47 +0000)]
Align the data section correctly when loading an ELF file.

Patch by Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166920 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake use of common-symbol alignment info in ELF loader.
Tim Northover [Mon, 29 Oct 2012 10:47:04 +0000 (10:47 +0000)]
Make use of common-symbol alignment info in ELF loader.

Patch by Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166919 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd interface for querying object files for symbol values.
Tim Northover [Mon, 29 Oct 2012 10:47:00 +0000 (10:47 +0000)]
Add interface for querying object files for symbol values.

Currently only implemented for ELF.

Patch by Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agova_start, va_end, va_copy: InstrinsicInst subclasses and InstVisitor support.
Evgeniy Stepanov [Mon, 29 Oct 2012 09:39:03 +0000 (09:39 +0000)]
va_start, va_end, va_copy: InstrinsicInst subclasses and InstVisitor support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166916 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCalling TLI->getNumRegisters creates a circular dependency when building LLVM using...
Nadav Rotem [Mon, 29 Oct 2012 05:28:35 +0000 (05:28 +0000)]
Calling TLI->getNumRegisters creates a circular dependency when building LLVM using cmake.

Get the number of registers by calling getTypeLegalizationCost.

PR14199.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166911 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused typedef.
Lang Hames [Mon, 29 Oct 2012 04:57:52 +0000 (04:57 +0000)]
Remove unused typedef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166910 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd -alias and -ralias options to match what we have for functions and
Rafael Espindola [Mon, 29 Oct 2012 02:23:07 +0000 (02:23 +0000)]
Add -alias and -ralias options to match what we have for functions and
globals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166909 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agollvm-extract changes linkages so that functions on both sides of the
Rafael Espindola [Mon, 29 Oct 2012 01:59:03 +0000 (01:59 +0000)]
llvm-extract changes linkages so that functions on both sides of the
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

12 years agollvm-extract was unable to handle aliases. It would leave a copy on the
Rafael Espindola [Mon, 29 Oct 2012 00:27:55 +0000 (00:27 +0000)]
llvm-extract was unable to handle aliases. It would leave a copy on the
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

12 years agoImplement brind operator for mips16.
Reed Kotler [Sun, 28 Oct 2012 23:08:07 +0000 (23:08 +0000)]
Implement brind operator for mips16.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166903 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove TargetELFWriterInfo.
Rafael Espindola [Sun, 28 Oct 2012 21:34:43 +0000 (21:34 +0000)]
Remove TargetELFWriterInfo.
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

12 years agoThis patch is for the implementation of mips16 complex pattern addr16.
Reed Kotler [Sun, 28 Oct 2012 06:02:37 +0000 (06:02 +0000)]
This patch is for the implementation of mips16 complex pattern addr16.
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

12 years agoNever attempt to join an early-clobber def with a regular kill.
Jakob Stoklund Olesen [Sat, 27 Oct 2012 17:41:27 +0000 (17:41 +0000)]
Never attempt to join an early-clobber def with a regular kill.

This fixes PR14194.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166880 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLoopIdiom: Add checks to avoid turning memmove into an infinite loop.
Benjamin Kramer [Sat, 27 Oct 2012 15:18:28 +0000 (15:18 +0000)]
LoopIdiom: Add checks to avoid turning memmove into an infinite loop.

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

12 years agoLoopIdiom: Recognize memmove loops.
Benjamin Kramer [Sat, 27 Oct 2012 14:25:51 +0000 (14:25 +0000)]
LoopIdiom: Recognize memmove loops.

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

12 years agoLoopIdiom: Replace custom dependence analysis with DependenceAnalysis.
Benjamin Kramer [Sat, 27 Oct 2012 14:25:44 +0000 (14:25 +0000)]
LoopIdiom: Replace custom dependence analysis with DependenceAnalysis.

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

12 years agoSCEV validator: Ignore CouldNotCompute/undef on both sides. This is mostly noise...
Benjamin Kramer [Sat, 27 Oct 2012 11:36:07 +0000 (11:36 +0000)]
SCEV validator: Ignore CouldNotCompute/undef on both sides. This is mostly noise and blocks finding more severe bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166873 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSCEV validator: Add workarounds for some common false positives due to the way it...
Benjamin Kramer [Sat, 27 Oct 2012 10:45:01 +0000 (10:45 +0000)]
SCEV validator: Add workarounds for some common false positives due to the way it handles strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166872 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClarify that there is an option other than OAuth for Phabricator and
Chandler Carruth [Sat, 27 Oct 2012 09:47:33 +0000 (09:47 +0000)]
Clarify that there is an option other than OAuth for Phabricator and
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

12 years agoUpdate BBVectorize to use the new VTTI instr. cost interfaces.
Hal Finkel [Sat, 27 Oct 2012 04:33:48 +0000 (04:33 +0000)]
Update BBVectorize to use the new VTTI instr. cost interfaces.

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

12 years ago1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to return...
Nadav Rotem [Sat, 27 Oct 2012 04:11:32 +0000 (04:11 +0000)]
1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to 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

12 years ago[code size][ARM] Emit regular call instructions instead of the move, branch sequence
Quentin Colombet [Sat, 27 Oct 2012 01:10:17 +0000 (01:10 +0000)]
[code size][ARM] Emit regular call instructions instead of the move, branch sequence

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166854 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement MipsHi for mips16
Reed Kotler [Sat, 27 Oct 2012 00:57:14 +0000 (00:57 +0000)]
Implement MipsHi for mips16

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166852 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[mips] Do not tail-call optimize vararg functions or functions with byval
Akira Hatanaka [Sat, 27 Oct 2012 00:56:56 +0000 (00:56 +0000)]
[mips] Do not tail-call optimize vararg functions or functions with byval
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

12 years ago[mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in the
Akira Hatanaka [Sat, 27 Oct 2012 00:44:39 +0000 (00:44 +0000)]
[mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in the
previous iteration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166850 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse the methods and classes that were added to simplify LowerCall and
Akira Hatanaka [Sat, 27 Oct 2012 00:29:43 +0000 (00:29 +0000)]
Use the methods and classes that were added to simplify LowerCall and
LowerFormalArguments in MipsTargetLowering.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166846 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd method MipsTargetLowering::writeVarArgRegs which copies argument registers
Akira Hatanaka [Sat, 27 Oct 2012 00:21:13 +0000 (00:21 +0000)]
Add method MipsTargetLowering::writeVarArgRegs which copies argument registers
of vararg functions back to the stack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166844 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd method MipsTargetLowering::passByValArg.
Akira Hatanaka [Sat, 27 Oct 2012 00:16:36 +0000 (00:16 +0000)]
Add method MipsTargetLowering::passByValArg.

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

12 years agoAdd method MipsTargetLowering::copyByValRegs.
Akira Hatanaka [Sat, 27 Oct 2012 00:10:18 +0000 (00:10 +0000)]
Add method MipsTargetLowering::copyByValRegs.

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

12 years agoAdd class MipsCC which provides methods used to analyze formal and call
Akira Hatanaka [Fri, 26 Oct 2012 23:56:38 +0000 (23:56 +0000)]
Add class MipsCC which provides methods used to analyze formal and call
arguments and inquire about calling convention information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166840 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDelete MipsFunctionInfo::InArgFIRange.
Akira Hatanaka [Fri, 26 Oct 2012 23:49:51 +0000 (23:49 +0000)]
Delete MipsFunctionInfo::InArgFIRange.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166837 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRefactor the VectorTargetTransformInfo interface.
Nadav Rotem [Fri, 26 Oct 2012 23:49:28 +0000 (23:49 +0000)]
Refactor the VectorTargetTransformInfo interface.

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

12 years agoRevert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."
Jakob Stoklund Olesen [Fri, 26 Oct 2012 23:39:46 +0000 (23:39 +0000)]
Revert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."

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

12 years agoAvoid an unused-variable warning when asserts are disabled.
Kaelyn Uhrain [Fri, 26 Oct 2012 23:28:41 +0000 (23:28 +0000)]
Avoid an unused-variable warning when asserts are disabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166834 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReduce indentation with early exit.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 23:05:13 +0000 (23:05 +0000)]
Reduce indentation with early exit.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166829 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAlso make the current basic block a class member.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 23:05:10 +0000 (23:05 +0000)]
Also make the current basic block a class member.

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

12 years agoimplement mips16 tls global addr
Reed Kotler [Fri, 26 Oct 2012 22:57:32 +0000 (22:57 +0000)]
implement mips16 tls global addr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166827 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMCRegisterClass should be returned by const ref, not by value.
Lang Hames [Fri, 26 Oct 2012 22:14:10 +0000 (22:14 +0000)]
MCRegisterClass should be returned by const ref, not by value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166822 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSuggest llvm_unreachable over assert(0).
Jordan Rose [Fri, 26 Oct 2012 22:08:46 +0000 (22:08 +0000)]
Suggest llvm_unreachable over assert(0).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166821 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the Processed set a class member.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 22:06:00 +0000 (22:06 +0000)]
Make the Processed set a class member.

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

12 years ago[ms-inline asm] Add a comment.
Chad Rosier [Fri, 26 Oct 2012 22:01:25 +0000 (22:01 +0000)]
[ms-inline asm] Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166819 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago80 col.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:46:57 +0000 (21:46 +0000)]
80 col.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166818 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove ARMBaseRegisterInfo::isReservedReg().
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:43:05 +0000 (21:43 +0000)]
Remove ARMBaseRegisterInfo::isReservedReg().

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

12 years agoAdd GPRPair Register class to ARM.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:29:15 +0000 (21:29 +0000)]
Add GPRPair Register class to ARM.

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

12 years agoFix whitespace and function names to be coding standardy.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:12:49 +0000 (21:12 +0000)]
Fix whitespace and function names to be coding standardy.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166814 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove the canCombineSubRegIndices() target hook.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 20:38:19 +0000 (20:38 +0000)]
Remove the canCombineSubRegIndices() target hook.

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

12 years agoRemove LoopDependenceAnalysis.
Benjamin Kramer [Fri, 26 Oct 2012 20:25:01 +0000 (20:25 +0000)]
Remove LoopDependenceAnalysis.

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

12 years agoRemove the unneeded initializers.
Bill Wendling [Fri, 26 Oct 2012 19:52:54 +0000 (19:52 +0000)]
Remove the unneeded initializers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166804 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoStop APInt::shl from generating llvm.trap
Derek Schuff [Fri, 26 Oct 2012 19:52:27 +0000 (19:52 +0000)]
Stop APInt::shl from generating llvm.trap

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

12 years agoMove target-specific BBVectorize tests into a separate directory.
Hal Finkel [Fri, 26 Oct 2012 19:38:09 +0000 (19:38 +0000)]
Move target-specific BBVectorize tests into a separate directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166802 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the target-specific tests, which require specific backends, to dirs that only...
Nadav Rotem [Fri, 26 Oct 2012 18:52:01 +0000 (18:52 +0000)]
Move the target-specific tests, which require specific backends, to dirs 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

12 years agoChange the internalize pass to internalize all symbols when given an empty
Rafael Espindola [Fri, 26 Oct 2012 18:47:48 +0000 (18:47 +0000)]
Change the internalize pass to internalize all symbols when given an empty
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

12 years agoLowercase the argument for TargetTransformInfo so it's consistent with all other...
Benjamin Kramer [Fri, 26 Oct 2012 18:46:15 +0000 (18:46 +0000)]
Lowercase the argument for TargetTransformInfo so it's consistent with all other passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166794 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.
Chad Rosier [Fri, 26 Oct 2012 18:32:44 +0000 (18:32 +0000)]
[ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.
Part of rdar://12576868

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166792 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Add support for the TYPE operator.
Chad Rosier [Fri, 26 Oct 2012 18:04:20 +0000 (18:04 +0000)]
[ms-inline asm] Add support for the TYPE operator.
Part of rdar://12576868

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166790 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLoopSimplify: Preserve DependenceAnalysis.
Benjamin Kramer [Fri, 26 Oct 2012 17:40:50 +0000 (17:40 +0000)]
LoopSimplify: Preserve DependenceAnalysis.

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

12 years agoFix SCEV cache invalidation in LCSSA and LoopSimplify.
Benjamin Kramer [Fri, 26 Oct 2012 17:31:43 +0000 (17:31 +0000)]
Fix SCEV cache invalidation in LCSSA and LoopSimplify.

The LoopSimplify bug is pretty harmless because the loop goes from unanalyzable
to analyzable but the LCSSA bug is very nasty. It only comes into play with a
specific order of the LoopPassManager worklist and can cause actual
miscompilations, when a SCEV refers to a value that has been replaced with PHI
node. SCEVExpander may then insert code into the wrong place, either violating
domination or randomly miscompiling stuff.

Comes with an extensive test case reduced from the test-suite with
bugpoint+SCEVValidator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166787 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a basic verifier for SCEV's backedge taken counts.
Benjamin Kramer [Fri, 26 Oct 2012 17:31:32 +0000 (17:31 +0000)]
Add a basic verifier for SCEV's backedge taken counts.

Enabled with -verify-scev. This could be extended significantly but hopefully
catches the common cases now. Note that it's not enabled by default in any
configuration because the way it tries to distinguish SCEVs is still fragile and
may produce false positives. Also the test-suite isn't clean yet, one example
is that it fails if a pass drops an NSW bit but it's still present in SCEV's
cached. Cleaning up all those cases will take some time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166786 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a crash in SimpliftDemandedBits of vectors of pointers.
Nadav Rotem [Fri, 26 Oct 2012 17:17:05 +0000 (17:17 +0000)]
Fix a crash in SimpliftDemandedBits of vectors of pointers.

PR14183.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166785 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake sure I is not the end iterator when isInsideBundle is called.
Akira Hatanaka [Fri, 26 Oct 2012 17:11:42 +0000 (17:11 +0000)]
Make sure I is not the end iterator when isInsideBundle is called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166784 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agogit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166780 91177308-0d34-0410...
Reed Kotler [Fri, 26 Oct 2012 16:18:19 +0000 (16:18 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166780 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
Chad Rosier [Fri, 26 Oct 2012 16:09:20 +0000 (16:09 +0000)]
[ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166779 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBetter handling of OpcodeToISD using enum/switch.
Renato Golin [Fri, 26 Oct 2012 12:24:52 +0000 (12:24 +0000)]
Better handling of OpcodeToISD using enum/switch.

Patch by Pasi Parviainen <pasi.parviainen@iki.fi>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166773 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDon't explicitly require RTTI and EH.
Joerg Sonnenberger [Fri, 26 Oct 2012 12:15:29 +0000 (12:15 +0000)]
Don't explicitly require RTTI and EH.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166772 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPowerPC: Fix for rldcl/rldicl/rldicr MC emission
Adhemerval Zanella [Fri, 26 Oct 2012 12:09:58 +0000 (12:09 +0000)]
PowerPC: Fix for rldcl/rldicl/rldicr MC emission

This patch fixes the rldcl/rldicl/rldicr instruction emission. The issue is
the MDForm_1 instruction defines the PowerISA MB field from 'rldicl'
with the name MBE, but RLDCL/RLDICL/RLDICR definition uses as 'MB'.

It end up by generatint the 'rldicl' enconding at
'lib/Target/PowerPC/PPCGenMCCodeEmitter.inc' to use the fourth argument as the
third. The patch changes it by adjusting to use the fourth argument as
intended.

Fixes PR14180.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166770 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMinor enhancement to build process notes for ARM platforms.
David Tweed [Fri, 26 Oct 2012 12:09:47 +0000 (12:09 +0000)]
Minor enhancement to build process notes for ARM platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166769 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdjust llvm-ar and llvm-ranlib to not depend on exception handling.
Joerg Sonnenberger [Fri, 26 Oct 2012 10:49:15 +0000 (10:49 +0000)]
Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166767 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove GC roots that reference dead objects.
Nicolas Geoffray [Fri, 26 Oct 2012 09:15:55 +0000 (09:15 +0000)]
Remove GC roots that reference dead objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166763 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix CPP backend for method attributes by creating a block where a new AttrBuilder...
Nicolas Geoffray [Fri, 26 Oct 2012 09:14:38 +0000 (09:14 +0000)]
Fix CPP backend for method attributes by creating a block where a new AttrBuilder is defined for each attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166762 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAlphabetize the enum list.
Bill Wendling [Fri, 26 Oct 2012 07:08:58 +0000 (07:08 +0000)]
Alphabetize the enum list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166760 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImplement carry for subtract/add for mips16
Reed Kotler [Fri, 26 Oct 2012 04:46:26 +0000 (04:46 +0000)]
Implement carry for subtract/add for mips16

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166755 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHoist out some work done inside a loop doing a linear scan over all
Nick Lewycky [Fri, 26 Oct 2012 04:43:47 +0000 (04:43 +0000)]
Hoist out some work done inside a loop doing a linear scan over all
instructions in a block. GetUnderlyingObject is more expensive than it looks as
it can, for instance, call SimplifyInstruction.

This might have some behavioural changes in odd corner cases, but only because
of some strange artefacts of the original implementation. If you were relying
on those, we can fix that by replacing this with a smarter algorithm. Change
passes the existing tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166754 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse VTTI->getNumberOfParts in BBVectorize.
Hal Finkel [Fri, 26 Oct 2012 04:28:06 +0000 (04:28 +0000)]
Use VTTI->getNumberOfParts in BBVectorize.

This change reflects VTTI refactoring; no functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166752 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd VectorTargetTransform::getNumberOfParts.
Hal Finkel [Fri, 26 Oct 2012 04:28:02 +0000 (04:28 +0000)]
Add VectorTargetTransform::getNumberOfParts.

As discussed on IRC, add VectorTargetTransform::getNumberOfParts
to provide a stable interface to the vector legalization splitting factor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166751 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix typo in comment.
Nick Lewycky [Fri, 26 Oct 2012 04:27:49 +0000 (04:27 +0000)]
Fix typo in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166750 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoimplement large (>16 bit) constant loading.
Reed Kotler [Fri, 26 Oct 2012 03:09:34 +0000 (03:09 +0000)]
implement large (>16 bit) constant loading.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166749 91177308-0d34-0410-b5e6-96231b3b80d8