oota-llvm.git
15 years agoPropagate debug info. This file complete
Dale Johannesen [Sat, 31 Jan 2009 00:20:43 +0000 (00:20 +0000)]
Propagate debug info.  This file complete
(modulo bugs)

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

15 years agoPropagate debug info through MakeLibCall and a
Dale Johannesen [Sat, 31 Jan 2009 00:11:23 +0000 (00:11 +0000)]
Propagate debug info through MakeLibCall and a
couple of things that use it.

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

15 years agoMore DebugLoc propagation.
Bill Wendling [Fri, 30 Jan 2009 23:59:18 +0000 (23:59 +0000)]
More DebugLoc propagation.

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

15 years agoMore DebugLoc propagation.
Bill Wendling [Fri, 30 Jan 2009 23:36:47 +0000 (23:36 +0000)]
More DebugLoc propagation.

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

15 years agoMore DebugLoc propagation in LOAD etc. methods.
Bill Wendling [Fri, 30 Jan 2009 23:27:35 +0000 (23:27 +0000)]
More DebugLoc propagation in LOAD etc. methods.

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

15 years agoFix build on case-sensitive filesystems (i.e. everybody else)
Dale Johannesen [Fri, 30 Jan 2009 23:20:42 +0000 (23:20 +0000)]
Fix build on case-sensitive filesystems (i.e. everybody else)

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

15 years agoMore DebugLoc propagation in floating-point methods.
Bill Wendling [Fri, 30 Jan 2009 23:15:49 +0000 (23:15 +0000)]
More DebugLoc propagation in floating-point methods.

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

15 years agoMake LowerCallTo and LowerArguments take a DebugLoc
Dale Johannesen [Fri, 30 Jan 2009 23:10:59 +0000 (23:10 +0000)]
Make LowerCallTo and LowerArguments take a DebugLoc
argument.  Adjust all callers and overloaded versions.

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

15 years agoStandardize comments about folding xforms.
Bill Wendling [Fri, 30 Jan 2009 23:10:18 +0000 (23:10 +0000)]
Standardize comments about folding xforms.

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

15 years agoGet rid of the non-DebugLoc-ified getNOT() method.
Bill Wendling [Fri, 30 Jan 2009 23:03:19 +0000 (23:03 +0000)]
Get rid of the non-DebugLoc-ified getNOT() method.

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

15 years agoPropagate debug loc info for some FP arithmetic methods.
Bill Wendling [Fri, 30 Jan 2009 22:57:07 +0000 (22:57 +0000)]
Propagate debug loc info for some FP arithmetic methods.

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

15 years agoPropagate debug loc info for some FP arithmetic methods.
Bill Wendling [Fri, 30 Jan 2009 22:53:48 +0000 (22:53 +0000)]
Propagate debug loc info for some FP arithmetic methods.

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

15 years agoPropagate debug loc info for BIT_CONVERT.
Bill Wendling [Fri, 30 Jan 2009 22:44:24 +0000 (22:44 +0000)]
Propagate debug loc info for BIT_CONVERT.

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

15 years agoPropagate debug loc info for more *_EXTEND methods.
Bill Wendling [Fri, 30 Jan 2009 22:33:24 +0000 (22:33 +0000)]
Propagate debug loc info for more *_EXTEND methods.

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

15 years agoPropagate debug loc info for ANY_EXTEND.
Bill Wendling [Fri, 30 Jan 2009 22:27:33 +0000 (22:27 +0000)]
Propagate debug loc info for ANY_EXTEND.

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

15 years agoPropagate debug loc info for some of the *_EXTEND functions.
Bill Wendling [Fri, 30 Jan 2009 22:23:15 +0000 (22:23 +0000)]
Propagate debug loc info for some of the *_EXTEND functions.

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

15 years agoDebugLoc form of getNOT().
Bill Wendling [Fri, 30 Jan 2009 22:11:22 +0000 (22:11 +0000)]
DebugLoc form of getNOT().

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

15 years ago- Propagate debug loc info for SELECT.
Bill Wendling [Fri, 30 Jan 2009 22:02:18 +0000 (22:02 +0000)]
- Propagate debug loc info for SELECT.
- Added xform for (select X, 1, Y) and (select X, Y, 0), which was commented on,
  but missing.

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

15 years agoPropagate debug loc info for Shifts.
Bill Wendling [Fri, 30 Jan 2009 21:37:17 +0000 (21:37 +0000)]
Propagate debug loc info for Shifts.

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

15 years agoPropagate debug loc info for XOR and MatchRotate.
Bill Wendling [Fri, 30 Jan 2009 21:14:50 +0000 (21:14 +0000)]
Propagate debug loc info for XOR and MatchRotate.

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

15 years agoPropagate debug loc info for OR. Also clean up some comments.
Bill Wendling [Fri, 30 Jan 2009 20:59:34 +0000 (20:59 +0000)]
Propagate debug loc info for OR. Also clean up some comments.

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

15 years agoPerform obvious constant arithmetic folding.
Bill Wendling [Fri, 30 Jan 2009 20:50:00 +0000 (20:50 +0000)]
Perform obvious constant arithmetic folding.

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

15 years agoPropagate debug loc info for AND. Also clean up some comments.
Bill Wendling [Fri, 30 Jan 2009 20:43:18 +0000 (20:43 +0000)]
Propagate debug loc info for AND. Also clean up some comments.

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

15 years agoPropagate debug loc info in SimplifyBinOpWithSameOpcodeHands.
Bill Wendling [Fri, 30 Jan 2009 19:25:47 +0000 (19:25 +0000)]
Propagate debug loc info in SimplifyBinOpWithSameOpcodeHands.

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

15 years agouse precise getters
Gabor Greif [Fri, 30 Jan 2009 18:27:21 +0000 (18:27 +0000)]
use precise getters

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

15 years agouse precise getters
Gabor Greif [Fri, 30 Jan 2009 18:21:13 +0000 (18:21 +0000)]
use precise getters

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

15 years ago Each input file is encoded as a separate compile unit in LLVM debugging
Devang Patel [Fri, 30 Jan 2009 18:20:31 +0000 (18:20 +0000)]
 Each input file is encoded as a separate compile unit in LLVM debugging
information output. However, many target specific tool chains prefer to encode
only one compile unit in an object file. In this situation, the LLVM code
generator will include  debugging information entities in the compile unit
that is marked as main compile unit. The code generator accepts maximum one main
compile unit per module. If a module does not contain any main compile unit
then the code generator will emit multiple compile units in the output object
file.

[Part 1]

Update DebugInfo APIs to accept optional boolean value while creating DICompileUnit  to mark the unit as "main" unit. By defaults all units are considered  non-main.  Update SourceLevelDebugging.html to document "main" compile unit.

Update DebugInfo APIs to not accept and encode separate source file/directory entries while creating various llvm.dbg.* entities. There was a recent, yet to be documented, change to include this additional information so no documentation changes are required here.

Update DwarfDebug to handle "main" compile unit. If "main" compile unit is seen then all DIEs are inserted into "main" compile unit. All other compile units are used to find source location for llvm.dbg.* values. If there is not any "main" compile unit then create unique compile unit DIEs for each llvm.dbg.compile_unit.

[Part 2]

Create separate llvm.dbg.compile_unit for each input file. Mark compile unit create for main_input_filename as "main" compile unit. Use appropriate compile unit, based on source location information collected from the tree node, while creating llvm.dbg.* values using DebugInfo APIs.

---

This is Part 1.

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

15 years agoAs Duncan suggested, add braces for the one-line "else branch".
Zhou Sheng [Fri, 30 Jan 2009 09:44:49 +0000 (09:44 +0000)]
As Duncan suggested, add braces for the one-line "else branch".
Thanks, Duncan.

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

15 years agoThis is to fix the bug in IntrinsicLowering.cpp,
Zhou Sheng [Fri, 30 Jan 2009 09:02:50 +0000 (09:02 +0000)]
This is to fix the bug in IntrinsicLowering.cpp,
the LowerPartSet(). It didn't handle the situation correctly when
the low, high argument values are in reverse order (low > high)
with 'Val' type i32 (a corner case).

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

15 years agoFixed the comment. No functionality change.
Sanjiv Gupta [Fri, 30 Jan 2009 09:01:44 +0000 (09:01 +0000)]
Fixed the comment. No functionality change.

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

15 years agoThis is case is to uncover the bug in IntrinsicLowering.cpp,
Zhou Sheng [Fri, 30 Jan 2009 08:59:51 +0000 (08:59 +0000)]
This is case is to uncover the bug in IntrinsicLowering.cpp,
the LowerPartSet(). It didn't handle the situation correctly when
the low, high argument values are in reverse order (low > high)
with 'Val' type is i32 (a corner case).

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

15 years agoAdd opposite_of and inverse_opt to support -fno- style options. This
Mike Stump [Fri, 30 Jan 2009 08:19:46 +0000 (08:19 +0000)]
Add opposite_of and inverse_opt to support -fno- style options.  This
is necessary for eventual gcc commmand line compatibility.

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

15 years agoUse sublw for comparison with literals instead of subwf.
Sanjiv Gupta [Fri, 30 Jan 2009 07:55:25 +0000 (07:55 +0000)]
Use sublw for comparison with literals instead of subwf.

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

15 years agoWhen PerformBuildVectorCombine, avoid creating a X86ISD::VZEXT_LOAD of
Mon P Wang [Fri, 30 Jan 2009 07:07:40 +0000 (07:07 +0000)]
When PerformBuildVectorCombine, avoid creating a X86ISD::VZEXT_LOAD of
an illegal type.

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

15 years agoEnable emitting of constant values in non-default address space as well. The APIs...
Sanjiv Gupta [Fri, 30 Jan 2009 04:25:10 +0000 (04:25 +0000)]
Enable emitting of constant values in non-default address space as well. The APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces.

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

15 years agoPropagate debug loc info in SimplifyNodeWithTwoResults.
Bill Wendling [Fri, 30 Jan 2009 03:08:40 +0000 (03:08 +0000)]
Propagate debug loc info in SimplifyNodeWithTwoResults.

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

15 years agoPropagate debug loc info for MULHS.
Bill Wendling [Fri, 30 Jan 2009 03:00:18 +0000 (03:00 +0000)]
Propagate debug loc info for MULHS.

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

15 years agoPropagate debug loc info for SREM and UREM.
Bill Wendling [Fri, 30 Jan 2009 02:57:00 +0000 (02:57 +0000)]
Propagate debug loc info for SREM and UREM.

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

15 years agoPropagate debug loc info for UDIV.
Bill Wendling [Fri, 30 Jan 2009 02:55:25 +0000 (02:55 +0000)]
Propagate debug loc info for UDIV.

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

15 years agoPropagate debug loc info for SDIV.
Bill Wendling [Fri, 30 Jan 2009 02:52:17 +0000 (02:52 +0000)]
Propagate debug loc info for SDIV.

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

15 years agoForgot to propagate debug loc info here.
Bill Wendling [Fri, 30 Jan 2009 02:49:26 +0000 (02:49 +0000)]
Forgot to propagate debug loc info here.

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

15 years agoFix a post-RA scheduling dependency bug.
Dan Gohman [Fri, 30 Jan 2009 02:49:14 +0000 (02:49 +0000)]
Fix a post-RA scheduling dependency bug.

If a MachineInstr doesn't have a memoperand but has an opcode that
is known to load or store, assume its memory reference may alias
*anything*, including stack slots which the compiler completely
controls.

To partially compensate for this, teach the ScheduleDAG building
code to do basic getUnderlyingValue analysis. This greatly
reduces the number of instructions that require restrictive
dependencies. This code will need to be revisited when we start
doing real alias analysis, but it should suffice for now.

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

15 years agoPropagate debug loc info for MUL.
Bill Wendling [Fri, 30 Jan 2009 02:45:56 +0000 (02:45 +0000)]
Propagate debug loc info for MUL.

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

15 years agoPropagate debug loc info in SUB.
Bill Wendling [Fri, 30 Jan 2009 02:42:10 +0000 (02:42 +0000)]
Propagate debug loc info in SUB.

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

15 years agoPropagate debug loc info in ADDC and ADDE.
Bill Wendling [Fri, 30 Jan 2009 02:38:00 +0000 (02:38 +0000)]
Propagate debug loc info in ADDC and ADDE.

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

15 years agoPropagate debug loc info in DAG combine's "ADD".
Bill Wendling [Fri, 30 Jan 2009 02:31:17 +0000 (02:31 +0000)]
Propagate debug loc info in DAG combine's "ADD".

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

15 years ago- Propagate debug loc info in combineSelectAndUse().
Bill Wendling [Fri, 30 Jan 2009 02:23:43 +0000 (02:23 +0000)]
- Propagate debug loc info in combineSelectAndUse().
- Modify ReassociateOps so that the resulting SDValue is what the comment claims
  it is.

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

15 years agoAdd some comments.
Mikhail Glushenkov [Fri, 30 Jan 2009 02:12:57 +0000 (02:12 +0000)]
Add some comments.

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

15 years agoFix a bug in getMaxValue/getMinValue to pass the right signedness the
Chris Lattner [Fri, 30 Jan 2009 01:58:19 +0000 (01:58 +0000)]
Fix a bug in getMaxValue/getMinValue to pass the right signedness the
the constructed APSInt, patch suggested by Ben Laurie!

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

15 years agoEnable target tripple.
Devang Patel [Fri, 30 Jan 2009 01:40:58 +0000 (01:40 +0000)]
Enable target tripple.

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

15 years agoLinux and other target's encoding for DW_AT_declaration may not match.
Devang Patel [Fri, 30 Jan 2009 01:37:30 +0000 (01:37 +0000)]
Linux and other target's  encoding for DW_AT_declaration may not match.

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

15 years agoPropagate debug info when building SelectionDAG.
Dale Johannesen [Fri, 30 Jan 2009 01:34:22 +0000 (01:34 +0000)]
Propagate debug info when building SelectionDAG.

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

15 years agoRemove dead code, again.
Devang Patel [Fri, 30 Jan 2009 01:27:49 +0000 (01:27 +0000)]
Remove dead code, again.

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

15 years agoRemove dead code.
Devang Patel [Fri, 30 Jan 2009 01:25:47 +0000 (01:25 +0000)]
Remove dead code.

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

15 years agoAdd DW_AT_declaration for class methods.
Devang Patel [Fri, 30 Jan 2009 01:21:46 +0000 (01:21 +0000)]
Add DW_AT_declaration for class methods.

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

15 years agoPropagate debug location info for the token factor.
Bill Wendling [Fri, 30 Jan 2009 01:13:16 +0000 (01:13 +0000)]
Propagate debug location info for the token factor.

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

15 years agoAdd dump() routines to help debug debug info :)
Devang Patel [Fri, 30 Jan 2009 01:03:10 +0000 (01:03 +0000)]
Add dump() routines to help debug debug info :)

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

15 years agoAdd DebugLoc propagation to some of the methods in DAG combiner.
Bill Wendling [Fri, 30 Jan 2009 00:45:56 +0000 (00:45 +0000)]
Add DebugLoc propagation to some of the methods in DAG combiner.

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

15 years agoExplain why this is here.
Bill Wendling [Thu, 29 Jan 2009 23:19:43 +0000 (23:19 +0000)]
Explain why this is here.

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

15 years agoXFAIL this test. It only worked before because of a bug in the spill point selection...
Owen Anderson [Thu, 29 Jan 2009 22:27:56 +0000 (22:27 +0000)]
XFAIL this test.  It only worked before because of a bug in the spill point selection code.  Not deleting because
it should be possible to enhance the selection code to handle this in the future.

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

15 years agoCorrect the algorithms for choosing spill and restore points so that we don't try...
Owen Anderson [Thu, 29 Jan 2009 22:13:06 +0000 (22:13 +0000)]
Correct the algorithms for choosing spill and restore points so that we don't try to insert loads/stores between call frame setup and the actual call.

This fixes the last known failure for the pre-alloc-splitter.

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

15 years agoExplicitly add PseudoSourceValue information when lowering
Dan Gohman [Thu, 29 Jan 2009 21:02:43 +0000 (21:02 +0000)]
Explicitly add PseudoSourceValue information when lowering
BUILD_VECTOR and conversions to stack operations.

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

15 years agoMake a few things const, fix some comments, and simplify
Dan Gohman [Thu, 29 Jan 2009 19:49:27 +0000 (19:49 +0000)]
Make a few things const, fix some comments, and simplify
some assertions.

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

15 years agoFix windows build, patch by Marius Wachtler!
Chris Lattner [Thu, 29 Jan 2009 18:53:28 +0000 (18:53 +0000)]
Fix windows build, patch by Marius Wachtler!

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

15 years agoLocal register allocator shouldn't assume only the entry and landing pad basic blocks...
Evan Cheng [Thu, 29 Jan 2009 18:37:30 +0000 (18:37 +0000)]
Local register allocator shouldn't assume only the entry and landing pad basic blocks have live-ins.

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

15 years agoFix two typos that Duncan spotted in a comment.
Dan Gohman [Thu, 29 Jan 2009 16:18:12 +0000 (16:18 +0000)]
Fix two typos that Duncan spotted in a comment.

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

15 years agoIn the case of an extractelement on an insertelement value,
Dan Gohman [Thu, 29 Jan 2009 16:10:46 +0000 (16:10 +0000)]
In the case of an extractelement on an insertelement value,
the element indices may be equal if either one is not a
constant.

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

15 years agoAdd a always_inline test case.
Evan Cheng [Thu, 29 Jan 2009 09:31:54 +0000 (09:31 +0000)]
Add a always_inline test case.

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

15 years agoRevert r63273. This was already implemented by Dale. There's no need for my
Bill Wendling [Thu, 29 Jan 2009 09:01:55 +0000 (09:01 +0000)]
Revert r63273. This was already implemented by Dale. There's no need for my
change.

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

15 years agoAdd a test case for Chris lvalue alignment fixes.
Evan Cheng [Thu, 29 Jan 2009 08:59:46 +0000 (08:59 +0000)]
Add a test case for Chris lvalue alignment fixes.

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

15 years agoFix an issue where restores could be inserted after a terminator instruction,
Owen Anderson [Thu, 29 Jan 2009 08:22:06 +0000 (08:22 +0000)]
Fix an issue where restores could be inserted after a terminator instruction,
and an iterator invalidation issue.

FreeBench/pifft no longer miscompiles with these fixes!

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

15 years agoComments are good. :-)
Owen Anderson [Thu, 29 Jan 2009 05:41:02 +0000 (05:41 +0000)]
Comments are good. :-)

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

15 years agoAdd support for aggressive load-use-store folding. This takes care of the
Owen Anderson [Thu, 29 Jan 2009 05:28:55 +0000 (05:28 +0000)]
Add support for aggressive load-use-store folding.  This takes care of the
vast majority of code size regressions introduced by pre-alloc-splitting.

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

15 years ago- Add DebugLoc to getTargetNode().
Bill Wendling [Thu, 29 Jan 2009 05:27:31 +0000 (05:27 +0000)]
- Add DebugLoc to getTargetNode().
- Modify TableGen to add the DebugLoc when calling getTargetNode.

(The light-weight wrappers are only temporary. The non-DebugLoc version will be
removed once the whole debug info stuff is finished with.)

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

15 years agoFix PR3424, a static constructor ordering issue. Patch by Robert Schuster!
Chris Lattner [Thu, 29 Jan 2009 04:43:42 +0000 (04:43 +0000)]
Fix PR3424, a static constructor ordering issue.  Patch by Robert Schuster!

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

15 years agoExit with nice warnings when register allocator run out of registers.
Evan Cheng [Thu, 29 Jan 2009 02:20:59 +0000 (02:20 +0000)]
Exit with nice warnings when register allocator run out of registers.

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

15 years agoMake x86's BT instruction matching more thorough, and add some
Dan Gohman [Thu, 29 Jan 2009 01:59:02 +0000 (01:59 +0000)]
Make x86's BT instruction matching more thorough, and add some
dagcombines that help it match in several more cases. Add
several more cases to test/CodeGen/X86/bt.ll. This doesn't
yet include matching for BT with an immediate operand, it
just covers more register+register cases.

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

15 years agoMove the code that starts printing the Select_* functions
Dan Gohman [Thu, 29 Jan 2009 01:37:18 +0000 (01:37 +0000)]
Move the code that starts printing the Select_* functions
after the code that sorts the patterns. This doesn't
affect the output, but it makes the code a little easier
to follow.

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

15 years agoA slight compile time optimization. If the caller knows there isn't a free register...
Evan Cheng [Thu, 29 Jan 2009 01:13:00 +0000 (01:13 +0000)]
A slight compile time optimization. If the caller knows there isn't a free register getReg() should not call getFreeReg().

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

15 years agoAdd DebugLoc-sensitive versions of many node creation
Dale Johannesen [Thu, 29 Jan 2009 00:47:48 +0000 (00:47 +0000)]
Add DebugLoc-sensitive versions of many node creation
functions.  Currently omitted:  memcpy, memmove, memset.

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

15 years agoFix comment about removeRange.
Evan Cheng [Thu, 29 Jan 2009 00:06:09 +0000 (00:06 +0000)]
Fix comment about removeRange.

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

15 years agoFixed lowering of v816 shuffles.
Mon P Wang [Wed, 28 Jan 2009 23:11:14 +0000 (23:11 +0000)]
Fixed lowering of v816 shuffles.

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

15 years agoMake test platform agnostic.
Bill Wendling [Wed, 28 Jan 2009 22:20:56 +0000 (22:20 +0000)]
Make test platform agnostic.

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

15 years agoAdd DebugLoc to the getNode() methods.
Bill Wendling [Wed, 28 Jan 2009 22:17:52 +0000 (22:17 +0000)]
Add DebugLoc to the getNode() methods.

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

15 years agoGive this test an explicit target, to make it host-independent.
Dan Gohman [Wed, 28 Jan 2009 22:14:58 +0000 (22:14 +0000)]
Give this test an explicit target, to make it host-independent.

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

15 years agoSDOperand has been renamed to SDValue. SDNode::Val is now
Dan Gohman [Wed, 28 Jan 2009 21:36:46 +0000 (21:36 +0000)]
SDOperand has been renamed to SDValue. SDNode::Val is now
accessed via SDNode::getNode.

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

15 years agoAdd more comments describing SDNode operator codes.
Dan Gohman [Wed, 28 Jan 2009 21:34:36 +0000 (21:34 +0000)]
Add more comments describing SDNode operator codes.

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

15 years agoAdd DebugLoc-aware constructors for SDNode derived
Dale Johannesen [Wed, 28 Jan 2009 21:18:29 +0000 (21:18 +0000)]
Add DebugLoc-aware constructors for SDNode derived
classes (those that reasonably have a DebugLoc
associated with them).

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

15 years agoAdd some comments on ISD::NodeType.
Dan Gohman [Wed, 28 Jan 2009 21:13:08 +0000 (21:13 +0000)]
Add some comments on ISD::NodeType.

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

15 years agoDo not forget to derived type while constructing an array type.
Devang Patel [Wed, 28 Jan 2009 21:08:20 +0000 (21:08 +0000)]
Do not forget to derived type while constructing an array type.

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

15 years agoFix some issues with volatility, move "CanConvertToScalar" check
Chris Lattner [Wed, 28 Jan 2009 20:16:43 +0000 (20:16 +0000)]
Fix some issues with volatility, move "CanConvertToScalar" check
after the others.

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

15 years agostrengthen this test.
Chris Lattner [Wed, 28 Jan 2009 19:29:30 +0000 (19:29 +0000)]
strengthen this test.

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

15 years agoFixed extract element when the result needs to be promoted and the input widened.
Mon P Wang [Wed, 28 Jan 2009 18:53:39 +0000 (18:53 +0000)]
Fixed extract element when the result needs to be promoted and the input widened.

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

15 years agoDelete unnecessary elses.
Dan Gohman [Wed, 28 Jan 2009 18:03:09 +0000 (18:03 +0000)]
Delete unnecessary elses.

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

15 years agoEnable PACKAGE_VERSION in cmake builds, this unbreaks the clang build with cmake.
Chris Lattner [Wed, 28 Jan 2009 17:49:03 +0000 (17:49 +0000)]
Enable PACKAGE_VERSION in cmake builds, this unbreaks the clang build with cmake.
Patch by Piotr Rak!

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

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