oota-llvm.git
15 years agoFix more NEON instruction encodings.
Bob Wilson [Fri, 16 Oct 2009 03:58:44 +0000 (03:58 +0000)]
Fix more NEON instruction encodings.
Patch by Johnny Chen.

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

15 years agoAdd half precision floating point support (float16) to APFloat,
Chris Lattner [Fri, 16 Oct 2009 02:13:51 +0000 (02:13 +0000)]
Add half precision floating point support (float16) to APFloat,
patch by Peter Johnson! (PR5195)

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

15 years agoadd haiku support, patch by Paul Davey!
Chris Lattner [Fri, 16 Oct 2009 02:06:30 +0000 (02:06 +0000)]
add haiku support, patch by Paul Davey!

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

15 years agoMC: Set symbol values in MachO MCStreamer.
Daniel Dunbar [Fri, 16 Oct 2009 01:58:23 +0000 (01:58 +0000)]
MC: Set symbol values in MachO MCStreamer.

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

15 years agoMinor formatting tweaks.
Daniel Dunbar [Fri, 16 Oct 2009 01:58:15 +0000 (01:58 +0000)]
Minor formatting tweaks.

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

15 years agoMC: Switch assembler API to using MCExpr instead of MCValue.
Daniel Dunbar [Fri, 16 Oct 2009 01:58:03 +0000 (01:58 +0000)]
MC: Switch assembler API to using MCExpr instead of MCValue.

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

15 years agoMC: Remove unneeded context argument to MCExpr::Evaluate*.
Daniel Dunbar [Fri, 16 Oct 2009 01:57:52 +0000 (01:57 +0000)]
MC: Remove unneeded context argument to MCExpr::Evaluate*.

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

15 years agoMC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
Daniel Dunbar [Fri, 16 Oct 2009 01:57:39 +0000 (01:57 +0000)]
MC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
variables and symbols invalid.

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

15 years agoMC: When parsing a variable reference, substitute absolute variables immediately
Daniel Dunbar [Fri, 16 Oct 2009 01:34:54 +0000 (01:34 +0000)]
MC: When parsing a variable reference, substitute absolute variables immediately
since they are allowed to be redefined.

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

15 years agoMC: Move assembler variable values from MCContext to MCSymbol.
Daniel Dunbar [Fri, 16 Oct 2009 01:33:57 +0000 (01:33 +0000)]
MC: Move assembler variable values from MCContext to MCSymbol.

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

15 years agoMC: Switch MCContext value table to storing MCExprs.
Daniel Dunbar [Fri, 16 Oct 2009 01:33:11 +0000 (01:33 +0000)]
MC: Switch MCContext value table to storing MCExprs.

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

15 years agoWhen checking aliases between phi sources and V2, we know the sources are not themsel...
Evan Cheng [Fri, 16 Oct 2009 00:33:09 +0000 (00:33 +0000)]
When checking aliases between phi sources and V2, we know the sources are not themselves phi nodes. However, V2 may be. Call aliasCheck with V2 first to potentially eliminate a std::swap call.

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

15 years agoRevert svn r80498 and replace it with a different solution. The only problem
Bob Wilson [Thu, 15 Oct 2009 23:12:05 +0000 (23:12 +0000)]
Revert svn r80498 and replace it with a different solution.  The only problem
I can see with the original code was that I forgot that this runs after
type legalization and hence the result type will always be i32. (Custom
legalization of EXTRACT_VECTOR_ELT is only enabled for vector types with
8- and 16-bit elements.)

Regarding the FIXME comment: any information about sign and zero-extension
should be captured by separate extension operations.  The DAG combiner should
handle those to produce either VGETLANEu or VGETLANEs, and that seems to be
working now.  If there are cases that we're missing, let me know.

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

15 years agoDllexport stuff cleanup:
Anton Korobeynikov [Thu, 15 Oct 2009 22:36:18 +0000 (22:36 +0000)]
Dllexport stuff cleanup:
1. Emit external function type information for all COFF targets since it's
a feature of object format
2. Emit linker directives only for cygming (since this is ld-specific stuff)

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

15 years agoBranches must be the last instruction in a Thumb2 IT block. Approved by Evan Cheng.
Sandeep Patel [Thu, 15 Oct 2009 22:25:32 +0000 (22:25 +0000)]
Branches must be the last instruction in a Thumb2 IT block. Approved by Evan Cheng.

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

15 years agoFix encoding bits for N3VLInt3_QHS multiclass with 8-bit elements.
Bob Wilson [Thu, 15 Oct 2009 21:57:47 +0000 (21:57 +0000)]
Fix encoding bits for N3VLInt3_QHS multiclass with 8-bit elements.
Patch by Johnny Chen.

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

15 years agoFix ARM memory operand parsing of post indexing with just a base register, that
Kevin Enderby [Thu, 15 Oct 2009 21:42:45 +0000 (21:42 +0000)]
Fix ARM memory operand parsing of post indexing with just a base register, that
is just "[Rn]" and no tailing comma with an offset, etc.

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

15 years agoFix a potential performance problem in placing ARM constant pools.
Bob Wilson [Thu, 15 Oct 2009 20:49:47 +0000 (20:49 +0000)]
Fix a potential performance problem in placing ARM constant pools.
In the case where there are no good places to put constants and we fall back
upon inserting unconditional branches to make new blocks, allow all constant
pool references in range of those blocks to put constants there, even if that
means resetting the "high water marks" for those references.  This will still
terminate because you can't keep splitting blocks forever, and in the bad
cases where we have to split blocks, it is important to avoid splitting more
than necessary.

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

15 years agoMore bits of the ARM target assembler for llvm-mc, code added to parse labels
Kevin Enderby [Thu, 15 Oct 2009 20:48:48 +0000 (20:48 +0000)]
More bits of the ARM target assembler for llvm-mc, code added to parse labels
as expressions, code for parsing a few arm specific directives (still needs
the MCStreamer calls for these).  Some clean up of the operand parsing code
and adding some comments.

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

15 years agoRemove X86Subtarget::IsLinux. It's no longer being used.
Evan Cheng [Thu, 15 Oct 2009 20:23:21 +0000 (20:23 +0000)]
Remove X86Subtarget::IsLinux. It's no longer being used.

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

15 years agoFix bug where array malloc with unexpected computation of the size argument resulted...
Victor Hernandez [Thu, 15 Oct 2009 20:14:52 +0000 (20:14 +0000)]
Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper
identifying the malloc as a non-array malloc.  This broke GlobalOpt's optimization of stores of mallocs
to global variables.

The fix is to classify malloc's into 3 categories:
1. non-array mallocs
2. array mallocs whose array size can be determined
3. mallocs that cannot be determined to be of type 1 or 2 and cannot be optimized

getMallocArraySize() returns NULL for category 3, and all users of this function must avoid their
malloc optimization if this function returns NULL.

Eventually, currently unexpected codegen for computing the malloc's size argument will be supported in
isArrayMalloc() and getMallocArraySize(), extending malloc optimizations to those examples.

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

15 years agoAdd files Sanjiv forgot.
Benjamin Kramer [Thu, 15 Oct 2009 19:46:34 +0000 (19:46 +0000)]
Add files Sanjiv forgot.

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

15 years agoRe-apply 84180 with the fixed test case.
Sanjiv Gupta [Thu, 15 Oct 2009 19:26:25 +0000 (19:26 +0000)]
Re-apply 84180 with the fixed test case.

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

15 years agoMove Blackfin intrinsics into the Target/Blackfin directory.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:50:52 +0000 (18:50 +0000)]
Move Blackfin intrinsics into the Target/Blackfin directory.

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

15 years agoReport errors correctly for unselected target intrinsics.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:50:03 +0000 (18:50 +0000)]
Report errors correctly for unselected target intrinsics.

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

15 years agoClean up TargetIntrinsicInfo API. Add pure virtual methods.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:49:26 +0000 (18:49 +0000)]
Clean up TargetIntrinsicInfo API. Add pure virtual methods.

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

15 years agoAdd missing break statements! Thanks to Duncan Sands for pointing this out!
Nick Lewycky [Thu, 15 Oct 2009 18:48:58 +0000 (18:48 +0000)]
Add missing break statements!  Thanks to Duncan Sands for pointing this out!

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

15 years agoTablegen target intrinsics from the target main .td file.
Jakob Stoklund Olesen [Thu, 15 Oct 2009 18:48:47 +0000 (18:48 +0000)]
Tablegen target intrinsics from the target main .td file.

Fix pasto.

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

15 years agoDisable another unittest that doesn't work on arm and ppc.
Benjamin Kramer [Thu, 15 Oct 2009 16:49:16 +0000 (16:49 +0000)]
Disable another unittest that doesn't work on arm and ppc.

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

15 years agoRevert "Complete Rewrite of AsmPrinter, TargetObjectFile based on new
Daniel Dunbar [Thu, 15 Oct 2009 15:02:14 +0000 (15:02 +0000)]
Revert "Complete Rewrite of AsmPrinter, TargetObjectFile based on new
PIC16Section class", it breaks globals.ll.

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

15 years agoComplete Rewrite of AsmPrinter, TargetObjectFile based on new PIC16Section class
Sanjiv Gupta [Thu, 15 Oct 2009 10:10:43 +0000 (10:10 +0000)]
Complete Rewrite of AsmPrinter, TargetObjectFile based on new PIC16Section class
derived from MCSection.

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

15 years agoFew changes to comply with new DebugInfo Metadata representation.
Sanjiv Gupta [Thu, 15 Oct 2009 09:48:25 +0000 (09:48 +0000)]
Few changes to comply with new DebugInfo Metadata representation.

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

15 years agoThe gcc plugin is now called dragonegg.so and no longer llvm.so.
Duncan Sands [Thu, 15 Oct 2009 08:17:44 +0000 (08:17 +0000)]
The gcc plugin is now called dragonegg.so and no longer llvm.so.
Pointed out by Gabor.

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

15 years agoTeach basicaa about memcpy/memmove/memset. The length argument can be used to
Nick Lewycky [Thu, 15 Oct 2009 07:11:24 +0000 (07:11 +0000)]
Teach basicaa about memcpy/memmove/memset. The length argument can be used to
improve alias results if constant, and the source pointer can't be modified.

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

15 years agoTeach BasicAA to use the size parameter of the memory use marker intrinsics.
Nick Lewycky [Thu, 15 Oct 2009 06:12:11 +0000 (06:12 +0000)]
Teach BasicAA to use the size parameter of the memory use marker intrinsics.

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

15 years agoBe smarter about reusing constant pool entries.
Bob Wilson [Thu, 15 Oct 2009 05:52:29 +0000 (05:52 +0000)]
Be smarter about reusing constant pool entries.

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

15 years agoFix another problem with ARM constant pools. Radar 7303551.
Bob Wilson [Thu, 15 Oct 2009 05:10:36 +0000 (05:10 +0000)]
Fix another problem with ARM constant pools.  Radar 7303551.
When ARMConstantIslandPass cannot find any good locations (i.e., "water") to
place constants, it falls back to inserting unconditional branches to make a
place to put them.  My recent change exposed a problem in this area.  We may
sometimes append to the same block more than one unconditional branch.  The
symptoms of this are that the generated assembly has a branch to an undefined
label and running llc with -debug will cause a seg fault.

This happens more easily since my change to prevent CPEs from moving from
lower to higher addresses as the algorithm iterates, but it could have
happened before.  The end of the block may be in range for various constant
pool references, but the insertion point for new CPEs is not right at the end
of the block -- it is at the end of the CPEs that have already been placed
at the end of the block.  The insertion point could be out of range.  When
that happens, the fallback code will always append another unconditional
branch if the end of the block is in range.

The fix is to only append an unconditional branch if the block does not
already end with one.  I also removed a check to see if the constant pool load
instruction is at the end of the block, since that is redundant with
checking if the end of the block is in-range.

There is more to be done here, but I think this fixes the immediate problem.

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

15 years agoonly try to fold constantexpr operands when the worklist is first populated,
Chris Lattner [Thu, 15 Oct 2009 04:59:28 +0000 (04:59 +0000)]
only try to fold constantexpr operands when the worklist is first populated,
don't bother every time going around the main worklist.  This speeds up a
release-asserts opt -std-compile-opts on 403.gcc by about 4% (1.5s).  It
seems to speed up the most expensive instances of instcombine by ~10%.

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

15 years agodon't bother calling ConstantFoldInstruction unless there is a use of the
Chris Lattner [Thu, 15 Oct 2009 04:13:44 +0000 (04:13 +0000)]
don't bother calling ConstantFoldInstruction unless there is a use of the
instruction (which disqualifies stores, unreachable, etc) and at least the
first operand is a constant.  This filters out a lot of obvious cases that
can't be folded.  Also, switch the IRBuilder to a TargetFolder, which tries
harder.

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

15 years agoTake advantage of TargetData when available; we know that the atomic intrinsics
Nick Lewycky [Thu, 15 Oct 2009 00:36:35 +0000 (00:36 +0000)]
Take advantage of TargetData when available; we know that the atomic intrinsics
only dereference the element they point to directly with no pointer arithmetic.

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

15 years agoMake CodePlacementOpt align loops, rather than loop headers. The
Dan Gohman [Thu, 15 Oct 2009 00:36:22 +0000 (00:36 +0000)]
Make CodePlacementOpt align loops, rather than loop headers. The
header is just the entry block to the loop, and it needn't be at
the top of the loop in the code layout.

Remove the code that suppressed loop alignment for outer loops,
so that outer loops are aligned.

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

15 years agoWhen LiveVariables is adding implicit-def to model "partial dead", add the earlyclobb...
Evan Cheng [Wed, 14 Oct 2009 23:39:27 +0000 (23:39 +0000)]
When LiveVariables is adding implicit-def to model "partial dead", add the earlyclobber marker if the superreg def has it.

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

15 years agoPrint earlyclobber for implicit-defs as well.
Evan Cheng [Wed, 14 Oct 2009 23:37:31 +0000 (23:37 +0000)]
Print earlyclobber for implicit-defs as well.

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

15 years agoOne more iteration here and a yet better way to solve it.
Eric Christopher [Wed, 14 Oct 2009 22:14:18 +0000 (22:14 +0000)]
One more iteration here and a yet better way to solve it.

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

15 years agoFix the unused argument problem here a different way - cast to void.
Eric Christopher [Wed, 14 Oct 2009 21:45:49 +0000 (21:45 +0000)]
Fix the unused argument problem here a different way - cast to void.

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

15 years agoFix instruction encoding bits for NEON VPADAL.
Bob Wilson [Wed, 14 Oct 2009 21:43:17 +0000 (21:43 +0000)]
Fix instruction encoding bits for NEON VPADAL.
Patch by Johnny Chen.

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

15 years agoRemove unused variables to fix build warning.
Bob Wilson [Wed, 14 Oct 2009 21:40:45 +0000 (21:40 +0000)]
Remove unused variables to fix build warning.

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

15 years agoMake loop not recalc getNumOperands() each time around
Jim Grosbach [Wed, 14 Oct 2009 21:22:39 +0000 (21:22 +0000)]
Make loop not recalc getNumOperands() each time around

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

15 years agoAdd support to record DbgScope as inlined scope.
Devang Patel [Wed, 14 Oct 2009 21:08:09 +0000 (21:08 +0000)]
Add support to record DbgScope as inlined scope.

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

15 years agoquiet compiler warning
Jim Grosbach [Wed, 14 Oct 2009 21:07:11 +0000 (21:07 +0000)]
quiet compiler warning

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

15 years agoDelete bogus semicolons.
Dan Gohman [Wed, 14 Oct 2009 20:39:01 +0000 (20:39 +0000)]
Delete bogus semicolons.

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

15 years agoInst{11-8} for vshl should be 0b0101, not 0b1111.
Jim Grosbach [Wed, 14 Oct 2009 20:31:01 +0000 (20:31 +0000)]
Inst{11-8} for vshl should be 0b0101, not 0b1111.
Refs: A7-17 & A8-750.

Patch by Johnny Chen.

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

15 years agoRemove a bunch of unused arguments from functions, silencing a
Eric Christopher [Wed, 14 Oct 2009 20:28:33 +0000 (20:28 +0000)]
Remove a bunch of unused arguments from functions, silencing a
warning.

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

15 years agoThe ARM and PowerPC jits are broken in this regard.
Nick Lewycky [Wed, 14 Oct 2009 20:04:41 +0000 (20:04 +0000)]
The ARM and PowerPC jits are broken in this regard.

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

15 years agoThere seems to be no reason for opt's -S option to be hidden.
Duncan Sands [Wed, 14 Oct 2009 20:01:39 +0000 (20:01 +0000)]
There seems to be no reason for opt's -S option to be hidden.
Make it visible.

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

15 years agoMake use of the result of the loads even though that means adding -instcombine.
Nick Lewycky [Wed, 14 Oct 2009 19:02:13 +0000 (19:02 +0000)]
Make use of the result of the loads even though that means adding -instcombine.

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

15 years agoSet instruction encoding bits 4 and 7 for ARM register-register and
Bob Wilson [Wed, 14 Oct 2009 19:00:24 +0000 (19:00 +0000)]
Set instruction encoding bits 4 and 7 for ARM register-register and
register-shifted-register instructions.  Patch by Johnny Chen.

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

15 years agoRefactor code to select NEON VST intrinsics.
Bob Wilson [Wed, 14 Oct 2009 18:32:29 +0000 (18:32 +0000)]
Refactor code to select NEON VST intrinsics.

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

15 years agoUse isVoidTy()
Devang Patel [Wed, 14 Oct 2009 17:29:00 +0000 (17:29 +0000)]
Use isVoidTy()

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

15 years agoRefactor code to select NEON VLD intrinsics.
Bob Wilson [Wed, 14 Oct 2009 17:28:52 +0000 (17:28 +0000)]
Refactor code to select NEON VLD intrinsics.

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

15 years agoAdd copyMD to copy metadata from one instruction to another instruction.
Devang Patel [Wed, 14 Oct 2009 17:02:49 +0000 (17:02 +0000)]
Add copyMD to copy metadata from one instruction to another instruction.

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

15 years agoMore refactoring. NEON vst lane intrinsics can share almost all the code for
Bob Wilson [Wed, 14 Oct 2009 16:46:45 +0000 (16:46 +0000)]
More refactoring.  NEON vst lane intrinsics can share almost all the code for
vld lane intrinsics.

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

15 years agoRefactor code for selecting NEON load lane intrinsics.
Bob Wilson [Wed, 14 Oct 2009 16:19:03 +0000 (16:19 +0000)]
Refactor code for selecting NEON load lane intrinsics.

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

15 years agoI don't see any point in having both eh.selector.i32 and eh.selector.i64,
Duncan Sands [Wed, 14 Oct 2009 16:11:37 +0000 (16:11 +0000)]
I don't see any point in having both eh.selector.i32 and eh.selector.i64,
so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector.
Likewise for eh.typeid.for.  This aligns us with gcc, which always uses a
32 bit value for the selector on all platforms.  My understanding is that
the register allocator used to assert if the selector intrinsic size didn't
match the pointer size, and this was the reason for introducing the two
variants.  However my testing shows that this is no longer the case (I
fixed some bugs in selector lowering yesterday, and some more today in the
fastisel path; these might have caused the original problems).

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

15 years agomake instcombine's instruction sinking more aggressive in the
Chris Lattner [Wed, 14 Oct 2009 15:21:58 +0000 (15:21 +0000)]
make instcombine's instruction sinking more aggressive in the
presence of PHI nodes.

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

15 years agoUndo pthread patch from rev. 83930 & 83823. Credit to Paul Davey.
Edward O'Callaghan [Wed, 14 Oct 2009 11:12:33 +0000 (11:12 +0000)]
Undo pthread patch from rev. 83930 & 83823. Credit to Paul Davey.

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

15 years agoClear VisitedPHIs after use.
Evan Cheng [Wed, 14 Oct 2009 06:46:26 +0000 (06:46 +0000)]
Clear VisitedPHIs after use.

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

15 years agoAnother BasicAA fix. If a value does not alias a GEP's base pointer, then it
Evan Cheng [Wed, 14 Oct 2009 06:41:49 +0000 (06:41 +0000)]
Another BasicAA fix. If a value does not alias a GEP's base pointer, then it
cannot alias the GEP. GEP pointer alias rule states this clearly:
A pointer value formed from a getelementptr instruction is associated with the
addresses associated with the first operand of the getelementptr.

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

15 years agoAuroraUX needs special Solaris system header.
Edward O'Callaghan [Wed, 14 Oct 2009 05:55:03 +0000 (05:55 +0000)]
AuroraUX needs special Solaris system header.

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

15 years agoMore code clean up based on patch feedback.
Evan Cheng [Wed, 14 Oct 2009 05:22:03 +0000 (05:22 +0000)]
More code clean up based on patch feedback.

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

15 years agoChange VisitedPHIs into an instance variable that's freed by each alias() call.
Evan Cheng [Wed, 14 Oct 2009 05:05:02 +0000 (05:05 +0000)]
Change VisitedPHIs into an instance variable that's freed by each alias() call.

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

15 years agoReplace test with a simpler hand crafted one.
Evan Cheng [Wed, 14 Oct 2009 01:45:10 +0000 (01:45 +0000)]
Replace test with a simpler hand crafted one.

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

15 years agoProvide AuroraUX triple support in configure. Credit to - Paul Davey.
Edward O'Callaghan [Wed, 14 Oct 2009 00:44:50 +0000 (00:44 +0000)]
Provide AuroraUX triple support in configure. Credit to - Paul Davey.

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

15 years agoUse llvmgxx for C++ test.
Dale Johannesen [Wed, 14 Oct 2009 00:34:56 +0000 (00:34 +0000)]
Use llvmgxx for C++ test.

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

15 years agoFix this test to account for a movl $0 being emitted as an xor now,
Dan Gohman [Wed, 14 Oct 2009 00:28:48 +0000 (00:28 +0000)]
Fix this test to account for a movl $0 being emitted as an xor now,
and convert it to FileCheck.

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

15 years agoTestcases for msasm bit (llvm-gcc 84062).
Dale Johannesen [Wed, 14 Oct 2009 00:10:54 +0000 (00:10 +0000)]
Testcases for msasm bit (llvm-gcc 84062).

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

15 years agoMake isSafeToClobberEFLAGS more aggressive. Teach it to scan backwards
Dan Gohman [Wed, 14 Oct 2009 00:08:59 +0000 (00:08 +0000)]
Make isSafeToClobberEFLAGS more aggressive. Teach it to scan backwards
(for uses marked kill and defs marked dead) a few instructions in
addition to forwards. Also, increase the maximum number of instructions
to scan, as it appears to help in a fair number of cases.

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

15 years agoThis remat entry is basically done. There are hooks to allow targets
Dan Gohman [Wed, 14 Oct 2009 00:02:01 +0000 (00:02 +0000)]
This remat entry is basically done. There are hooks to allow targets
to remat non-load instructions as loads, and the remat code now uses
the UnmodeledSideEffects flags, MachineMemOperands, and similar things
to decide which instructions are valid for rematerialization.

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

15 years agoAdd a few README.txt items.
Dan Gohman [Tue, 13 Oct 2009 23:58:05 +0000 (23:58 +0000)]
Add a few README.txt items.

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

15 years agoFix resetCachedCostInfo to reset all of the cost information, instead of
Dan Gohman [Tue, 13 Oct 2009 23:36:36 +0000 (23:36 +0000)]
Fix resetCachedCostInfo to reset all of the cost information, instead of
just the NumBlocks field.

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

15 years agoCorrect comment about ARM immediates using '#' not '$' and TODO for modifiers.
Kevin Enderby [Tue, 13 Oct 2009 23:33:38 +0000 (23:33 +0000)]
Correct comment about ARM immediates using '#' not '$' and TODO for modifiers.

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

15 years agos/DebugLoc.CompileUnit/DebugLoc.Scope/g
Devang Patel [Tue, 13 Oct 2009 23:28:53 +0000 (23:28 +0000)]
s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g

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

15 years agoCheck void type before using RAUWd.
Devang Patel [Tue, 13 Oct 2009 22:56:32 +0000 (22:56 +0000)]
Check void type before using RAUWd.

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

15 years agoMore Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
Bob Wilson [Tue, 13 Oct 2009 22:29:24 +0000 (22:29 +0000)]
More Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
by creating TargetConstants during instruction selection instead of during
legalization.

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

15 years agoMore bits of the ARM target assembler for llvm-mc to parse immediates.
Kevin Enderby [Tue, 13 Oct 2009 22:19:02 +0000 (22:19 +0000)]
More bits of the ARM target assembler for llvm-mc to parse immediates.
Also fixed a couple of coding style things that crept in.  And added more
to the temporary hacked up ARMAsmParser::MatchInstruction() method for testing.

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

15 years agoTeach basic AA about PHI nodes. If all operands of a phi NoAlias another value than...
Evan Cheng [Tue, 13 Oct 2009 22:02:20 +0000 (22:02 +0000)]
Teach basic AA about PHI nodes. If all operands of a phi NoAlias another value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias.

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

15 years agoDocumentation for the new msasm flag, which is no
Dale Johannesen [Tue, 13 Oct 2009 21:56:55 +0000 (21:56 +0000)]
Documentation for the new msasm flag, which is no
worse than the rest of the asm documentation.

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

15 years agoNEON VLD/VST are now fully implemented. For operations that expand to
Bob Wilson [Tue, 13 Oct 2009 21:55:24 +0000 (21:55 +0000)]
NEON VLD/VST are now fully implemented.  For operations that expand to
multiple instructions, the expansion is done during selection so there is
no need to do anything special during legalization.

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

15 years agoDo not check use_empty() before replaceAllUsesWith(). This gives ValueHandles a chanc...
Devang Patel [Tue, 13 Oct 2009 21:41:20 +0000 (21:41 +0000)]
Do not check use_empty() before replaceAllUsesWith(). This gives ValueHandles a chance to get properly updated.

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

15 years agoKeep track of stubs that are created. This fixes PR5162 and probably PR4822 and
Jeffrey Yasskin [Tue, 13 Oct 2009 21:32:57 +0000 (21:32 +0000)]
Keep track of stubs that are created. This fixes PR5162 and probably PR4822 and
4406. Patch by Nick Lewycky!

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

15 years agoAdd is_same type trait
Douglas Gregor [Tue, 13 Oct 2009 21:17:00 +0000 (21:17 +0000)]
Add is_same type trait

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

15 years agoIntroduce new convenience methods for sign extending or
Duncan Sands [Tue, 13 Oct 2009 21:04:12 +0000 (21:04 +0000)]
Introduce new convenience methods for sign extending or
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it.  Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild).  In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.

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

15 years agoOptimizer may remove debug info. This test checks debug info for include headers.
Devang Patel [Tue, 13 Oct 2009 20:56:38 +0000 (20:56 +0000)]
Optimizer may remove debug info.  This test checks debug info for include headers.

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

15 years agoRevise ARM inline assembly memory operands to require the memory address to
Bob Wilson [Tue, 13 Oct 2009 20:50:28 +0000 (20:50 +0000)]
Revise ARM inline assembly memory operands to require the memory address to
be in a register.  The previous use of ARM address mode 2 was completely
arbitrary and inappropriate for Thumb.  Radar 7137468.

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

15 years agoAdd an "msasm" flag to inline asm as suggested in PR 5125.
Dale Johannesen [Tue, 13 Oct 2009 20:46:56 +0000 (20:46 +0000)]
Add an "msasm" flag to inline asm as suggested in PR 5125.
A little ugliness is accepted to keep the binary file format
compatible.  No functional change yet.

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

15 years agoThese tests now pass.
Devang Patel [Tue, 13 Oct 2009 20:45:18 +0000 (20:45 +0000)]
These tests now pass.

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

15 years agoFix method name in comment, per Bob Wilson.
Sandeep Patel [Tue, 13 Oct 2009 20:25:58 +0000 (20:25 +0000)]
Fix method name in comment, per Bob Wilson.

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

15 years agoUse the new CodeMetrics class to compute code size instead of
Dan Gohman [Tue, 13 Oct 2009 20:12:23 +0000 (20:12 +0000)]
Use the new CodeMetrics class to compute code size instead of
manually counting instructions.

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

15 years agoCompute a full cost value even when a setjmp call is found.
Dan Gohman [Tue, 13 Oct 2009 20:10:10 +0000 (20:10 +0000)]
Compute a full cost value even when a setjmp call is found.

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

15 years agoSplit code not specific to Function inlining out into a separate class,
Dan Gohman [Tue, 13 Oct 2009 19:58:07 +0000 (19:58 +0000)]
Split code not specific to Function inlining out into a separate class,
named CodeMetrics. Move it to be a non-nested class. Rename RegionInfo
back to FunctionInfo.

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