oota-llvm.git
15 years agoMake custom lowering of ADD work correctly. This
Duncan Sands [Sun, 22 Jun 2008 09:42:16 +0000 (09:42 +0000)]
Make custom lowering of ADD work correctly.  This
fixes PR2476; patch by Richard Osborne.  The same
problem exists for a bunch of other operators, but
I'm ignoring this because they will be automagically
fixed when the new LegalizeTypes infrastructure lands,
since it already solves this problem centrally.

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

15 years agoFix for PR2479: correctly optimize expressions like (a > 13) & (a ==
Eli Friedman [Sat, 21 Jun 2008 23:36:13 +0000 (23:36 +0000)]
Fix for PR2479: correctly optimize expressions like (a > 13) & (a ==
15).

See also PR1800, which is about the signed case.

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

15 years agoUse Instruction::eraseFromParent().
Dan Gohman [Sat, 21 Jun 2008 22:08:46 +0000 (22:08 +0000)]
Use Instruction::eraseFromParent().

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

15 years agoUse Function's arg_size() and size() methods.
Dan Gohman [Sat, 21 Jun 2008 22:06:54 +0000 (22:06 +0000)]
Use Function's arg_size() and size() methods.

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

15 years agoSimplify some getNode calls.
Dan Gohman [Sat, 21 Jun 2008 22:06:07 +0000 (22:06 +0000)]
Simplify some getNode calls.

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

15 years agocanClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;
Dan Gohman [Sat, 21 Jun 2008 22:05:24 +0000 (22:05 +0000)]
canClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;
check this with an assert.

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

15 years agoAvoid creating a redundant zero APInt.
Dan Gohman [Sat, 21 Jun 2008 22:03:12 +0000 (22:03 +0000)]
Avoid creating a redundant zero APInt.

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

15 years agoUse clear() to zero an existing APInt.
Dan Gohman [Sat, 21 Jun 2008 22:02:15 +0000 (22:02 +0000)]
Use clear() to zero an existing APInt.

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

15 years agoUse back() instead of [size()-1].
Dan Gohman [Sat, 21 Jun 2008 22:00:54 +0000 (22:00 +0000)]
Use back() instead of [size()-1].

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

15 years agoThis file is empty.
Duncan Sands [Sat, 21 Jun 2008 20:26:50 +0000 (20:26 +0000)]
This file is empty.

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

15 years agoTurn off llvm-gcc warnings when running "make check".
Duncan Sands [Sat, 21 Jun 2008 20:22:58 +0000 (20:22 +0000)]
Turn off llvm-gcc warnings when running "make check".

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

15 years agoUse MachineBasicBlock::transferSuccessors.
Dan Gohman [Sat, 21 Jun 2008 20:21:19 +0000 (20:21 +0000)]
Use MachineBasicBlock::transferSuccessors.

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

15 years agoUse static_cast instead of reinterpret_cast for casting void*.
Dan Gohman [Sat, 21 Jun 2008 20:17:03 +0000 (20:17 +0000)]
Use static_cast instead of reinterpret_cast for casting void*.

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

15 years agoFix warning when assertions disabled.
Chris Lattner [Sat, 21 Jun 2008 19:49:01 +0000 (19:49 +0000)]
Fix warning when assertions disabled.

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

15 years agofix warning when assertions disabled.
Chris Lattner [Sat, 21 Jun 2008 19:48:22 +0000 (19:48 +0000)]
fix warning when assertions disabled.

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

15 years agofix warning when assertion disabled.
Chris Lattner [Sat, 21 Jun 2008 19:47:44 +0000 (19:47 +0000)]
fix warning when assertion disabled.

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

15 years agofix some warnings when assertions are disabled.
Chris Lattner [Sat, 21 Jun 2008 19:47:03 +0000 (19:47 +0000)]
fix some warnings when assertions are disabled.

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

15 years agoRemove a redundant return.
Dan Gohman [Sat, 21 Jun 2008 19:34:57 +0000 (19:34 +0000)]
Remove a redundant return.

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

15 years agoReorder some fields in SDNode. This avoids padding,
Dan Gohman [Sat, 21 Jun 2008 19:26:15 +0000 (19:26 +0000)]
Reorder some fields in SDNode. This avoids padding,
reducings its size from 80 to 72 on 64-bit hosts.

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

15 years agoRemove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeId
Dan Gohman [Sat, 21 Jun 2008 19:18:17 +0000 (19:18 +0000)]
Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeId
field, which is otherwise unused after instruction selection, as an index
into the SUnit array.

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

15 years agoAdd a priority queue class, which is a wrapper around std::priority_queue
Dan Gohman [Sat, 21 Jun 2008 18:35:25 +0000 (18:35 +0000)]
Add a priority queue class, which is a wrapper around std::priority_queue
and provides fairly efficient removal of arbitrary elements. Switch
ScheduleDAGRRList from std::set to this new priority queue.

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

15 years agoSupport for load/store of expanded float types. I
Duncan Sands [Sat, 21 Jun 2008 17:00:47 +0000 (17:00 +0000)]
Support for load/store of expanded float types.  I
don't know if a truncating store is possible here,
but added support for it anyway.

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

15 years agoChange ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >
Dan Gohman [Sat, 21 Jun 2008 15:52:51 +0000 (15:52 +0000)]
Change ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >
to DenseMap<SDNode*, SUnit*>, and adjust the way cloned SUnit nodes are
handled so that only the original node needs to be in the map.
This speeds up llc on 447.dealII.llvm.bc by about 2%.

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

15 years agoEnable PRE.
Evan Cheng [Sat, 21 Jun 2008 07:26:53 +0000 (07:26 +0000)]
Enable PRE.

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

15 years agoUndo spill weight tweak. Need to investigate the performance regressions.
Evan Cheng [Sat, 21 Jun 2008 06:45:54 +0000 (06:45 +0000)]
Undo spill weight tweak. Need to investigate the performance regressions.

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

15 years agoSimplify some template parameterization.
Dan Gohman [Sat, 21 Jun 2008 01:08:22 +0000 (01:08 +0000)]
Simplify some template parameterization.

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

15 years agoBack out Matthijs' DAE patches. It's miscompiling gcc driver.
Evan Cheng [Sat, 21 Jun 2008 00:31:44 +0000 (00:31 +0000)]
Back out Matthijs' DAE patches. It's miscompiling gcc driver.

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

15 years agoUpdated VS build system. Patch provided by Cedric Venet:
Ted Kremenek [Fri, 20 Jun 2008 22:19:12 +0000 (22:19 +0000)]
Updated VS build system.  Patch provided by Cedric Venet:

  http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-June/015446.html

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

15 years agoEnhanced heuristic to determine the *best* register to spill. Instead of picking...
Evan Cheng [Fri, 20 Jun 2008 21:45:16 +0000 (21:45 +0000)]
Enhanced heuristic to determine the *best* register to spill. Instead of picking the register with the lowest spill weight. Consider (up to) 2 additional registers with spill weights that are close to the lowest spill weight. The one with fewest defs and uses that conflicts with the current interval (weighted by loop depth) is the spill candidate.

This is not always a win, but there are much more wins than loses and wins tend to be more noticeable.

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

15 years agointeger types are not primitive, they are derived.
Chris Lattner [Fri, 20 Jun 2008 20:50:48 +0000 (20:50 +0000)]
integer types are not primitive, they are derived.

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

15 years agollvmc doesn't exist anymore, and llvmc2 doesn't have a special license file.
Owen Anderson [Fri, 20 Jun 2008 20:05:57 +0000 (20:05 +0000)]
llvmc doesn't exist anymore, and llvmc2 doesn't have a special license file.

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

15 years agoRemove empty directory.
Owen Anderson [Fri, 20 Jun 2008 20:05:17 +0000 (20:05 +0000)]
Remove empty directory.

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

15 years agoShare some code that is common between integer and
Duncan Sands [Fri, 20 Jun 2008 18:40:50 +0000 (18:40 +0000)]
Share some code that is common between integer and
float expansion (and sometimes vector splitting too).

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

15 years agoAdd some methods for querying the nature of a
Duncan Sands [Fri, 20 Jun 2008 18:34:30 +0000 (18:34 +0000)]
Add some methods for querying the nature of a
store, like the methods for loads (and neaten
those up a bit while there).

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

15 years agoRename the operation of turning a float type into an
Duncan Sands [Fri, 20 Jun 2008 17:49:55 +0000 (17:49 +0000)]
Rename the operation of turning a float type into an
integer of the same type.  Before it was "promotion",
but this is confusing because it is quite different
to promotion of integers.  Call it "softening" instead,
inspired by "soft float".

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

15 years agoClean up some uses of std::distance, now that we have allnodes_size.
Dan Gohman [Fri, 20 Jun 2008 17:15:19 +0000 (17:15 +0000)]
Clean up some uses of std::distance, now that we have allnodes_size.

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

15 years agoClean up a use of std::distance.
Dan Gohman [Fri, 20 Jun 2008 17:11:32 +0000 (17:11 +0000)]
Clean up a use of std::distance.

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

15 years agoTidy up some commments and use the getAggregateOperand and
Dan Gohman [Fri, 20 Jun 2008 16:41:17 +0000 (16:41 +0000)]
Tidy up some commments and use the getAggregateOperand and
getInsertedValueOperand accessors. Thanks Matthijs!

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

15 years agoFix the conditions under which SCCP should examine insertvalue
Dan Gohman [Fri, 20 Jun 2008 16:39:44 +0000 (16:39 +0000)]
Fix the conditions under which SCCP should examine insertvalue
instructions. Thanks to Matthijs Kooijman for pointing this out!

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

15 years agoAdd an allnodes_size method.
Dan Gohman [Fri, 20 Jun 2008 16:03:16 +0000 (16:03 +0000)]
Add an allnodes_size method.

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

15 years agoAdd testcase that checks that DeadArgElim doesn't touch stuff it shouldn't touch.
Matthijs Kooijman [Fri, 20 Jun 2008 15:38:22 +0000 (15:38 +0000)]
Add testcase that checks that DeadArgElim doesn't touch stuff it shouldn't touch.

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

15 years ago80 column and trailing whitespace fixes.
Matthijs Kooijman [Fri, 20 Jun 2008 15:34:07 +0000 (15:34 +0000)]
80 column and trailing whitespace fixes.

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

15 years agoDon't let DeadArgumentElimination attempt to update callers when the return
Matthijs Kooijman [Fri, 20 Jun 2008 15:25:43 +0000 (15:25 +0000)]
Don't let DeadArgumentElimination attempt to update callers when the return
type wasn't changed.

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

15 years agoDon't let DeadArgElimination change the return type ({} into void and {T}
Matthijs Kooijman [Fri, 20 Jun 2008 15:16:45 +0000 (15:16 +0000)]
Don't let DeadArgElimination change the return type ({} into void and {T}
into T) when no return values are actually dead.

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

15 years agoExplicitely track if any arguments or return values were removed in
Matthijs Kooijman [Fri, 20 Jun 2008 14:28:52 +0000 (14:28 +0000)]
Explicitely track if any arguments or return values were removed in
DeadArgumentElimination and assert that the function type does not change if
nothing was changed. This should catch subtle changes in function type that are
not intended.

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

15 years agoRemove debug output.
Matthijs Kooijman [Fri, 20 Jun 2008 14:03:35 +0000 (14:03 +0000)]
Remove debug output.

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

15 years agoRecommit r52459, rewriting of the dead argument elimination pass.
Matthijs Kooijman [Fri, 20 Jun 2008 09:36:16 +0000 (09:36 +0000)]
Recommit r52459, rewriting of the dead argument elimination pass.

This is a fixed version that no longer uses multimap::equal_range, which
resulted in a pointer invalidation problem.

Also, DAE::InspectedFunctions was not really necessary, so it got removed.

Lastly, this version no longer applies the extra arg hack on functions who did
not have any arguments to start with.

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

15 years agoReally disable PRE.
Owen Anderson [Fri, 20 Jun 2008 08:59:13 +0000 (08:59 +0000)]
Really disable PRE.

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

15 years ago"Just a small update for the project files for adding a missing preprocessor
Chris Lattner [Fri, 20 Jun 2008 05:35:58 +0000 (05:35 +0000)]
"Just a small update for the project files for adding a missing preprocessor
definition for VS2005 (without SP1). It suppress the (bogus) M$ deprecated
warning."

Patch by Cédric Venet!

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

15 years agoFix a warning, closing PR2452
Chris Lattner [Fri, 20 Jun 2008 05:33:29 +0000 (05:33 +0000)]
Fix a warning, closing PR2452

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

15 years agoFix a warning.
Chris Lattner [Fri, 20 Jun 2008 05:31:04 +0000 (05:31 +0000)]
Fix a warning.

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

15 years agoFix an error handling redefinition of linkonce functions where the
Chris Lattner [Fri, 20 Jun 2008 05:29:39 +0000 (05:29 +0000)]
Fix an error handling redefinition of linkonce functions where the
types differ.  Patch by Nathan Keynes!

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

15 years agofix a warning.
Chris Lattner [Fri, 20 Jun 2008 05:28:56 +0000 (05:28 +0000)]
fix a warning.

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

15 years agoFix PR2471, which is a bug involving an invalid promotion from a conditional load.
Chris Lattner [Fri, 20 Jun 2008 05:12:56 +0000 (05:12 +0000)]
Fix PR2471, which is a bug involving an invalid promotion from a conditional load.

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

15 years agoFix typo, fix suggested by Nicholas Olsen
Chris Lattner [Fri, 20 Jun 2008 05:03:17 +0000 (05:03 +0000)]
Fix typo, fix suggested by Nicholas Olsen

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

15 years agoAdd C binding for ExecutionEngine::addGlobalMapping.
Gordon Henriksen [Fri, 20 Jun 2008 02:16:11 +0000 (02:16 +0000)]
Add C binding for ExecutionEngine::addGlobalMapping.

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

15 years agoTeach ReturnInst lowering about aggregate return values.
Dan Gohman [Fri, 20 Jun 2008 01:29:26 +0000 (01:29 +0000)]
Teach ReturnInst lowering about aggregate return values.

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

15 years agoChange around the data structures used to store availability sets, resulting in a...
Owen Anderson [Fri, 20 Jun 2008 01:15:47 +0000 (01:15 +0000)]
Change around the data structures used to store availability sets, resulting in a GVN+PRE that is faster that GVN alone was before.

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

15 years agoTeach SCCP about insertvalue and extractvalue, and about
Dan Gohman [Fri, 20 Jun 2008 01:15:44 +0000 (01:15 +0000)]
Teach SCCP about insertvalue and extractvalue, and about
propagating constants across aggregate return values when
insertvalue and extractvalue are used.

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

15 years agoTeach InlineFunction how to differentiate between multiple-value
Dan Gohman [Fri, 20 Jun 2008 01:03:44 +0000 (01:03 +0000)]
Teach InlineFunction how to differentiate between multiple-value
return statements and aggregate returns so that it handles both
correctly.

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

15 years agoDisable PRE for now. It seems to be breaking llvm-gcc bootstrapping.
Evan Cheng [Fri, 20 Jun 2008 01:01:07 +0000 (01:01 +0000)]
Disable PRE for now. It seems to be breaking llvm-gcc bootstrapping.

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

15 years agoFix the index calculations for the extractvalue lowering code.
Dan Gohman [Fri, 20 Jun 2008 00:54:19 +0000 (00:54 +0000)]
Fix the index calculations for the extractvalue lowering code.

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

15 years agoSimplify the ComputeLinearIndex logic and fix a few bugs.
Dan Gohman [Fri, 20 Jun 2008 00:53:00 +0000 (00:53 +0000)]
Simplify the ComputeLinearIndex logic and fix a few bugs.

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

15 years agoIt's invalid to take the one-past-the-end address of a non-array
Dan Gohman [Fri, 20 Jun 2008 00:49:21 +0000 (00:49 +0000)]
It's invalid to take the one-past-the-end address of a non-array
object.

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

15 years agoSimplify this code. Thanks Chris!
Dan Gohman [Fri, 20 Jun 2008 00:47:44 +0000 (00:47 +0000)]
Simplify this code. Thanks Chris!

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

15 years agoISD::UNDEF should be expanded recursively / iteratively.
Evan Cheng [Thu, 19 Jun 2008 22:01:11 +0000 (22:01 +0000)]
ISD::UNDEF should be expanded recursively / iteratively.

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

15 years agoAdd a hidden -disable-pre flag for testing purposes. This should be removed
Owen Anderson [Thu, 19 Jun 2008 19:57:25 +0000 (19:57 +0000)]
Add a hidden -disable-pre flag for testing purposes.  This should be removed
once benchmarking is completed.

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

15 years agoPRE requires that critical edges be split.
Owen Anderson [Thu, 19 Jun 2008 19:54:19 +0000 (19:54 +0000)]
PRE requires that critical edges be split.

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

15 years agoRemove dead code causing a warning.
Bill Wendling [Thu, 19 Jun 2008 18:00:44 +0000 (18:00 +0000)]
Remove dead code causing a warning.

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

15 years agoUse the common API for adding instructions to basic blocks instead of
Dan Gohman [Thu, 19 Jun 2008 17:53:32 +0000 (17:53 +0000)]
Use the common API for adding instructions to basic blocks instead of
using BasicBlock::getInstList.

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

15 years agoBe sure to remove values from the value numbering table after we delete them.
Owen Anderson [Thu, 19 Jun 2008 17:53:26 +0000 (17:53 +0000)]
Be sure to remove values from the value numbering table after we delete them.
This fixes a failure on povray.

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

15 years agoUse Instruction::moveBefore instead of manipulating the instruction list
Dan Gohman [Thu, 19 Jun 2008 17:47:47 +0000 (17:47 +0000)]
Use Instruction::moveBefore instead of manipulating the instruction list
directly.

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

15 years agoAvoid using BasicBlock::getInstList directly in a few places.
Dan Gohman [Thu, 19 Jun 2008 17:37:25 +0000 (17:37 +0000)]
Avoid using BasicBlock::getInstList directly in a few places.

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

15 years agoRevert support for insertvalue and extractvalue instructions for the moment.
Owen Anderson [Thu, 19 Jun 2008 17:25:39 +0000 (17:25 +0000)]
Revert support for insertvalue and extractvalue instructions for the moment.
GVN expects that all inputs which to an instruction fall somewhere in the value
hierarchy, which isn't true for these.

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

15 years agoUse the transferSuccessors helper function.
Dan Gohman [Thu, 19 Jun 2008 17:22:29 +0000 (17:22 +0000)]
Use the transferSuccessors helper function.

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

15 years agoDelete dead code.
Dan Gohman [Thu, 19 Jun 2008 17:18:39 +0000 (17:18 +0000)]
Delete dead code.

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

15 years agoAdd an idx_iterator to the insertvalue and extractvalue instructions.
Owen Anderson [Thu, 19 Jun 2008 17:15:57 +0000 (17:15 +0000)]
Add an idx_iterator to the insertvalue and extractvalue instructions.

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

15 years agoThe inline keyword goes before the return type. This fixes a compiler warning.
Dan Gohman [Thu, 19 Jun 2008 16:16:06 +0000 (16:16 +0000)]
The inline keyword goes before the return type. This fixes a compiler warning.

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

15 years agoModify some ipconstprop tests to also test with invokes.
Matthijs Kooijman [Thu, 19 Jun 2008 09:27:44 +0000 (09:27 +0000)]
Modify some ipconstprop tests to also test with invokes.

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

15 years agoUse a CallSite to find the nth argument of a call/invoke instruction instead of
Matthijs Kooijman [Thu, 19 Jun 2008 08:53:24 +0000 (08:53 +0000)]
Use a CallSite to find the nth argument of a call/invoke instruction instead of
using getOperand() directly. This makes things work with invoke instructions as
well.

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

15 years agoFix some warnings reported by gcc-4.3. Hopefully
Duncan Sands [Thu, 19 Jun 2008 08:47:31 +0000 (08:47 +0000)]
Fix some warnings reported by gcc-4.3.  Hopefully
this still compiles on windows - I can't test!

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

15 years agoMissed a check.
Evan Cheng [Thu, 19 Jun 2008 06:17:19 +0000 (06:17 +0000)]
Missed a check.

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

15 years agoFix a bug with <8 x i16> shuffle lowering on X86 where parts of the
Eli Friedman [Thu, 19 Jun 2008 06:09:51 +0000 (06:09 +0000)]
Fix a bug with <8 x i16> shuffle lowering on X86 where parts of the
shuffle could be skipped.  The check is invalid because the loop index i
doesn't correspond to the element actually inserted. The correct check is
already done a few lines earlier, for whether the element is already in
the right spot, so this shouldn't have any effect on the codegen for
code that was already correct.

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

15 years agoRevert my last patch, which was causing regression test failures.
Owen Anderson [Thu, 19 Jun 2008 05:29:34 +0000 (05:29 +0000)]
Revert my last patch, which was causing regression test failures.

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

15 years agoNew test case.
Evan Cheng [Thu, 19 Jun 2008 01:50:24 +0000 (01:50 +0000)]
New test case.

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

15 years agoThis also got better (55 - 51 instructions). But doing one more re-materialization.
Evan Cheng [Thu, 19 Jun 2008 01:50:13 +0000 (01:50 +0000)]
This also got better (55 - 51 instructions). But doing one more re-materialization.

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

15 years agoThis got better.
Evan Cheng [Thu, 19 Jun 2008 01:46:43 +0000 (01:46 +0000)]
This got better.

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

15 years agoCoalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.
Evan Cheng [Thu, 19 Jun 2008 01:39:21 +0000 (01:39 +0000)]
Coalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.

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

15 years agoCosmetic changes.
Evan Cheng [Thu, 19 Jun 2008 01:21:26 +0000 (01:21 +0000)]
Cosmetic changes.

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

15 years agoUnneeded include's.
Evan Cheng [Thu, 19 Jun 2008 01:21:02 +0000 (01:21 +0000)]
Unneeded include's.

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

15 years agoMinor spiller tweak to unfavor reload into load/store instructions.
Evan Cheng [Thu, 19 Jun 2008 01:16:17 +0000 (01:16 +0000)]
Minor spiller tweak to unfavor reload into load/store instructions.

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

15 years agoInsert empty slots into the instruction numbering in live intervals, so that we can...
Owen Anderson [Thu, 19 Jun 2008 00:10:49 +0000 (00:10 +0000)]
Insert empty slots into the instruction numbering in live intervals, so that we can more easily
add new instructions.

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

15 years agoRemove this test until the corresponding patch is reapplied because it's causing...
Owen Anderson [Wed, 18 Jun 2008 22:37:31 +0000 (22:37 +0000)]
Remove this test until the corresponding patch is reapplied because it's causing make check to crash for some people.

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

15 years agoAdd support for extractvalue and insertvalue instructions in GVN.
Owen Anderson [Wed, 18 Jun 2008 21:59:00 +0000 (21:59 +0000)]
Add support for extractvalue and insertvalue instructions in GVN.

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

15 years agoAdd local PRE to GVN. This only operates in cases where it would not increase code...
Owen Anderson [Wed, 18 Jun 2008 21:41:49 +0000 (21:41 +0000)]
Add local PRE to GVN.  This only operates in cases where it would not increase code size, namely when the instantiated expression
would only need to be created in one predecessor.

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

15 years agoRefactor the way to get a string containing the features of the target.
Bill Wendling [Wed, 18 Jun 2008 21:39:02 +0000 (21:39 +0000)]
Refactor the way to get a string containing the features of the target.

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

15 years agoFix the source line debug information for the Windows platform.
Argyrios Kyrtzidis [Wed, 18 Jun 2008 19:27:37 +0000 (19:27 +0000)]
Fix the source line debug information for the Windows platform.

According to DWARF-2 specification, the line information is provided through an offset in the .debug_line section.
Replace the label reference that is used with a section offset.

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

15 years agoFix a missing comma spotted by Bram Geron.
Dan Gohman [Wed, 18 Jun 2008 18:42:13 +0000 (18:42 +0000)]
Fix a missing comma spotted by Bram Geron.

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

15 years agoFix the regressions on sext-misc.ll my patch yesterday caused.
Chris Lattner [Wed, 18 Jun 2008 18:11:55 +0000 (18:11 +0000)]
Fix the regressions on sext-misc.ll my patch yesterday caused.

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

15 years agoRevert r52459, which was causing an infinite loop or massive slowdown on MultiSource...
Owen Anderson [Wed, 18 Jun 2008 17:32:16 +0000 (17:32 +0000)]
Revert r52459, which was causing an infinite loop or massive slowdown on MultiSource/Applications/SPASS, and possibly others as well.
Please reapply once this is fixed.

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