oota-llvm.git
14 years agoThis doesn't need SmallVector.h anymore.
Dan Gohman [Mon, 19 Apr 2010 17:51:31 +0000 (17:51 +0000)]
This doesn't need SmallVector.h anymore.

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

14 years agoSupport .a files directly (without -l).
Mikhail Glushenkov [Mon, 19 Apr 2010 17:25:38 +0000 (17:25 +0000)]
Support .a files directly (without -l).

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

14 years agoBetter error-handling for DisassembleThumb2DPSoReg() where the 3-reg operand
Johnny Chen [Mon, 19 Apr 2010 17:16:40 +0000 (17:16 +0000)]
Better error-handling for DisassembleThumb2DPSoReg() where the 3-reg operand
instructions should have Rd (Inst{11-8}) != 0b1111.

Ref: A6.3 32-bit Thumb instruction encoding
     A6.3.11 Data-processing (shifted register)

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

14 years agoFix this for std::vectors which don't have .data().
Dan Gohman [Mon, 19 Apr 2010 16:33:28 +0000 (16:33 +0000)]
Fix this for std::vectors which don't have .data().

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

14 years agoARM disassembler did not react to recent changes to the NEON instruction table.
Johnny Chen [Mon, 19 Apr 2010 16:20:34 +0000 (16:20 +0000)]
ARM disassembler did not react to recent changes to the NEON instruction table.
VLD1q*_UPD and VST1q*_UPD have the ${dst:dregpair} operand now.

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

14 years agoDon't write into MemoryBuffers.
Benjamin Kramer [Mon, 19 Apr 2010 16:15:31 +0000 (16:15 +0000)]
Don't write into MemoryBuffers.

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

14 years agoFix -Wcast-qual warnings.
Dan Gohman [Mon, 19 Apr 2010 15:55:10 +0000 (15:55 +0000)]
Fix -Wcast-qual warnings.

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

14 years agoRevert 91528 and use a std::vector instead, fixing an abuse of std::string.
Dan Gohman [Mon, 19 Apr 2010 15:54:44 +0000 (15:54 +0000)]
Revert 91528 and use a std::vector instead, fixing an abuse of std::string.

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

14 years agoFix -Wcast-qual warnings.
Dan Gohman [Mon, 19 Apr 2010 15:42:05 +0000 (15:42 +0000)]
Fix -Wcast-qual warnings.

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

14 years agoAdd a few more ELF bits.
Dan Gohman [Mon, 19 Apr 2010 15:40:15 +0000 (15:40 +0000)]
Add a few more ELF bits.

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

14 years agoAdd a const.
Dan Gohman [Mon, 19 Apr 2010 15:39:27 +0000 (15:39 +0000)]
Add a const.

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

14 years agoThese functions don't need to access this.
Dan Gohman [Mon, 19 Apr 2010 15:38:38 +0000 (15:38 +0000)]
These functions don't need to access this.

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

14 years agoAdd missed part of prev. commit
Anton Korobeynikov [Sun, 18 Apr 2010 20:41:42 +0000 (20:41 +0000)]
Add missed part of prev. commit

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

14 years agoMake processor FUs unique for given itinerary. This extends the limit of 32
Anton Korobeynikov [Sun, 18 Apr 2010 20:31:01 +0000 (20:31 +0000)]
Make processor FUs unique for given itinerary. This extends the limit of 32
FU per CPU arch to 32 per intinerary allowing precise modelling of quite
complex pipelines in the future.

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

14 years agoavoid temporary std::string in non posix_spawn path.
Chris Lattner [Sun, 18 Apr 2010 17:34:10 +0000 (17:34 +0000)]
avoid temporary std::string in non posix_spawn path.

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

14 years agoEliminate temporary string.
Benjamin Kramer [Sun, 18 Apr 2010 09:19:41 +0000 (09:19 +0000)]
Eliminate temporary string.

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

14 years agoProperly inherit the environment on darwin where environ is not available for shared...
Benjamin Kramer [Sun, 18 Apr 2010 09:16:04 +0000 (09:16 +0000)]
Properly inherit the environment on darwin where environ is not available for shared libraries.

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

14 years agoThis is horrible. Split the difference, and declare 'environ' on all non-Darwin
Nick Lewycky [Sun, 18 Apr 2010 07:07:48 +0000 (07:07 +0000)]
This is horrible. Split the difference, and declare 'environ' on all non-Darwin
platforms to unbreak the darwin and linux builds. The BSD folks should feel
free to change the #if, if this breaks them.

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

14 years agoRevert r101701, Darwin doesn't have 'environ'. Go figure.
Nick Lewycky [Sun, 18 Apr 2010 06:44:21 +0000 (06:44 +0000)]
Revert r101701, Darwin doesn't have 'environ'. Go figure.

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

14 years agoFix linux build. posix_spawn doesn't inherit the environment by default.
Nick Lewycky [Sun, 18 Apr 2010 06:22:26 +0000 (06:22 +0000)]
Fix linux build. posix_spawn doesn't inherit the environment by default.

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

14 years agomake Program::Execute use posix_spawn on systems that support it,
Chris Lattner [Sun, 18 Apr 2010 04:14:37 +0000 (04:14 +0000)]
make Program::Execute use posix_spawn on systems that support it,
as it is more efficient than fork/exec.

Thanks to Eric for adding the autoconf check.  It would be nice if
a cmake guru could add a cmake check for posix_spawn as well.

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

14 years agoreduce indentation
Chris Lattner [Sun, 18 Apr 2010 03:35:23 +0000 (03:35 +0000)]
reduce indentation

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

14 years agounnest from namespace.
Chris Lattner [Sun, 18 Apr 2010 03:33:55 +0000 (03:33 +0000)]
unnest from namespace.

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

14 years agosilence some -Wmissing-field-initializers warnings.
Chris Lattner [Sun, 18 Apr 2010 03:30:32 +0000 (03:30 +0000)]
silence some -Wmissing-field-initializers warnings.

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

14 years agosilence some unused-value warnings.
Chris Lattner [Sun, 18 Apr 2010 03:28:20 +0000 (03:28 +0000)]
silence some unused-value warnings.

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

14 years agoDon't rely upon the MCSymbol "isDefined" method to indicate if a label has been
Bill Wendling [Sun, 18 Apr 2010 00:56:05 +0000 (00:56 +0000)]
Don't rely upon the MCSymbol "isDefined" method to indicate if a label has been
emitted or not. The JIT doesn't set that. Look it up in the label location table
instead.

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

14 years agoFormatting changes. No functionality change.
Bill Wendling [Sun, 18 Apr 2010 00:52:08 +0000 (00:52 +0000)]
Formatting changes. No functionality change.

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

14 years agoAdd a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
Bill Wendling [Sun, 18 Apr 2010 00:51:49 +0000 (00:51 +0000)]
Add a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
indicated number of bytes.

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

14 years agoFix declarations in a few more tests.
Nick Lewycky [Sat, 17 Apr 2010 21:29:25 +0000 (21:29 +0000)]
Fix declarations in a few more tests.

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

14 years agoRevert "reject forward references to functions whose type don't match", because DJG...
Daniel Dunbar [Sat, 17 Apr 2010 21:24:55 +0000 (21:24 +0000)]
Revert "reject forward references to functions whose type don't match", because DJG told me to!

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

14 years agoFix intrinsic signature in this test.
Nick Lewycky [Sat, 17 Apr 2010 21:12:55 +0000 (21:12 +0000)]
Fix intrinsic signature in this test.

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

14 years agoreject forward references to functions whose type don't match
Chris Lattner [Sat, 17 Apr 2010 20:45:56 +0000 (20:45 +0000)]
reject forward references to functions whose type don't match
up with the definition (and fix a broken testcase).  PR6491.

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

14 years agoAdd comment (lost when reverting and reapplying 101503).
Dale Johannesen [Sat, 17 Apr 2010 19:56:46 +0000 (19:56 +0000)]
Add comment (lost when reverting and reapplying 101503).

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

14 years agodoh, didn't mean to check in my hackaround lit sucking. :)
Chris Lattner [Sat, 17 Apr 2010 19:04:03 +0000 (19:04 +0000)]
doh, didn't mean to check in my hackaround lit sucking. :)

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

14 years agofix PR6332, allowing an index of zero into a zero sized array
Chris Lattner [Sat, 17 Apr 2010 19:02:33 +0000 (19:02 +0000)]
fix PR6332, allowing an index of zero into a zero sized array
even if the element of the array has no size.

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

14 years agoteach the x86 asm parser how to handle segment prefixes
Chris Lattner [Sat, 17 Apr 2010 18:56:34 +0000 (18:56 +0000)]
teach the x86 asm parser how to handle segment prefixes
in memory operands.  rdar://7874844

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

14 years agorefactor .if handling code a bit.
Chris Lattner [Sat, 17 Apr 2010 18:14:27 +0000 (18:14 +0000)]
refactor .if handling code a bit.

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

14 years agofix PR6858: a dangling pointer use bug which was caused
Chris Lattner [Sat, 17 Apr 2010 17:57:56 +0000 (17:57 +0000)]
fix PR6858: a dangling pointer use bug which was caused
by switching CachedFunctionInfo from a std::map to a
ValueMap (which is implemented in terms of a DenseMap).

DenseMap has different iterator invalidation semantics
than std::map.

This should hopefully fix the dragonegg builder.

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

14 years agoa bunch of cleanups and tweaks, no functionality changes.
Chris Lattner [Sat, 17 Apr 2010 17:55:00 +0000 (17:55 +0000)]
a bunch of cleanups and tweaks, no functionality changes.

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

14 years agoFix more -Wcast-qual warnings.
Dan Gohman [Sat, 17 Apr 2010 17:44:03 +0000 (17:44 +0000)]
Fix more -Wcast-qual warnings.

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

14 years agoFix -Wcast-qual warnings.
Dan Gohman [Sat, 17 Apr 2010 17:42:52 +0000 (17:42 +0000)]
Fix -Wcast-qual warnings.

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

14 years agoremove a dead variable, PR6856
Chris Lattner [Sat, 17 Apr 2010 17:28:00 +0000 (17:28 +0000)]
remove a dead variable, PR6856

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

14 years agotestcase for r101538, patch by Nico Schmidt!
Chris Lattner [Sat, 17 Apr 2010 17:22:06 +0000 (17:22 +0000)]
testcase for r101538, patch by Nico Schmidt!

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

14 years agoAdd const qualifiers to TargetLoweringObjectFile usage.
Dan Gohman [Sat, 17 Apr 2010 16:44:48 +0000 (16:44 +0000)]
Add const qualifiers to TargetLoweringObjectFile usage.

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

14 years agoUse const_cast instead of a C-style cast to cast away const.
Dan Gohman [Sat, 17 Apr 2010 16:43:55 +0000 (16:43 +0000)]
Use const_cast instead of a C-style cast to cast away const.

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

14 years agoStart function numbering at 0.
Dan Gohman [Sat, 17 Apr 2010 16:29:15 +0000 (16:29 +0000)]
Start function numbering at 0.

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

14 years agoDelete now-unnecessary const_casts.
Dan Gohman [Sat, 17 Apr 2010 15:32:28 +0000 (15:32 +0000)]
Delete now-unnecessary const_casts.

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

14 years agoUse cast instead of dyn_cast when assuming success.
Dan Gohman [Sat, 17 Apr 2010 15:31:16 +0000 (15:31 +0000)]
Use cast instead of dyn_cast when assuming success.

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

14 years agoUse const qualifiers with TargetLowering. This eliminates several
Dan Gohman [Sat, 17 Apr 2010 15:26:15 +0000 (15:26 +0000)]
Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

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

14 years agoMove per-function state out of TargetLowering subclasses and into
Dan Gohman [Sat, 17 Apr 2010 14:41:14 +0000 (14:41 +0000)]
Move per-function state out of TargetLowering subclasses and into
MachineFunctionInfo subclasses.

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

14 years agoName these stub files consistently with the SPU and PPC targets' conventions.
Chandler Carruth [Sat, 17 Apr 2010 08:50:29 +0000 (08:50 +0000)]
Name these stub files consistently with the SPU and PPC targets' conventions.
Also rename the classes appropriately. The CMake build already used these
names.

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

14 years agoa bunch of ssse3 instructions are misencoded to think they have an
Chris Lattner [Sat, 17 Apr 2010 07:38:24 +0000 (07:38 +0000)]
a bunch of ssse3 instructions are misencoded to think they have an
i8 field when they really do not.  This fixes rdar://7840289

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

14 years agoreenable r101565, removing a problematic assertion.
Chris Lattner [Sat, 17 Apr 2010 07:17:19 +0000 (07:17 +0000)]
reenable r101565, removing a problematic assertion.
CGSCC can delete nodes in regions of the callgraph that
have already been visited.  If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number.  This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.

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

14 years agoPostra machine licm must add registers defined by loop invariants to *all* of
Evan Cheng [Sat, 17 Apr 2010 07:07:11 +0000 (07:07 +0000)]
Postra machine licm must add registers defined by loop invariants to *all* of
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.

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

14 years agoRefresh this documentation. Things have changed a bit in the mean time:
Nick Lewycky [Sat, 17 Apr 2010 07:00:24 +0000 (07:00 +0000)]
Refresh this documentation. Things have changed a bit in the mean time:
 - LLVMgold.so --> libLLVMgold.so
 - the GCC LTO project is no longer 'upcoming'
 - document the plugin support for 'ar' and 'nm'

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

14 years agoFix codegen passes. -disable-ssc shouldn't disable postra machine licm.
Evan Cheng [Sat, 17 Apr 2010 06:47:47 +0000 (06:47 +0000)]
Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.

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

14 years agoMore work to allow dag combiner to promote 16-bit ops to 32-bit.
Evan Cheng [Sat, 17 Apr 2010 06:13:15 +0000 (06:13 +0000)]
More work to allow dag combiner to promote 16-bit ops to 32-bit.

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

14 years agoAnother 80 col violation.
Evan Cheng [Sat, 17 Apr 2010 06:12:32 +0000 (06:12 +0000)]
Another 80 col violation.

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

14 years agoRevise my previous change to ExpandBIT_CONVERT. I hadn't realized that this
Bob Wilson [Sat, 17 Apr 2010 05:30:19 +0000 (05:30 +0000)]
Revise my previous change to ExpandBIT_CONVERT.  I hadn't realized that this
may be called when either the source or destination type is i64, and my
change also hadn't fixed the most obvious problem -- assuming that i64 will
only be bitconverted to f64, ignoring the various vector types.
Radar 7873160.

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

14 years agoAdd nounwind.
Evan Cheng [Sat, 17 Apr 2010 03:43:36 +0000 (03:43 +0000)]
Add nounwind.

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

14 years agoRe-commit my previous SSAUpdater changes. The previous version naively tried
Bob Wilson [Sat, 17 Apr 2010 03:08:24 +0000 (03:08 +0000)]
Re-commit my previous SSAUpdater changes.  The previous version naively tried
to determine where to place PHIs by iteratively comparing reaching definitions
at each block.  That was just plain wrong.  This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.

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

14 years agoAs a temporary workaround for post-RA not handling DebugValue instructions,
Bob Wilson [Sat, 17 Apr 2010 00:49:11 +0000 (00:49 +0000)]
As a temporary workaround for post-RA not handling DebugValue instructions,
just remove them all.  Radar 7873207 (working around the root problem of
Radar 7759363).

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

14 years agoRevert "Use a simpler data structure to calculate the least recently used register...
Jakob Stoklund Olesen [Sat, 17 Apr 2010 00:38:36 +0000 (00:38 +0000)]
Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."

This reverts commit 101392. It broke a buildbot.

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

14 years agoReapply 101503+101520. These are "obviously correct" [Chris]
Dale Johannesen [Sat, 17 Apr 2010 00:08:21 +0000 (00:08 +0000)]
Reapply 101503+101520.  These are "obviously correct" [Chris]
and don't cause any problems on Darwin.

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

14 years agodisable r101565: an assert is getting triggered. More lurking badness no doubt.
Chris Lattner [Sat, 17 Apr 2010 00:05:36 +0000 (00:05 +0000)]
disable r101565: an assert is getting triggered.  More lurking badness no doubt.

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

14 years agoadd a note
Chris Lattner [Fri, 16 Apr 2010 23:52:30 +0000 (23:52 +0000)]
add a note

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

14 years agoRevert 101465, it broke internal OpenGL testing.
Eric Christopher [Fri, 16 Apr 2010 23:37:20 +0000 (23:37 +0000)]
Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.

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

14 years agoAdd support to emit dwarf ranges.
Devang Patel [Fri, 16 Apr 2010 23:33:45 +0000 (23:33 +0000)]
Add support to emit dwarf ranges.

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

14 years agoUse a simpler data structure to calculate the least recently used register in RegAllo...
Jakob Stoklund Olesen [Fri, 16 Apr 2010 23:32:37 +0000 (23:32 +0000)]
Use a simpler data structure to calculate the least recently used register in RegAllocLocal.

This makes the local register allocator about 20% faster.

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

14 years agoCast to (uint64_t) instead of relying on the "ul" suffix.
Johnny Chen [Fri, 16 Apr 2010 23:30:28 +0000 (23:30 +0000)]
Cast to (uint64_t) instead of relying on the "ul" suffix.

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

14 years agoAdd a getSelectionDAGInfo member to TargetMachine.
Dan Gohman [Fri, 16 Apr 2010 23:09:10 +0000 (23:09 +0000)]
Add a getSelectionDAGInfo member to TargetMachine.

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

14 years agoupdate docs for api change.
Chris Lattner [Fri, 16 Apr 2010 23:07:44 +0000 (23:07 +0000)]
update docs for api change.

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

14 years agobuilding on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
Chris Lattner [Fri, 16 Apr 2010 23:04:30 +0000 (23:04 +0000)]
building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.

This is a really terrible problem which was causing -g to affect codegen
because it would permute the memory image of the compiler process.

Thanks to Dale for expertly hunting it down.

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

14 years agoAdd skeleton target-specific SelectionDAGInfo files.
Dan Gohman [Fri, 16 Apr 2010 23:04:22 +0000 (23:04 +0000)]
Add skeleton target-specific SelectionDAGInfo files.

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

14 years agoFixed logic error. Should check Builder for validity before calling SetSession
Johnny Chen [Fri, 16 Apr 2010 23:02:25 +0000 (23:02 +0000)]
Fixed logic error.  Should check Builder for validity before calling SetSession
on it.

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

14 years agomove ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
Chris Lattner [Fri, 16 Apr 2010 22:59:24 +0000 (22:59 +0000)]
move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().

No functionality change.

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

14 years agoRegenerate configure script.
Dan Gohman [Fri, 16 Apr 2010 22:59:06 +0000 (22:59 +0000)]
Regenerate configure script.

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

14 years agoAdd an autoconf check for -retain-symbols-file and conditionalize
Dan Gohman [Fri, 16 Apr 2010 22:58:15 +0000 (22:58 +0000)]
Add an autoconf check for -retain-symbols-file and conditionalize
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.

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

14 years agoMinor change to make the test case comply with Vd<0> == '0' when Q == '1'.
Johnny Chen [Fri, 16 Apr 2010 22:48:31 +0000 (22:48 +0000)]
Minor change to make the test case comply with Vd<0> == '0' when Q == '1'.

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

14 years agointroduce a new CallGraphSCC class, and pass it around
Chris Lattner [Fri, 16 Apr 2010 22:42:17 +0000 (22:42 +0000)]
introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.

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

14 years agoFixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
Johnny Chen [Fri, 16 Apr 2010 22:40:20 +0000 (22:40 +0000)]
Fixed a bug in DisassembleN1RegModImmFrm() where a break stmt was missing for a
case.  Also, the 0xFF hex literal involved in the shift for ESize64 should be
suffixed "ul" to preserve the shift result.

Implemented printHex*ImmOperand() by copying from ARMAsmPrinter.cpp and added a
test case for DisassembleN1RegModImmFrm()/printHex64ImmOperand().

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

14 years ago(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until...
Evan Cheng [Fri, 16 Apr 2010 22:26:19 +0000 (22:26 +0000)]
(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.

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

14 years agotidy up
Chris Lattner [Fri, 16 Apr 2010 21:57:10 +0000 (21:57 +0000)]
tidy up

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

14 years agomove PrintCallGraphPass out of the middle of CGPassManager.
Chris Lattner [Fri, 16 Apr 2010 21:43:55 +0000 (21:43 +0000)]
move PrintCallGraphPass out of the middle of CGPassManager.

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

14 years agoadd a missing break back, patch by Nico Schmidt!
Chris Lattner [Fri, 16 Apr 2010 21:15:15 +0000 (21:15 +0000)]
add a missing break back, patch by Nico Schmidt!

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

14 years agoCreate a new TargetSelectionDAGInfo class. This will eventually acquire
Dan Gohman [Fri, 16 Apr 2010 21:12:11 +0000 (21:12 +0000)]
Create a new TargetSelectionDAGInfo class. This will eventually acquire
SelectionDAG-specific parts of TargetLowering.

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

14 years agoCommit this, which should have accompanied 101531.
Dan Gohman [Fri, 16 Apr 2010 20:22:43 +0000 (20:22 +0000)]
Commit this, which should have accompanied 101531.

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

14 years agoEliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.
Dan Gohman [Fri, 16 Apr 2010 20:11:05 +0000 (20:11 +0000)]
Eliminate an unnecessary SelectionDAG dependency in getOptimalMemOpType.

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

14 years agoFix this code to avoid implicit assumptions about the length of the array.
Dan Gohman [Fri, 16 Apr 2010 20:08:45 +0000 (20:08 +0000)]
Fix this code to avoid implicit assumptions about the length of the array.

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

14 years agoIn the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOp...
Johnny Chen [Fri, 16 Apr 2010 19:57:21 +0000 (19:57 +0000)]
In the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOperand(),
this patch removes the assert() from printAddrMode3OffsetOperand() and adds a test case.

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

14 years agoRevert 101520, which depended on 101503, which was reverted.
Dan Gohman [Fri, 16 Apr 2010 19:36:41 +0000 (19:36 +0000)]
Revert 101520, which depended on 101503, which was reverted.

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

14 years agoMulticlass LdStCop was using pre-UAL syntax LDC<c>L for the L fragment. Changed
Johnny Chen [Fri, 16 Apr 2010 19:33:23 +0000 (19:33 +0000)]
Multiclass LdStCop was using pre-UAL syntax LDC<c>L for the L fragment.  Changed
to the UAL syntax of LDCL<c>, instead.

Add a test case for this change which also tests the removal of assert() from
printAddrMode2OffsetOperand().

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

14 years agoRevert commit 101503 (johannes), in the hope of fixing the dragonegg build,
Duncan Sands [Fri, 16 Apr 2010 19:28:59 +0000 (19:28 +0000)]
Revert commit 101503 (johannes), in the hope of fixing the dragonegg build,
see http://google1.osuosl.org:8011/builders/dragonegg-x86_64-linux/builds/693
Original commit text:
Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

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

14 years agoRemove the assert() from printAddrMode2OffsetOperand(). "#0 and #-0" are
Johnny Chen [Fri, 16 Apr 2010 19:10:52 +0000 (19:10 +0000)]
Remove the assert() from printAddrMode2OffsetOperand().  "#0 and #-0" are
considered legal instructions.

Refs: A8.6.51 LDC, LDC2 (immediate) -- page A8-107, A8.6.58 LDR (immediate, ARM)
-- page A8-121, and A8.6.194 STR (immediate, ARM) -- page A8-395.

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

14 years agoTrim a #include.
Dan Gohman [Fri, 16 Apr 2010 18:45:11 +0000 (18:45 +0000)]
Trim a #include.

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

14 years agoRevert r101455, which fails on the llvm-arm-linux buildbot.
Dan Gohman [Fri, 16 Apr 2010 18:37:31 +0000 (18:37 +0000)]
Revert r101455, which fails on the llvm-arm-linux buildbot.

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

14 years agoUse a ValueMap not a std::map for the reason indicated
Dale Johannesen [Fri, 16 Apr 2010 18:16:08 +0000 (18:16 +0000)]
Use a ValueMap not a std::map for the reason indicated
in the comment.  This was causing nondeterministic changes
in inlining decisions.

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

14 years ago80 col.
Evan Cheng [Fri, 16 Apr 2010 17:58:41 +0000 (17:58 +0000)]
80 col.

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

14 years ago80 col.
Evan Cheng [Fri, 16 Apr 2010 17:57:59 +0000 (17:57 +0000)]
80 col.

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

14 years agoAvoid creating virtual registers for unused values.
Dan Gohman [Fri, 16 Apr 2010 17:15:02 +0000 (17:15 +0000)]
Avoid creating virtual registers for unused values.

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