oota-llvm.git
15 years agoMake isOperationLegal do what its name suggests, and introduce a
Dan Gohman [Wed, 28 Jan 2009 17:46:25 +0000 (17:46 +0000)]
Make isOperationLegal do what its name suggests, and introduce a
new isOperationLegalOrCustom, which does what isOperationLegal
previously did.

Update a bunch of callers to use isOperationLegalOrCustom
instead of isOperationLegal. In some case it wasn't obvious
which behavior is desired; when in doubt I changed then to
isOperationLegalOrCustom as that preserves their previous
behavior.

This is for the second half of PR3376.

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

15 years agoFormatting.
Duncan Sands [Wed, 28 Jan 2009 14:42:54 +0000 (14:42 +0000)]
Formatting.

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

15 years agoRename getAnalysisToUpdate to getAnalysisIfAvailable.
Duncan Sands [Wed, 28 Jan 2009 13:14:17 +0000 (13:14 +0000)]
Rename getAnalysisToUpdate to getAnalysisIfAvailable.

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

15 years agoFix PR3415 (infinite loop in EscapeAnalysis) by
Duncan Sands [Wed, 28 Jan 2009 11:33:59 +0000 (11:33 +0000)]
Fix PR3415 (infinite loop in EscapeAnalysis) by
deleting the escape analysis pass.

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

15 years agoThe memory alignment requirement on some of the mov{h|l}p{d|s} patterns are 16-byte...
Evan Cheng [Wed, 28 Jan 2009 08:35:02 +0000 (08:35 +0000)]
The memory alignment requirement on some of the mov{h|l}p{d|s} patterns are 16-byte. That is overly strict. These instructions read / write f64 memory locations without alignment requirement.

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

15 years agoAdded sse test patterns for r62979 and r63193.
Mon P Wang [Wed, 28 Jan 2009 08:13:56 +0000 (08:13 +0000)]
Added sse test patterns for r62979 and r63193.

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

15 years agoAdd shuffle splat pattern for x86 sse shifts.
Mon P Wang [Wed, 28 Jan 2009 08:12:05 +0000 (08:12 +0000)]
Add shuffle splat pattern for x86 sse shifts.

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

15 years agoTypo.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:47:58 +0000 (03:47 +0000)]
Typo.

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

15 years agoUpdate the generated docs.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:47:38 +0000 (03:47 +0000)]
Update the generated docs.

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

15 years agoAdd three new option properties.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:47:20 +0000 (03:47 +0000)]
Add three new option properties.

Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.

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

15 years agoClarify comment.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:46:22 +0000 (03:46 +0000)]
Clarify comment.

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

15 years agoUse ValueType::bitsLT to simplify some code.
Dan Gohman [Wed, 28 Jan 2009 03:10:52 +0000 (03:10 +0000)]
Use ValueType::bitsLT to simplify some code.

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

15 years agoUse ZERO_EXTEND instead of ANY_EXTEND when promoting
Dan Gohman [Wed, 28 Jan 2009 02:58:31 +0000 (02:58 +0000)]
Use ZERO_EXTEND instead of ANY_EXTEND when promoting
shift amounts, to avoid implicitly assuming that
target architectures will ignore the high bits.

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

15 years agoComment fixes.
Bill Wendling [Wed, 28 Jan 2009 01:19:52 +0000 (01:19 +0000)]
Comment fixes.

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

15 years agoSuppress a compile time warning.
Evan Cheng [Wed, 28 Jan 2009 00:53:34 +0000 (00:53 +0000)]
Suppress a compile time warning.

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

15 years agoEmbalm my ideas of how things should work. Not that
Dale Johannesen [Tue, 27 Jan 2009 23:32:10 +0000 (23:32 +0000)]
Embalm my ideas of how things should work.  Not that
anyone will pay attention.

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

15 years agoAdd type DIE into appropriate context DIE.
Devang Patel [Tue, 27 Jan 2009 23:22:55 +0000 (23:22 +0000)]
Add type DIE into appropriate context DIE.

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

15 years agoAdd a DebugLoc field and some simple accessors.
Dale Johannesen [Tue, 27 Jan 2009 23:20:29 +0000 (23:20 +0000)]
Add a DebugLoc field and some simple accessors.

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

15 years agoReorder args, constify.
Dale Johannesen [Tue, 27 Jan 2009 23:19:41 +0000 (23:19 +0000)]
Reorder args, constify.

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

15 years agoAdd testcase for r63142.
Bill Wendling [Tue, 27 Jan 2009 23:00:53 +0000 (23:00 +0000)]
Add testcase for r63142.

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

15 years agoTreat [1 x i8] zeroinitializer as a C string, placing such stuff into
Anton Korobeynikov [Tue, 27 Jan 2009 22:29:24 +0000 (22:29 +0000)]
Treat [1 x i8] zeroinitializer as a C string, placing such stuff into
mergeable string section. I don't see any bad impact of such decision
(rather then placing it into mergeable const section, as it was before),
but at least Darwin linker won't complain anymore.

The problem in LLVM is that we don't have special type for string constants
(like gcc does). Even more, we have two separate types: ConstatArray for non-null
strings and ConstantAggregateZero for null stuff.... It's a bit weird :)

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

15 years agoUse .empty() instead of comparing .size() with 0.
Dan Gohman [Tue, 27 Jan 2009 22:12:23 +0000 (22:12 +0000)]
Use .empty() instead of comparing .size() with 0.

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

15 years agoUpdate to latest spelling.
Dale Johannesen [Tue, 27 Jan 2009 22:09:11 +0000 (22:09 +0000)]
Update to latest spelling.

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

15 years agoAdd DebugLoc field and simple accessors.
Dale Johannesen [Tue, 27 Jan 2009 21:41:04 +0000 (21:41 +0000)]
Add DebugLoc field and simple accessors.

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

15 years agoRefine DebugLoc per review comments.
Evan Cheng [Tue, 27 Jan 2009 21:15:07 +0000 (21:15 +0000)]
Refine DebugLoc per review comments.

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

15 years agoAdd an assertion to the form of SelectionDAG::getConstant that takes
Dan Gohman [Tue, 27 Jan 2009 20:39:34 +0000 (20:39 +0000)]
Add an assertion to the form of SelectionDAG::getConstant that takes
a uint64_t to verify that the value is in range for the given type,
to help catch accidental overflow. Fix a few places that relied on
getConstant implicitly truncating the value.

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

15 years agoReformat the allocation-order arrays to a more conventional style.
Dan Gohman [Tue, 27 Jan 2009 19:25:38 +0000 (19:25 +0000)]
Reformat the allocation-order arrays to a more conventional style.

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

15 years agoDelete redundant return statements.
Dan Gohman [Tue, 27 Jan 2009 19:23:22 +0000 (19:23 +0000)]
Delete redundant return statements.

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

15 years agoRespect the DisableRedZone flag on PowerPC.
Dan Gohman [Tue, 27 Jan 2009 19:19:28 +0000 (19:19 +0000)]
Respect the DisableRedZone flag on PowerPC.

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

15 years agoSimplify findNonImmUse; return the result using the return value
Dan Gohman [Tue, 27 Jan 2009 19:04:30 +0000 (19:04 +0000)]
Simplify findNonImmUse; return the result using the return value
instead of via a by-reference argument. No functionality change.

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

15 years agoAPInt's countLeadingOnes() was broken for negative i128 values,
Torok Edwin [Tue, 27 Jan 2009 18:06:03 +0000 (18:06 +0000)]
APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.

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

15 years agoMake some comments doxygen-friendly.
Dan Gohman [Tue, 27 Jan 2009 17:28:23 +0000 (17:28 +0000)]
Make some comments doxygen-friendly.

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

15 years agoMake the pre-split-limit option more useful by using a per-function counter.
Owen Anderson [Tue, 27 Jan 2009 05:01:15 +0000 (05:01 +0000)]
Make the pre-split-limit option more useful by using a per-function counter.

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

15 years agoImplement multiple with overflow by 2 with an add instruction.
Evan Cheng [Tue, 27 Jan 2009 03:30:42 +0000 (03:30 +0000)]
Implement multiple with overflow by 2 with an add instruction.

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

15 years agoForgot this test case.
Evan Cheng [Tue, 27 Jan 2009 02:59:39 +0000 (02:59 +0000)]
Forgot this test case.

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

15 years agoEliminate unnecessary operands-list traversals.
Dan Gohman [Tue, 27 Jan 2009 02:37:43 +0000 (02:37 +0000)]
Eliminate unnecessary operands-list traversals.

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

15 years agoAdd a FrontendC testcase for the x86-64 Red Zone feature,
Dan Gohman [Tue, 27 Jan 2009 00:59:55 +0000 (00:59 +0000)]
Add a FrontendC testcase for the x86-64 Red Zone feature,
to help verify that the feature may be disabled through
the -mno-red-zone option.

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

15 years agoEnable the red zone on x86-64 by default.
Dan Gohman [Tue, 27 Jan 2009 00:58:47 +0000 (00:58 +0000)]
Enable the red zone on x86-64 by default.

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

15 years agoAssorted debug info fixes.
Devang Patel [Tue, 27 Jan 2009 00:45:04 +0000 (00:45 +0000)]
Assorted debug info fixes.
- DW_AT_bit_size is only suitable for bitfields.
- Encode source location info for derived types.
- Source location and type size info is not useful for subroutine_type (info is included in respective DISubprogram) and array_type.

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

15 years agoAdd a regression test for x86-64 red zone usage.
Dan Gohman [Tue, 27 Jan 2009 00:40:27 +0000 (00:40 +0000)]
Add a regression test for x86-64 red zone usage.

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

15 years agoFix the Red Zone calculation for functions with frame pointers.
Dan Gohman [Tue, 27 Jan 2009 00:40:06 +0000 (00:40 +0000)]
Fix the Red Zone calculation for functions with frame pointers.

Don't use the Red Zone when dynamic stack realignment is needed.
This could be implemented, but most x86-64 ABIs don't require
dynamic stack realignment so it isn't urgent.

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

15 years agoAdd an svn:ignore property.
Dan Gohman [Tue, 27 Jan 2009 00:37:09 +0000 (00:37 +0000)]
Add an svn:ignore property.

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

15 years agoNo need to keep size of DebugLocations vector separately.
Evan Cheng [Mon, 26 Jan 2009 23:47:30 +0000 (23:47 +0000)]
No need to keep size of DebugLocations vector separately.

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

15 years agoTestcase for 6522054.
Dale Johannesen [Mon, 26 Jan 2009 23:22:19 +0000 (23:22 +0000)]
Testcase for 6522054.

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

15 years agoCellSPU:
Scott Michel [Mon, 26 Jan 2009 22:33:37 +0000 (22:33 +0000)]
CellSPU:
- Update DWARF debugging support.

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

15 years agoMake the Dwarf macro information section optional; CellSPU's assembler
Scott Michel [Mon, 26 Jan 2009 22:32:51 +0000 (22:32 +0000)]
Make the Dwarf macro information section optional; CellSPU's assembler
doesn't support it. The default is set to 'true', so this should not
impact any other target backends.

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

15 years agoImplement Red Zone utilization on x86-64. This is currently
Dan Gohman [Mon, 26 Jan 2009 22:22:31 +0000 (22:22 +0000)]
Implement Red Zone utilization on x86-64. This is currently
disabled by default; I'll enable it when I hook it up with
the llvm-gcc flag which controls it.

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

15 years agoMore updates to VC proj...
Steve Naroff [Mon, 26 Jan 2009 22:03:42 +0000 (22:03 +0000)]
More updates to VC proj...

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

15 years agoReapply r63025 and r63026, with fixes for the failing testcases.
Owen Anderson [Mon, 26 Jan 2009 21:57:31 +0000 (21:57 +0000)]
Reapply r63025 and r63026, with fixes for the failing testcases.

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

15 years agoFix PR3393, which amounts to a bug in the expensive
Duncan Sands [Mon, 26 Jan 2009 21:54:18 +0000 (21:54 +0000)]
Fix PR3393, which amounts to a bug in the expensive
checking logic.  Rather than make the checking more
complicated, I've tweaked some logic to make things
conform to how the checking thought things ought to
be, since this results in a simpler "mental model".

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

15 years agoAdd method raw_fd_ostream::seek() for random access within a file.
Ted Kremenek [Mon, 26 Jan 2009 21:42:04 +0000 (21:42 +0000)]
Add method raw_fd_ostream::seek() for random access within a file.

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

15 years agoAt Nick Lewycky's request, rename this test with a more informative name.
Dan Gohman [Mon, 26 Jan 2009 21:36:31 +0000 (21:36 +0000)]
At Nick Lewycky's request, rename this test with a more informative name.

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

15 years agoAlso revert r63206
Bill Wendling [Mon, 26 Jan 2009 21:30:17 +0000 (21:30 +0000)]
Also revert r63206

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

15 years agoTemporarily revert r63025 until the testsuite failures can be fixed.
Bill Wendling [Mon, 26 Jan 2009 21:27:03 +0000 (21:27 +0000)]
Temporarily revert r63025 until the testsuite failures can be fixed.

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

15 years agoFix the name of an argument.
Dan Gohman [Mon, 26 Jan 2009 20:27:11 +0000 (20:27 +0000)]
Fix the name of an argument.

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

15 years agoDuring bittest switch lowering emit shift in the test block, which should (theoretically)
Anton Korobeynikov [Mon, 26 Jan 2009 19:26:01 +0000 (19:26 +0000)]
During bittest switch lowering emit shift in the test block, which should (theoretically)
allow us to generate more efficient code. We don't do this now though :)

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

15 years agoGet rid of a bunch of dead code now that interval reconstruction is enabled.
Owen Anderson [Mon, 26 Jan 2009 19:18:06 +0000 (19:18 +0000)]
Get rid of a bunch of dead code now that interval reconstruction is enabled.

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

15 years agoFix an issue where LiveIntervals was trying to be smart about removing kill
Owen Anderson [Mon, 26 Jan 2009 19:12:06 +0000 (19:12 +0000)]
Fix an issue where LiveIntervals was trying to be smart about removing kill
markers, and ended up foiling the interval reconstruction.

This allows us to turn on reconstruction in the pre alloc splitter, which
fixes a number of miscompilations.

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

15 years agoEnhance logic in X86DAGToDAGISel::PreprocessForRMW which move load inside callseq_sta...
Evan Cheng [Mon, 26 Jan 2009 18:43:34 +0000 (18:43 +0000)]
Enhance logic in X86DAGToDAGISel::PreprocessForRMW which move load inside callseq_start to allow it to be folded into a call. It was not considering the cases where a token factor is between the load and the callseq_start.

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

15 years agoSilence a bogus compiler warning.
Evan Cheng [Mon, 26 Jan 2009 18:33:51 +0000 (18:33 +0000)]
Silence a bogus compiler warning.

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

15 years agoUpdate VS project files.
Steve Naroff [Mon, 26 Jan 2009 18:08:55 +0000 (18:08 +0000)]
Update VS project files.

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

15 years agoFix a bug in BitVector.h. All assignment operations (except the usual
Roman Levenstein [Mon, 26 Jan 2009 11:07:20 +0000 (11:07 +0000)]
Fix a bug in BitVector.h. All assignment operations (except the usual
assignment operator) were returning a copy of the bit vector, instead of a
reference! This old semantics probably did not meet the expectations.
With this patch, chained assignments happen to the right object.

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

15 years agoActually source file has already been uniquified into an id during isel. Eliminate...
Evan Cheng [Mon, 26 Jan 2009 07:53:42 +0000 (07:53 +0000)]
Actually source file has already been uniquified into an id during isel. Eliminate the StringMap.

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

15 years agoAdd data structure to define and track debug location during codegen.
Evan Cheng [Mon, 26 Jan 2009 07:41:49 +0000 (07:41 +0000)]
Add data structure to define and track debug location during codegen.

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

15 years agoLooks like comments were chopped off.
Evan Cheng [Mon, 26 Jan 2009 07:40:13 +0000 (07:40 +0000)]
Looks like comments were chopped off.

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

15 years agoLLVM_SUPPORT_DEBUGINFO_H -> LLVM_ANALYSIS_DEBUGINFO_H since DebugInfo.h is under...
Evan Cheng [Mon, 26 Jan 2009 07:31:20 +0000 (07:31 +0000)]
LLVM_SUPPORT_DEBUGINFO_H -> LLVM_ANALYSIS_DEBUGINFO_H since DebugInfo.h is under Analysis.

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

15 years agoFixed optimization of combining two shuffles where the first shuffle inputs
Mon P Wang [Mon, 26 Jan 2009 04:39:00 +0000 (04:39 +0000)]
Fixed optimization of combining two shuffles where the first shuffle inputs
has a different number of elements than the output.

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

15 years agoTake the next steps in making SDUse more consistent with LLVM Use, and
Dan Gohman [Mon, 26 Jan 2009 04:35:06 +0000 (04:35 +0000)]
Take the next steps in making SDUse more consistent with LLVM Use, and
tidy up SDUse and related code.
 - Replace the operator= member functions with a set method, like
   LLVM Use has, and variants setInitial and setNode, which take
   care up updating use lists, like LLVM Use's does. This simplifies
   code that calls these functions.
 - getSDValue() is renamed to get(), as in LLVM Use, though most
   places can either use the implicit conversion to SDValue or the
   convenience functions instead.
 - Fix some more node vs. value terminology issues.

Also, eliminate the one remaining use of SDOperandPtr, and
SDOperandPtr itself.

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

15 years agoUntabify code.
Scott Michel [Mon, 26 Jan 2009 03:37:41 +0000 (03:37 +0000)]
Untabify code.

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

15 years agoCellSPU:
Scott Michel [Mon, 26 Jan 2009 03:31:40 +0000 (03:31 +0000)]
CellSPU:
- Rename fcmp.ll test to fcmp32.ll, start adding new double tests to fcmp64.ll
- Fix select_bits.ll test
- Capitulate to the DAGCombiner and move i64 constant loads to instruction
  selection (SPUISelDAGtoDAG.cpp).

  <rant>DAGCombiner will insert all kinds of 64-bit optimizations after
  operation legalization occurs and now we have to do most of the work that
  instruction selection should be doing twice (once to determine if v2i64
  build_vector can be handled by SelectCode(), which then runs all of the
  predicates a second time to select the necessary instructions.) But,
  CellSPU is a good citizen.</rant>

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

15 years agoFix a typo
Nate Begeman [Mon, 26 Jan 2009 03:15:54 +0000 (03:15 +0000)]
Fix a typo

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

15 years agoDe-identifying per sabre review
Nate Begeman [Mon, 26 Jan 2009 03:15:31 +0000 (03:15 +0000)]
De-identifying per sabre review

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

15 years agoBuild libLTO on any platform so long as PIC is enabled.
Nick Lewycky [Mon, 26 Jan 2009 03:04:57 +0000 (03:04 +0000)]
Build libLTO on any platform so long as PIC is enabled.

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

15 years agoAdd some documentation for address-space-based access to the segment registers.
Nate Begeman [Mon, 26 Jan 2009 02:54:45 +0000 (02:54 +0000)]
Add some documentation for address-space-based access to the segment registers.

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

15 years agoHandle single-entry phi nodes gracefully in condprop.
Chris Lattner [Mon, 26 Jan 2009 02:18:20 +0000 (02:18 +0000)]
Handle single-entry phi nodes gracefully in condprop.

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

15 years agoFix PR3408 by making a non-obvious assumption very obvious, and
Chris Lattner [Mon, 26 Jan 2009 02:11:30 +0000 (02:11 +0000)]
Fix PR3408 by making a non-obvious assumption very obvious, and
handling the flaw inherent in that assumption.  :)

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

15 years agoMore cleanups and simplifications, no functionality change.
Chris Lattner [Mon, 26 Jan 2009 01:57:01 +0000 (01:57 +0000)]
More cleanups and simplifications, no functionality change.

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

15 years agotidy asserts
Chris Lattner [Mon, 26 Jan 2009 01:38:24 +0000 (01:38 +0000)]
tidy asserts

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

15 years agoMap address space 256 to gs; similar mappings could be supported for the
Nate Begeman [Mon, 26 Jan 2009 01:24:32 +0000 (01:24 +0000)]
Map address space 256 to gs; similar mappings could be supported for the
other x86 segments.  address space 0 is stack/default, 1-255 are reserved for
client use.

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

15 years agoSupport pattern matching various x86 sse shifts.
Nate Begeman [Mon, 26 Jan 2009 00:52:55 +0000 (00:52 +0000)]
Support pattern matching various x86 sse shifts.

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

15 years agosilence a warning when assertions are disabled.
Chris Lattner [Sun, 25 Jan 2009 23:08:00 +0000 (23:08 +0000)]
silence a warning when assertions are disabled.

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

15 years agoshould have removed the + when manually applying a patch!
Torok Edwin [Sun, 25 Jan 2009 20:29:34 +0000 (20:29 +0000)]
should have removed the + when manually applying a patch!

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

15 years agorevert this patch for now, because Codegen does still want to generate SSE code,
Torok Edwin [Sun, 25 Jan 2009 20:21:24 +0000 (20:21 +0000)]
revert this patch for now, because Codegen does still want to generate SSE code,
for example in the case of va-args. XFAIL associated tests.

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

15 years agotestcase for llvm-gcc part of PR3402.
Torok Edwin [Sun, 25 Jan 2009 18:00:06 +0000 (18:00 +0000)]
testcase for llvm-gcc part of PR3402.

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

15 years agoIf user explicitly asks not to use SSE, don't force it. This fixes LLVM part of PR3402.
Torok Edwin [Sun, 25 Jan 2009 17:58:56 +0000 (17:58 +0000)]
If user explicitly asks not to use SSE, don't force it. This fixes LLVM part of PR3402.

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

15 years agoEliminate the loop that searches through each of the operands
Dan Gohman [Sun, 25 Jan 2009 16:29:12 +0000 (16:29 +0000)]
Eliminate the loop that searches through each of the operands
of each use in the SelectionDAG ReplaceAllUses* functions. Thanks
to Chris for spotting this opportunity.

Also, factor out code from all 5 of the ReplaceAllUses* functions
into AddNonLeafNodeToCSEMaps, which is now renamed
AddModifiedNodeToCSEMaps to more accurately reflect its purpose.

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

15 years agoWhitespace tidiments.
Dan Gohman [Sun, 25 Jan 2009 16:21:38 +0000 (16:21 +0000)]
Whitespace tidiments.

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

15 years agoMove the N->use_empty() assert from DeleteNode to
Dan Gohman [Sun, 25 Jan 2009 16:20:37 +0000 (16:20 +0000)]
Move the N->use_empty() assert from DeleteNode to
DeleteNodeNotInCSEMaps, since DeleteNode just calls
DeleteNodeNotInCSEMaps.

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

15 years agoReality-check the FAQ entry for "Can I use LLVM to convert C++ to C?"
Dan Gohman [Sun, 25 Jan 2009 16:04:50 +0000 (16:04 +0000)]
Reality-check the FAQ entry for "Can I use LLVM to convert C++ to C?"

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

15 years agoStart generating arbitrary precision integer SCEVs. This removes the temporary
Nick Lewycky [Sun, 25 Jan 2009 08:16:27 +0000 (08:16 +0000)]
Start generating arbitrary precision integer SCEVs. This removes the temporary
code that rounded up and capped the size.

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

15 years agoActually run the test in this directory.
Nick Lewycky [Sun, 25 Jan 2009 08:05:07 +0000 (08:05 +0000)]
Actually run the test in this directory.

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

15 years agoThe function that does nothing but call malloc is noalias return.
Nick Lewycky [Sun, 25 Jan 2009 07:59:57 +0000 (07:59 +0000)]
The function that does nothing but call malloc is noalias return.

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

15 years agoPrivate linkage support for PPC / Darwin.
Evan Cheng [Sun, 25 Jan 2009 06:32:01 +0000 (06:32 +0000)]
Private linkage support for PPC / Darwin.

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

15 years agoTeach 2addr pass to be do more commuting. If both uses of a two-address instruction...
Evan Cheng [Sun, 25 Jan 2009 03:53:59 +0000 (03:53 +0000)]
Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue.
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1
%reg1029<def> = MOV8rr %reg1028
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>
insert => %reg1030<def> = MOV8rr %reg1028
%reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead>

In this case, it might not be possible to coalesce the second MOV8rr
instruction if the first one is coalesced. So it would be profitable to
commute it:
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1
%reg1029<def> = MOV8rr %reg1028
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>
insert => %reg1030<def> = MOV8rr %reg1029
%reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead>

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

15 years agoFix an indent and a typo.
Nate Begeman [Sat, 24 Jan 2009 22:12:48 +0000 (22:12 +0000)]
Fix an indent and a typo.

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

15 years agoRevert previous change; even this mild and clearly
Dale Johannesen [Sat, 24 Jan 2009 21:49:34 +0000 (21:49 +0000)]
Revert previous change; even this mild and clearly
more accurate change loses more than it gains on
benchmarks.

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

15 years agoadd note about possible GEP improvement with fields of size 0.
Torok Edwin [Sat, 24 Jan 2009 19:30:25 +0000 (19:30 +0000)]
add note about possible GEP improvement with fields of size 0.

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

15 years agoAdd a PR comment to this test.
Dan Gohman [Sat, 24 Jan 2009 17:32:54 +0000 (17:32 +0000)]
Add a PR comment to this test.

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

15 years agotestcase for PR3381.
Torok Edwin [Sat, 24 Jan 2009 17:16:04 +0000 (17:16 +0000)]
testcase for PR3381.
Also it was an empty struct, not a void after all.

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

15 years agoAdd more documentation mentioning the limitations due to PR2660.
Dan Gohman [Sat, 24 Jan 2009 15:58:40 +0000 (15:58 +0000)]
Add more documentation mentioning the limitations due to PR2660.

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