Commit Graph

6620 Commits

Author SHA1 Message Date
Dale Johannesen
c6be110f91 More DebugLoc propagation. This should be everything
except LegalizeOp itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:49:46 +00:00
Owen Anderson
5b93f6fa82 MergeValueInto is too smart: it might choose to do the merge the opposite direction.
Live interval reconstruction needs to account for this, and scour its maps to
prevent dangling references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:42:01 +00:00
Dale Johannesen
8a782a2a8c DebugLoc propagation. ExpandOp and PromoteOp,
among others.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:12:50 +00:00
Dale Johannesen
54c94525f4 Commit missing files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 20:47:48 +00:00
Dale Johannesen
bb5da91854 More DebugLoc propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 20:41:04 +00:00
Duncan Sands
7fb0858718 Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 19:46:41 +00:00
Dale Johannesen
af435274e5 DebugLoc propagation for int<->fp conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 19:03:57 +00:00
Evan Cheng
19a725851d Refactor PerformPHIConstruction, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 18:33:18 +00:00
Devang Patel
d5863dd9a8 Do not add redundant arguments in a method definition DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 17:51:41 +00:00
Sanjiv Gupta
55467af316 Duncan's patch. Further to 64382. Takes care of illegal types for shift amount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 17:19:39 +00:00
Mon P Wang
c82bf9b268 Preserve more SourceValue information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 06:37:55 +00:00
Duncan Sands
b0d5cdd52e Fix PR3453 and probably a bunch of other potential
crashes or wrong code with codegen of large integers:
eliminate the legacy getIntegerVTBitMask and
getIntegerVTSignBit methods, which returned their
value as a uint64_t, so couldn't handle huge types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-01 18:06:53 +00:00
Bill Wendling
fc4b677cd5 Forgot some more DebugLoc propagations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-01 11:19:36 +00:00
Owen Anderson
4a6d13e8fb Fix test failures causes by my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-01 08:41:54 +00:00
Owen Anderson
5caedc0f09 Fix an issue in PHI construction that was exposed by GCC 4.2 producing a different set iteration order for the reg_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-01 07:06:00 +00:00
Dale Johannesen
644f6f875e DebugLoc propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63488 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 22:04:51 +00:00
Dale Johannesen
35ba3d4638 DebugLoc propagation. Done with file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 21:04:24 +00:00
Dale Johannesen
9c8ac447c4 DebugLoc propagation. Done with file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 20:01:02 +00:00
Duncan Sands
92abc62399 Fix PR3401: when using large integers, the type
returned by getShiftAmountTy may be too small
to hold shift values (it is an i8 on x86-32).
Before and during type legalization, use a large
but legal type for shift amounts: getPointerTy;
afterwards use getShiftAmountTy, fixing up any
shift amounts with a big type during operation
legalization.  Thanks to Dan for writing the
original patch (which I shamelessly pillaged).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 15:50:11 +00:00
Mon P Wang
a7b6cff99f If unsafe FP optimization is not set, don't allow -(A-B) => B-A because
when A==B, -0.0 != +0.0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 06:07:45 +00:00
Bill Wendling
9729c5ad34 Don't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63473 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 03:12:48 +00:00
Dale Johannesen
66978ee977 Move CurDebugLoc into SelectionDAGLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63468 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 02:22:37 +00:00
Dale Johannesen
91b49b910c Propagate debug info in LegalizeFloatTypes.
Complete (modulo bugs).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-31 00:43:08 +00:00
Dale Johannesen
786fd4dded 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
2009-01-31 00:20:43 +00:00
Dale Johannesen
c8fc99d66a 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
2009-01-31 00:11:23 +00:00
Bill Wendling
836ca7dc6e More DebugLoc propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63454 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 23:59:18 +00:00
Bill Wendling
c144a57e14 More DebugLoc propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 23:36:47 +00:00
Bill Wendling
c0debad716 More DebugLoc propagation in LOAD etc. methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63451 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 23:27:35 +00:00
Bill Wendling
0225a1dcb1 More DebugLoc propagation in floating-point methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 23:15:49 +00:00
Dale Johannesen
7d2ad624fa 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
2009-01-30 23:10:59 +00:00
Bill Wendling
d34470c4f7 Standardize comments about folding xforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 23:10:18 +00:00
Bill Wendling
7581bfa275 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
2009-01-30 23:03:19 +00:00
Bill Wendling
a03e74bf67 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
2009-01-30 22:57:07 +00:00
Bill Wendling
b0162f58c4 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
2009-01-30 22:53:48 +00:00
Bill Wendling
67a6768375 Propagate debug loc info for BIT_CONVERT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 22:44:24 +00:00
Bill Wendling
8509c90a20 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
2009-01-30 22:33:24 +00:00
Bill Wendling
683c95764a Propagate debug loc info for ANY_EXTEND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63436 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 22:27:33 +00:00
Bill Wendling
6ce610f04b 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
2009-01-30 22:23:15 +00:00
Bill Wendling
41b9d278ad DebugLoc form of getNOT().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 22:11:22 +00:00
Bill Wendling
34584e6aed - 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
2009-01-30 22:02:18 +00:00
Bill Wendling
8810337e36 Propagate debug loc info for Shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 21:37:17 +00:00
Bill Wendling
317bd709bd 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
2009-01-30 21:14:50 +00:00
Bill Wendling
0902564479 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
2009-01-30 20:59:34 +00:00
Bill Wendling
6af7618b23 Perform obvious constant arithmetic folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 20:50:00 +00:00
Bill Wendling
2627a881e1 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
2009-01-30 20:43:18 +00:00
Bill Wendling
b74c8675b1 Propagate debug loc info in SimplifyBinOpWithSameOpcodeHands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 19:25:47 +00:00
Devang Patel
dd9db66882 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
2009-01-30 18:20:31 +00:00
Zhou Sheng
c0425b646f 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
2009-01-30 09:44:49 +00:00
Zhou Sheng
904ebf9bf4 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
2009-01-30 09:02:50 +00:00
Sanjiv Gupta
c8d7bc850d 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
2009-01-30 04:25:10 +00:00
Bill Wendling
826d11463b Propagate debug loc info in SimplifyNodeWithTwoResults.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63376 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 03:08:40 +00:00
Bill Wendling
326411dc69 Propagate debug loc info for MULHS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 03:00:18 +00:00
Bill Wendling
6d3bf8c4c3 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
2009-01-30 02:57:00 +00:00
Bill Wendling
07d8514049 Propagate debug loc info for UDIV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:55:25 +00:00
Bill Wendling
944d34bfe8 Propagate debug loc info for SDIV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:52:17 +00:00
Bill Wendling
73e16b2869 Forgot to propagate debug loc info here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63371 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:49:26 +00:00
Dan Gohman
3311a1f8f0 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
2009-01-30 02:49:14 +00:00
Bill Wendling
9c8148ac93 Propagate debug loc info for MUL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:45:56 +00:00
Bill Wendling
b0702e0b7e Propagate debug loc info in SUB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 02:42:10 +00:00
Bill Wendling
14036c00c0 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
2009-01-30 02:38:00 +00:00
Bill Wendling
f4eb2269eb 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
2009-01-30 02:31:17 +00:00
Bill Wendling
d69c3141ed - 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
2009-01-30 02:23:43 +00:00
Dale Johannesen
fa42dea48b Propagate debug info when building SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 01:34:22 +00:00
Devang Patel
6360089d63 Remove dead code, again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 01:27:49 +00:00
Devang Patel
425b64ecef Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 01:25:47 +00:00
Devang Patel
d234e59e57 Add DW_AT_declaration for class methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-30 01:21:46 +00:00
Bill Wendling
5c71acfb06 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
2009-01-30 01:13:16 +00:00
Bill Wendling
35247c3513 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
2009-01-30 00:45:56 +00:00
Owen Anderson
3ef4549d9d 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
2009-01-29 22:13:06 +00:00
Dan Gohman
15b3830bcd 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
2009-01-29 21:02:43 +00:00
Dan Gohman
1cc6b8ee78 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
2009-01-29 19:49:27 +00:00
Evan Cheng
d5a4802708 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
2009-01-29 18:37:30 +00:00
Dan Gohman
2c65c3dfe6 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
2009-01-29 16:18:12 +00:00
Dan Gohman
197e88f796 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
2009-01-29 16:10:46 +00:00
Bill Wendling
56ab1a2815 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
2009-01-29 09:01:55 +00:00
Owen Anderson
c0f3a0353c 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
2009-01-29 08:22:06 +00:00
Owen Anderson
4bfc209721 Comments are good. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 05:41:02 +00:00
Owen Anderson
45e6855ea2 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
2009-01-29 05:28:55 +00:00
Bill Wendling
6e1bb38fb8 - 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
2009-01-29 05:27:31 +00:00
Evan Cheng
5a3c6a87b0 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
2009-01-29 02:20:59 +00:00
Dan Gohman
e5af2d3a22 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
2009-01-29 01:59:02 +00:00
Evan Cheng
7ddee0ad24 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
2009-01-29 01:13:00 +00:00
Dale Johannesen
e8c17335c5 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
2009-01-29 00:47:48 +00:00
Evan Cheng
42cc6e33ec Fix comment about removeRange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-29 00:06:09 +00:00
Bill Wendling
7ade28cd62 Add DebugLoc to the getNode() methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 22:17:52 +00:00
Dale Johannesen
3edb43e620 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
2009-01-28 21:18:29 +00:00
Devang Patel
f923574856 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
2009-01-28 21:08:20 +00:00
Mon P Wang
f7eef6811c 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
2009-01-28 18:53:39 +00:00
Dan Gohman
f560ffae1f 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
2009-01-28 17:46:25 +00:00
Duncan Sands
0b3aa26384 Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 14:42:54 +00:00
Duncan Sands
1465d61bdd Rename getAnalysisToUpdate to getAnalysisIfAvailable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 13:14:17 +00:00
Dan Gohman
f83c81acbe Use ValueType::bitsLT to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 03:10:52 +00:00
Dan Gohman
77f7a5771e 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
2009-01-28 02:58:31 +00:00
Devang Patel
7009d24e81 Add type DIE into appropriate context DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 23:22:55 +00:00
Dale Johannesen
06efc02854 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
2009-01-27 23:20:29 +00:00
Evan Cheng
aaeea9e64f Refine DebugLoc per review comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 21:15:07 +00:00
Dan Gohman
ce9bc12c6f 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
2009-01-27 20:39:34 +00:00
Dan Gohman
daac99cdfb Delete redundant return statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27 19:23:22 +00:00
Owen Anderson
26562de2ef 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
2009-01-27 05:01:15 +00:00
Devang Patel
ad165bec1d 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
2009-01-27 00:45:04 +00:00