oota-llvm.git
14 years agoFix tests for Neon load/store intrinsics to match the i8* types expected by
Bob Wilson [Tue, 20 Apr 2010 00:17:16 +0000 (00:17 +0000)]
Fix tests for Neon load/store intrinsics to match the i8* types expected by
the intrinsics.  The reason for those i8* types is that the intrinsics are
overloaded on the vector type and we don't have a way to declare an intrinsic
where one argument is an overloaded vector type and another argument is a
pointer to the vector element type.  The bitcasts added here will match what
the frontend will typically generate when these intrinsics are used.

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

14 years agoMore IT instruction error-handling improvements from fuzzing.
Johnny Chen [Tue, 20 Apr 2010 00:15:41 +0000 (00:15 +0000)]
More IT instruction error-handling improvements from fuzzing.

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

14 years agoRevert 101825, which is causing trouble.
Dan Gohman [Mon, 19 Apr 2010 23:34:15 +0000 (23:34 +0000)]
Revert 101825, which is causing trouble.

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

14 years agoMake BreakAntiDependencies' SUnits argument const, and make the Begin
Dan Gohman [Mon, 19 Apr 2010 23:11:58 +0000 (23:11 +0000)]
Make BreakAntiDependencies' SUnits argument const, and make the Begin
and End arguments by-value rather than by-reference.

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

14 years agoBetter error handling of invalid IT mask '0000', instead of just asserting.
Johnny Chen [Mon, 19 Apr 2010 23:02:58 +0000 (23:02 +0000)]
Better error handling of invalid IT mask '0000', instead of just asserting.

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

14 years agoEliminate SelectionDAGISel's "current block" member. Just pass it as
Dan Gohman [Mon, 19 Apr 2010 22:51:14 +0000 (22:51 +0000)]
Eliminate SelectionDAGISel's "current block" member. Just pass it as
an argument to things that need it.

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

14 years agoDelete an unnecessary reference to SelectionDAGISel::BB.
Dan Gohman [Mon, 19 Apr 2010 22:48:45 +0000 (22:48 +0000)]
Delete an unnecessary reference to SelectionDAGISel::BB.

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

14 years agoEliminate the CurMBB member from SelectionDAGBuilder. For places that
Dan Gohman [Mon, 19 Apr 2010 22:41:47 +0000 (22:41 +0000)]
Eliminate the CurMBB member from SelectionDAGBuilder. For places that
need it, just pass around the parent block of the current instruction
explicitly.

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

14 years agoRemove the Expr member from IVUsers. Instead of remembering the expression,
Dan Gohman [Mon, 19 Apr 2010 21:48:58 +0000 (21:48 +0000)]
Remove the Expr member from IVUsers. Instead of remembering the expression,
just ask ScalarEvolution for it on demand. This helps IVUsers be more robust
in the case of expressions changing underneath it. This fixes PR6862.

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

14 years agoAccording to A8.6.16 B (Encoding T3) and A8.3 Conditional execution -- A8.3.1
Johnny Chen [Mon, 19 Apr 2010 21:19:52 +0000 (21:19 +0000)]
According to A8.6.16 B (Encoding T3) and A8.3 Conditional execution -- A8.3.1
Pseudocode details of conditional, Condition bits '111x' indicate the
instruction is always executed.  That is, '1111' is a leagl condition field
value, which is now mapped to ARMCC::AL.

Also add a test case for condition field '1111'.

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

14 years agoFix typo. add a test case.
Devang Patel [Mon, 19 Apr 2010 20:31:39 +0000 (20:31 +0000)]
Fix typo. add a test case.

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

14 years agoMore progress on promoting i16 operations to i32 for x86. Work in progress.
Evan Cheng [Mon, 19 Apr 2010 19:29:22 +0000 (19:29 +0000)]
More progress on promoting i16 operations to i32 for x86. Work in progress.

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

14 years agoGive SelectionDAG a TargetMachine too, rather than having it
Dan Gohman [Mon, 19 Apr 2010 19:22:07 +0000 (19:22 +0000)]
Give SelectionDAG a TargetMachine too, rather than having it
fetch one from the MachineFunction.

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

14 years agoMore 80 col violation.
Evan Cheng [Mon, 19 Apr 2010 19:17:44 +0000 (19:17 +0000)]
More 80 col violation.

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

14 years agoAdd DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
Devang Patel [Mon, 19 Apr 2010 19:14:02 +0000 (19:14 +0000)]
Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.

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

14 years agoCode that needs a TargetMachine should have access to one directly, rather
Dan Gohman [Mon, 19 Apr 2010 19:05:59 +0000 (19:05 +0000)]
Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.

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

14 years agoMove isInTailCallPosition out of SelectionDAGBuilder, as it isn't
Dan Gohman [Mon, 19 Apr 2010 18:41:46 +0000 (18:41 +0000)]
Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
SelectionDAG-specific.

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

14 years agoEnable -Wcast-qual for C++ files, where intentional qualifier-stripping can
Dan Gohman [Mon, 19 Apr 2010 18:33:28 +0000 (18:33 +0000)]
Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can
be done with const_cast.

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

14 years agoRemove -module, which appears to be a leftover from prior libtool usage.
Dan Gohman [Mon, 19 Apr 2010 18:11:02 +0000 (18:11 +0000)]
Remove -module, which appears to be a leftover from prior libtool usage.

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

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