oota-llvm.git
13 years ago80 column and typo fix
Jim Grosbach [Fri, 25 Jun 2010 22:02:28 +0000 (22:02 +0000)]
80 column and typo fix

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

13 years agoThe hasMemory argument is irrelevant to how the argument
Dale Johannesen [Fri, 25 Jun 2010 21:55:36 +0000 (21:55 +0000)]
The hasMemory argument is irrelevant to how the argument
for an "i" constraint should get lowered; PR 6309.  While
this argument was passed around a lot, this is the only
place it was used, so it goes away from a lot of other
places.

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

13 years agoAdd support for encoding 2-register NEON instructions.
Bob Wilson [Fri, 25 Jun 2010 21:17:19 +0000 (21:17 +0000)]
Add support for encoding 2-register NEON instructions.

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

13 years agopcmpeqd and friends are Commutable.
Dan Gohman [Fri, 25 Jun 2010 21:05:35 +0000 (21:05 +0000)]
pcmpeqd and friends are Commutable.

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

13 years ago80-column and trailing whitespace cleanup
Jim Grosbach [Fri, 25 Jun 2010 21:02:24 +0000 (21:02 +0000)]
80-column and trailing whitespace cleanup

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

13 years agoFix indentation.
Bob Wilson [Fri, 25 Jun 2010 20:54:44 +0000 (20:54 +0000)]
Fix indentation.

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

13 years ago- Reapply r106066 now that the bzip2 build regression has been fixed.
Bill Wendling [Fri, 25 Jun 2010 20:48:10 +0000 (20:48 +0000)]
- Reapply r106066 now that the bzip2 build regression has been fixed.
- 2010-06-25-CoalescerSubRegDefDead.ll is the testcase for r106878.

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

13 years agoWe should remove the live range from the destination register only if *all* defs
Bill Wendling [Fri, 25 Jun 2010 20:42:55 +0000 (20:42 +0000)]
We should remove the live range from the destination register only if *all* defs
are dead, not just the def of this register. I.e., a register could be dead, but
it's subreg isn't.

Testcase to follow with a subsequent patch.

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

13 years agoMove the last piece of SSE2 convert instructions to the Convert Instructions section
Bruno Cardoso Lopes [Fri, 25 Jun 2010 20:29:27 +0000 (20:29 +0000)]
Move the last piece of SSE2 convert instructions to the Convert Instructions section

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

13 years agoMore SSE refactoring, this time with different types of MOVs
Bruno Cardoso Lopes [Fri, 25 Jun 2010 20:22:12 +0000 (20:22 +0000)]
More SSE refactoring, this time with different types of MOVs

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

13 years agoEliminate a redundant FoldingSet lookup.
Dan Gohman [Fri, 25 Jun 2010 18:47:08 +0000 (18:47 +0000)]
Eliminate a redundant FoldingSet lookup.

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

13 years agoIT instructions are considered to be scheduling hazards, but are scheduled
Jim Grosbach [Fri, 25 Jun 2010 18:43:14 +0000 (18:43 +0000)]
IT instructions are considered to be scheduling hazards, but are scheduled
with the following instructions. This is done via trickery by considering the
instruction preceding the IT to be the hazard. Care must be taken to ensure
it's the first non-debug instruction, or the presence of debug info will
affect codegen.

Part of the continuing work for rdar://7797940, making ARM code-gen unaffected
by the presence of debug information.

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

13 years agoRefactoring of more SSE conversion instructions. Also add some AVX instrinsics Int_V...
Bruno Cardoso Lopes [Fri, 25 Jun 2010 18:06:22 +0000 (18:06 +0000)]
Refactoring of more SSE conversion instructions. Also add some AVX instrinsics Int_V... placeholders

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

13 years agoCosmetic.
Dale Johannesen [Fri, 25 Jun 2010 17:41:07 +0000 (17:41 +0000)]
Cosmetic.

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

13 years agoXFAIL this test on powerpc for now.
Devang Patel [Fri, 25 Jun 2010 17:32:23 +0000 (17:32 +0000)]
XFAIL this test on powerpc for now.

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

13 years agoFix LLVM CMake PACKAGE_VERSION variable.
Daniel Dunbar [Fri, 25 Jun 2010 16:29:14 +0000 (16:29 +0000)]
Fix LLVM CMake PACKAGE_VERSION variable.

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

13 years agoRewrite MemoryBuffer::getSTDIN to use read(2) and a SmallVector buffer.
Benjamin Kramer [Fri, 25 Jun 2010 16:07:18 +0000 (16:07 +0000)]
Rewrite MemoryBuffer::getSTDIN to use read(2) and a SmallVector buffer.

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

13 years agoRemove variables which are assigned to but for which the value
Duncan Sands [Fri, 25 Jun 2010 14:48:39 +0000 (14:48 +0000)]
Remove variables which are assigned to but for which the value
is not used.  Spotted by gcc-4.6.

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

13 years agoBring back the empty vector workaround I removed in r106839. Looks like MSVC needs it.
Benjamin Kramer [Fri, 25 Jun 2010 12:51:01 +0000 (12:51 +0000)]
Bring back the empty vector workaround I removed in r106839. Looks like MSVC needs it.

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

13 years agoTweak MemoryBuffer to allocate the class itself, the name and possibly the
Benjamin Kramer [Fri, 25 Jun 2010 11:50:40 +0000 (11:50 +0000)]
Tweak MemoryBuffer to allocate the class itself, the name and possibly the
buffer in the same chunk of memory.

2 less mallocs for every uninitialized MemoryBuffer and 1 less malloc for every
MemoryBuffer pointing to a memory range translate into 20% less mallocs on
clang -cc1 -Eonly Cocoa_h.m.

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

13 years agouse ArgOperand accessors
Gabor Greif [Fri, 25 Jun 2010 11:25:30 +0000 (11:25 +0000)]
use ArgOperand accessors
and CallInst for getting hold
of the intrinsic's arguments

simplify along the way (at least for me this is much more legible now)
Bill, Baldrick or Anton, please review\!

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

13 years agouse ArgOperand API (the simple part)
Gabor Greif [Fri, 25 Jun 2010 09:44:37 +0000 (09:44 +0000)]
use ArgOperand API (the simple part)

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

13 years agouse ArgOperand API
Gabor Greif [Fri, 25 Jun 2010 09:38:13 +0000 (09:38 +0000)]
use ArgOperand API

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

13 years agouse ArgOperand API
Gabor Greif [Fri, 25 Jun 2010 09:36:23 +0000 (09:36 +0000)]
use ArgOperand API

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

13 years agoRemove unused variables.
Duncan Sands [Fri, 25 Jun 2010 09:35:33 +0000 (09:35 +0000)]
Remove unused variables.

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

13 years agouse ArgOperand API and CallSite to access arguments of CallInst
Gabor Greif [Fri, 25 Jun 2010 09:03:52 +0000 (09:03 +0000)]
use ArgOperand API and CallSite to access arguments of CallInst

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

13 years agouse ArgOperand API and CallSite to access arguments of CallInst
Gabor Greif [Fri, 25 Jun 2010 08:48:19 +0000 (08:48 +0000)]
use ArgOperand API and CallSite to access arguments of CallInst

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

13 years agouse ArgOperand API
Gabor Greif [Fri, 25 Jun 2010 08:24:59 +0000 (08:24 +0000)]
use ArgOperand API

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

13 years agoprune an include
Gabor Greif [Fri, 25 Jun 2010 08:16:50 +0000 (08:16 +0000)]
prune an include

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

13 years agouse ArgOperand API (one more hunk I could split)
Gabor Greif [Fri, 25 Jun 2010 07:58:41 +0000 (07:58 +0000)]
use ArgOperand API (one more hunk I could split)

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

13 years agouse ArgOperand API (some hunks I could split)
Gabor Greif [Fri, 25 Jun 2010 07:57:14 +0000 (07:57 +0000)]
use ArgOperand API (some hunks I could split)

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

13 years agouse ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be able...
Gabor Greif [Fri, 25 Jun 2010 07:40:32 +0000 (07:40 +0000)]
use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be able to use isFreeCall whithout a cast or new overload

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

13 years agoAdd missing ARM and Thumb data layout info for vector types.
Bob Wilson [Fri, 25 Jun 2010 04:41:08 +0000 (04:41 +0000)]
Add missing ARM and Thumb data layout info for vector types.
Radar 8128745.

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

13 years agoReduce indentation.
Bob Wilson [Fri, 25 Jun 2010 04:12:31 +0000 (04:12 +0000)]
Reduce indentation.

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

13 years agoFix a case where an earlyclobber operand of an asm
Dale Johannesen [Fri, 25 Jun 2010 00:49:43 +0000 (00:49 +0000)]
Fix a case where an earlyclobber operand of an asm
is reused as an input.  PR 4118.  Testcase is too big,
as usual with bugs in this area, but there's one in
the PR.

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

13 years agoAdd some AVX convert instructions
Bruno Cardoso Lopes [Fri, 25 Jun 2010 00:39:30 +0000 (00:39 +0000)]
Add some AVX convert instructions

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

13 years agoMake sure all eliminated kills are removed from VNInfo lists.
Jakob Stoklund Olesen [Thu, 24 Jun 2010 23:57:35 +0000 (23:57 +0000)]
Make sure all eliminated kills are removed from VNInfo lists.

This fixes PR7479 and PR7485. The test cases from those PRs are big, so not
included. However, PR7485 comes from self hosting on FreeBSD, so we will surely
hear about any regression.

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

13 years agoDon't write an output file to cwd, and put an rdar prefix on
Dan Gohman [Thu, 24 Jun 2010 23:45:15 +0000 (23:45 +0000)]
Don't write an output file to cwd, and put an rdar prefix on
an rdar number.

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

13 years agoAdd some comments.
Dan Gohman [Thu, 24 Jun 2010 23:41:59 +0000 (23:41 +0000)]
Add some comments.

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

13 years agoRefactoring of SSE convert intrinsics
Bruno Cardoso Lopes [Thu, 24 Jun 2010 23:37:07 +0000 (23:37 +0000)]
Refactoring of SSE convert intrinsics

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

13 years agoTeach EmitLiveInCopies to omit copies for unused virtual registers,
Dan Gohman [Thu, 24 Jun 2010 22:23:02 +0000 (22:23 +0000)]
Teach EmitLiveInCopies to omit copies for unused virtual registers,
and to clean up unused incoming physregs from the live-in list.

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

13 years agoRefactoring of SSE conversion instructions
Bruno Cardoso Lopes [Thu, 24 Jun 2010 22:22:21 +0000 (22:22 +0000)]
Refactoring of SSE conversion instructions

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

13 years agoChange array references to match my previous change to use the public type
Bob Wilson [Thu, 24 Jun 2010 22:21:19 +0000 (22:21 +0000)]
Change array references to match my previous change to use the public type
names for the array fields.

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

13 years agoDataTypes.h.cmake (MSVC): Protect some #define's and use specific
Oscar Fuentes [Thu, 24 Jun 2010 22:05:52 +0000 (22:05 +0000)]
DataTypes.h.cmake (MSVC): Protect some #define's and use specific
suffixes for integer types.

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

13 years agoRefactor SSE cmp intrinsics and declare the same for AVX
Bruno Cardoso Lopes [Thu, 24 Jun 2010 22:04:40 +0000 (22:04 +0000)]
Refactor SSE cmp intrinsics and declare the same for AVX

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

13 years agoFix up some comments.
Bob Wilson [Thu, 24 Jun 2010 22:04:30 +0000 (22:04 +0000)]
Fix up some comments.

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

13 years agoUse the struct tags mandated by ARM's ABI. Also use the public type names for
Bob Wilson [Thu, 24 Jun 2010 22:03:41 +0000 (22:03 +0000)]
Use the struct tags mandated by ARM's ABI.  Also use the public type names for
the array fields in these structs.

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

13 years agoIt's possible that a flag is added to the SDNode that points back to the
Bill Wendling [Thu, 24 Jun 2010 22:00:37 +0000 (22:00 +0000)]
It's possible that a flag is added to the SDNode that points back to the
original SDNode. This is badness. Also, this function allows one SDNode to point
multiple flags to another SDNode. Badness as well.

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

13 years agoDBG_VALUE machine instruction pointing to undefined register for a variable justify...
Devang Patel [Thu, 24 Jun 2010 21:51:19 +0000 (21:51 +0000)]
DBG_VALUE machine instruction pointing to undefined register for a variable justify a separate scope if the variable is inlined function's argument.
Radar 8122864.

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

13 years agoDon't return a std::vector in the Spiller interface, but take a reference to a
Jakob Stoklund Olesen [Thu, 24 Jun 2010 20:54:29 +0000 (20:54 +0000)]
Don't return a std::vector in the Spiller interface, but take a reference to a
vector instead. This avoids needless copying and allocation.

Add documentation.

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

13 years ago- Add AVX COMI{SS,SD}{rr,rm} and UCOMI{SS,SD}{rr,rm}.
Bruno Cardoso Lopes [Thu, 24 Jun 2010 20:48:23 +0000 (20:48 +0000)]
- Add AVX COMI{SS,SD}{rr,rm} and UCOMI{SS,SD}{rr,rm}.
- Fix a small VEX encoding issue.
- Move compare instructions to their appropriate place.

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

13 years agoRemove the now unused LiveIntervals::getVNInfoSourceReg().
Jakob Stoklund Olesen [Thu, 24 Jun 2010 20:18:15 +0000 (20:18 +0000)]
Remove the now unused LiveIntervals::getVNInfoSourceReg().

This method was always a bit too simplistic for the real world. It didn't really
deal with subregisters and such.

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

13 years agoTeach AdjustCopiesBackFrom to also use CoalescerPair to identify compatible copies.
Jakob Stoklund Olesen [Thu, 24 Jun 2010 20:16:00 +0000 (20:16 +0000)]
Teach AdjustCopiesBackFrom to also use CoalescerPair to identify compatible copies.

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

13 years agoDisallow matching "i" constraint to symbol addresses when
Dale Johannesen [Thu, 24 Jun 2010 20:14:51 +0000 (20:14 +0000)]
Disallow matching "i" constraint to symbol addresses when
address requires a register or secondary load to compute
(most PIC modes).  This improves "g" constraint handling.  8015842.

The test from 2007 is attempting to test the fix for PR1761,
but since -relocation-model=static doesn't work on Darwin
x86-64, it was not testing what it was supposed to be testing
and was passing erroneously.  Fixed to use Linux x86-64.

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

13 years agoSilence some unused variable warnings.
Eric Christopher [Thu, 24 Jun 2010 20:14:34 +0000 (20:14 +0000)]
Silence some unused variable warnings.

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

13 years agoRemove the -fast-spill option.
Jakob Stoklund Olesen [Thu, 24 Jun 2010 19:56:08 +0000 (19:56 +0000)]
Remove the -fast-spill option.

This code path has never really been used, and we are going to be handling
spilling through the Spiller interface in the future.

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

13 years agoDocument problems that I encountered when working on -scev-aa.
Dan Gohman [Thu, 24 Jun 2010 19:34:03 +0000 (19:34 +0000)]
Document problems that I encountered when working on -scev-aa.

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

13 years agoOops. IT block formation pass needs to be run at any optimization level.
Evan Cheng [Thu, 24 Jun 2010 19:10:14 +0000 (19:10 +0000)]
Oops. IT block formation pass needs to be run at any optimization level.

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

13 years agoLoosen up the requirements in the Horrible Hack(tm) to include all selectors
Bill Wendling [Thu, 24 Jun 2010 18:49:10 +0000 (18:49 +0000)]
Loosen up the requirements in the Horrible Hack(tm) to include all selectors
which don't have a catch-all associated with them not just clean-ups. This fixes
the SingleSource/Benchmarks/Shootout-C++/except.cpp testcase that broke because
of my change r105902.

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

13 years agoAlways allow Thumb-2 SXTB, SXTH, UXTB, and UXTH. Fixes PR7324.
Eli Friedman [Thu, 24 Jun 2010 18:20:04 +0000 (18:20 +0000)]
Always allow Thumb-2 SXTB, SXTH, UXTB, and UXTH.  Fixes PR7324.

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

13 years agoReplace a big gob of old coalescer logic with the new CoalescerPair class.
Jakob Stoklund Olesen [Thu, 24 Jun 2010 18:15:01 +0000 (18:15 +0000)]
Replace a big gob of old coalescer logic with the new CoalescerPair class.

CoalescerPair can determine if a copy can be coalesced, and which register gets
merged away. The old logic in SimpleRegisterCoalescing had evolved into
something a bit too convoluted.

This second attempt fixes some crashes that only occurred Linux.

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

13 years agoAdd an exports file for the Hello example plugin.
Dan Gohman [Thu, 24 Jun 2010 17:36:51 +0000 (17:36 +0000)]
Add an exports file for the Hello example plugin.

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

13 years agoPrint the LSBs of a SlotIndex symbolically using letters referring to the
Jakob Stoklund Olesen [Thu, 24 Jun 2010 17:31:07 +0000 (17:31 +0000)]
Print the LSBs of a SlotIndex symbolically using letters referring to the
[L]oad, [u]se, [d]ef, or [S]tore slots.

This makes it easier to see if two indices refer to the same instruction,
avoiding mental mod 4 calculations.

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

13 years agoSimplify this code; switch lowering shouldn't produce cases
Dan Gohman [Thu, 24 Jun 2010 17:08:31 +0000 (17:08 +0000)]
Simplify this code; switch lowering shouldn't produce cases
which trivially fold away.

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

13 years agoA few minor micro-optimizations.
Dan Gohman [Thu, 24 Jun 2010 16:57:52 +0000 (16:57 +0000)]
A few minor micro-optimizations.

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

13 years agoTeach getExactSDiv to evaluate x/1 to x up front, as it's a common
Dan Gohman [Thu, 24 Jun 2010 16:51:25 +0000 (16:51 +0000)]
Teach getExactSDiv to evaluate x/1 to x up front, as it's a common
enough special case, and it theoretically allows more folding because
it works even when x is unanalyzable.

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

13 years agoPR7458: Try commuting Thumb2 instruction operands to put them into 2-address
Bob Wilson [Thu, 24 Jun 2010 16:50:20 +0000 (16:50 +0000)]
PR7458: Try commuting Thumb2 instruction operands to put them into 2-address
form so they can be narrowed to 16-bit instructions.

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

13 years agoEdit and clarify comments for TargetInstrInfo methods:
Bob Wilson [Thu, 24 Jun 2010 16:48:26 +0000 (16:48 +0000)]
Edit and clarify comments for TargetInstrInfo methods:

None of the existing implementations of commuteInstruction create new
instructions unless the NewMI parameter is true, but the comment had
implied otherwise.

findCommutedOpIndices returns false, not true, when it doesn't know
how to commute the instruction.

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

13 years agoDon't try to preserve pointer types in SCEVConstants; the old code
Dan Gohman [Thu, 24 Jun 2010 16:47:03 +0000 (16:47 +0000)]
Don't try to preserve pointer types in SCEVConstants; the old code
was over-complicated.

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

13 years agoFix copy+pasto issues in isMulSExtable.
Dan Gohman [Thu, 24 Jun 2010 16:45:11 +0000 (16:45 +0000)]
Fix copy+pasto issues in isMulSExtable.

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

13 years agoMake the trunc code consistent with the zext and sext code in its
Dan Gohman [Thu, 24 Jun 2010 16:33:38 +0000 (16:33 +0000)]
Make the trunc code consistent with the zext and sext code in its
handling of pointer types.

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

13 years agoAdd a comment about a thread safety issue in Statistic.h.
Dan Gohman [Thu, 24 Jun 2010 16:31:32 +0000 (16:31 +0000)]
Add a comment about a thread safety issue in Statistic.h.

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

13 years agoAdd overloads for getFile and getFileOrSTDIN which take a const char *
Dan Gohman [Thu, 24 Jun 2010 16:25:50 +0000 (16:25 +0000)]
Add overloads for getFile and getFileOrSTDIN which take a const char *
instead of a StringRef, avoiding the need to copy the string in the
common case.

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

13 years agoBe more strict about subreg-to-subreg copies in CoalescerPair.
Jakob Stoklund Olesen [Thu, 24 Jun 2010 16:19:28 +0000 (16:19 +0000)]
Be more strict about subreg-to-subreg copies in CoalescerPair.

Also keep track of the original DstREg before subregister adjustments.

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

13 years agouse ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 16:11:44 +0000 (16:11 +0000)]
use ArgOperand API

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

13 years agoVerify that VNI kills are pointing to existing instructions.
Jakob Stoklund Olesen [Thu, 24 Jun 2010 15:56:59 +0000 (15:56 +0000)]
Verify that VNI kills are pointing to existing instructions.

In this case it is essential that the kill is real because the spiller will
decide to omit a spill if it thinks there is a later kill.

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

13 years agouse (even more, still) ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 15:51:11 +0000 (15:51 +0000)]
use (even more, still) ArgOperand API

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

13 years agoEliminate the other half of the BRCOND optimization, and update
Dan Gohman [Thu, 24 Jun 2010 15:24:03 +0000 (15:24 +0000)]
Eliminate the other half of the BRCOND optimization, and update
as many tests as possible.

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

13 years agoEliminate the first have of the optimization which eliminates BRCOND
Dan Gohman [Thu, 24 Jun 2010 15:04:11 +0000 (15:04 +0000)]
Eliminate the first have of the optimization which eliminates BRCOND
when the condition is constant. This optimization shouldn't be
necessary, because codegen shouldn't be able to find dead control
paths that the IR-level optimizer can't find. And it's undesirable,
because it encourages bugpoint to leave "br i1 false" branches
in its output. And it wasn't updating the CFG.

I updated all the tests I could, but some tests are too reduced
and I wasn't able to meaningfully preserve them.

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

13 years agouse ArgOperand API and CallSite for arg range; add necessary casts and perform some...
Gabor Greif [Thu, 24 Jun 2010 14:42:01 +0000 (14:42 +0000)]
use ArgOperand API and CallSite for arg range; add necessary casts and perform some cosmetics

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

13 years agoReapply r106634, now that the bug it exposed is fixed.
Dan Gohman [Thu, 24 Jun 2010 14:30:44 +0000 (14:30 +0000)]
Reapply r106634, now that the bug it exposed is fixed.

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

13 years agouse ArgOperand API and CallSite for arg range
Gabor Greif [Thu, 24 Jun 2010 14:13:36 +0000 (14:13 +0000)]
use ArgOperand API and CallSite for arg range

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

13 years agouse (even more) ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 13:54:33 +0000 (13:54 +0000)]
use (even more) ArgOperand API

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

13 years agouse ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 13:42:49 +0000 (13:42 +0000)]
use ArgOperand API

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

13 years agouse ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 12:58:35 +0000 (12:58 +0000)]
use ArgOperand API

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

13 years agouse ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 12:35:13 +0000 (12:35 +0000)]
use ArgOperand API

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

13 years agouse ArgOperand API, also tighten the type of visitFree to make this work out smoothly
Gabor Greif [Thu, 24 Jun 2010 12:21:15 +0000 (12:21 +0000)]
use ArgOperand API, also tighten the type of visitFree to make this work out smoothly

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

13 years agouse ArgOperand API; introduce downcasted pointers into scope to facilitate this
Gabor Greif [Thu, 24 Jun 2010 12:03:56 +0000 (12:03 +0000)]
use ArgOperand API; introduce downcasted pointers into scope to facilitate this

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

13 years agouse ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 10:42:46 +0000 (10:42 +0000)]
use ArgOperand API

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

13 years agouse ArgOperand API
Gabor Greif [Thu, 24 Jun 2010 10:17:17 +0000 (10:17 +0000)]
use ArgOperand API

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

13 years agouse callsite to obtain all arguments
Gabor Greif [Thu, 24 Jun 2010 10:04:07 +0000 (10:04 +0000)]
use callsite to obtain all arguments

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

13 years agouse callsite to obtain all arguments
Gabor Greif [Thu, 24 Jun 2010 09:56:43 +0000 (09:56 +0000)]
use callsite to obtain all arguments

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

13 years agoTeach the x86 mc assembler that %dr6 = %db6, this implements
Chris Lattner [Thu, 24 Jun 2010 07:29:18 +0000 (07:29 +0000)]
Teach the x86 mc assembler that %dr6 = %db6, this implements
rdar://8013734

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

13 years agomore cleanups
Chris Lattner [Thu, 24 Jun 2010 07:18:14 +0000 (07:18 +0000)]
more cleanups

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

13 years agoreduce indentation
Chris Lattner [Thu, 24 Jun 2010 07:16:25 +0000 (07:16 +0000)]
reduce indentation

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

13 years agofix breakage from r98938 by correctly marking msp430 calls as variadic.
Chris Lattner [Thu, 24 Jun 2010 06:46:50 +0000 (06:46 +0000)]
fix breakage from r98938 by correctly marking msp430 calls as variadic.

Patch by Ben Ransford!

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

13 years agoFix a bug in the code which determines when it's safe to use the
Dan Gohman [Thu, 24 Jun 2010 02:07:59 +0000 (02:07 +0000)]
Fix a bug in the code which determines when it's safe to use the
bt instruction, which was exposed by r106263.

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

13 years agoAdd a couple more quick comments.
Eric Christopher [Thu, 24 Jun 2010 02:07:57 +0000 (02:07 +0000)]
Add a couple more quick comments.

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

13 years agoOptimize the "bit test" code path for switch lowering in the
Dan Gohman [Thu, 24 Jun 2010 02:06:24 +0000 (02:06 +0000)]
Optimize the "bit test" code path for switch lowering in the
case where the bit mask has exactly one bit.

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

13 years agoRevert "Replace a big gob of old coalescer logic with the new CoalescerPair class."
Jakob Stoklund Olesen [Thu, 24 Jun 2010 00:52:22 +0000 (00:52 +0000)]
Revert "Replace a big gob of old coalescer logic with the new CoalescerPair class."

Whiny buildbots.

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