Bill Wendling
65c0fd4c44
Revert this. It was breaking stuff.
...
llvm-svn: 64428
2009-02-13 02:16:35 +00:00
Bill Wendling
1c21ac3066
Turn off the old way of handling debug information in the code generator. Use
...
the new way, where all of the information is passed on SDNodes and machine
instructions.
llvm-svn: 64427
2009-02-13 02:01:04 +00:00
Evan Cheng
fe174df170
Simplify code.
...
llvm-svn: 64164
2009-02-09 21:01:06 +00:00
Evan Cheng
020588cee3
Make sure constant subscript is truncated to ptr size if it may not fit.
...
llvm-svn: 64163
2009-02-09 20:54:38 +00:00
Dale Johannesen
84935759d5
Remove more non-DebugLoc getNode variants. Use
...
getCALLSEQ_{END,START} to permit passing no DebugLoc
there. UNDEF doesn't logically have DebugLoc; add
getUNDEF to encapsulate this.
llvm-svn: 63978
2009-02-06 23:05:02 +00:00
Bill Wendling
03c34d0d3c
Clear out the CurDebugLoc info when doing a 'clear' on the SDL object.
...
llvm-svn: 63967
2009-02-06 21:36:23 +00:00
Dale Johannesen
b842d529a3
Reapply 63765. Patches for clang and llvm-gcc to follow.
...
llvm-svn: 63812
2009-02-05 01:49:45 +00:00
Dale Johannesen
7ae8c8b108
Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.
...
llvm-svn: 63800
2009-02-05 00:20:09 +00:00
Dale Johannesen
ae616c2c61
Reverting 63765. This broke the build of both clang
...
and llvm-gcc.
llvm-svn: 63786
2009-02-04 22:47:25 +00:00
Nate Begeman
6ae3aa83d0
New feature: add support for target intrinsics being defined in the
...
target directories themselves. This also means that VMCore no longer
needs to know about every target's list of intrinsics. Future work
will include converting the PowerPC target to this interface as an
example implementation.
llvm-svn: 63765
2009-02-04 19:47:21 +00:00
Dale Johannesen
f2bb6f09a3
Remove some more non-DebugLoc versions of construction
...
functions, with callers adjusted to fit.
llvm-svn: 63705
2009-02-04 01:48:28 +00:00
Dale Johannesen
85263882aa
Remove a few non-DebugLoc versions of node creation
...
functions.
llvm-svn: 63703
2009-02-04 01:17:06 +00:00
Dale Johannesen
3a09f5589d
DebugLoc propagation; adjustment to things omitted
...
from SelectionDagBuild.
llvm-svn: 63680
2009-02-03 23:04:43 +00:00
Bill Wendling
135227a060
Pass in something sensible for the debug location information when creating the
...
initial PHI nodes of the machine function.
llvm-svn: 63598
2009-02-03 02:20:52 +00:00
Bill Wendling
fa50a23f8a
Explicitly pass in the "unknown" debug location. This is probably not
...
correct. We need more infrastructure before we can get the DebugLoc info for
these instructions.
llvm-svn: 63593
2009-02-03 01:33:28 +00:00
Bill Wendling
e3c78361d3
Create DebugLoc information in FastISel. Several temporary methods were
...
created. Specifically, those BuildMIs which use
"DebugLoc::getUnknownLoc()". I'll remove them soon.
llvm-svn: 63584
2009-02-03 00:55:04 +00:00
Duncan Sands
41826036b1
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).
llvm-svn: 63482
2009-01-31 15:50:11 +00:00
Dale Johannesen
db7c5f6a7b
Move CurDebugLoc into SelectionDAGLowering.
...
llvm-svn: 63468
2009-01-31 02:22:37 +00:00
Dale Johannesen
555a375bb6
Make LowerCallTo and LowerArguments take a DebugLoc
...
argument. Adjust all callers and overloaded versions.
llvm-svn: 63444
2009-01-30 23:10:59 +00:00
Dale Johannesen
ed255b3d8e
Propagate debug info when building SelectionDAG.
...
llvm-svn: 63359
2009-01-30 01:34:22 +00:00
Dan Gohman
4aa1846215
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.
llvm-svn: 63212
2009-01-28 17:46:25 +00:00
Duncan Sands
ba21b7d57a
Formatting.
...
llvm-svn: 63199
2009-01-28 14:42:54 +00:00
Dan Gohman
0bd9546039
Delete redundant return statements.
...
llvm-svn: 63120
2009-01-27 19:23:22 +00:00
Anton Korobeynikov
4b4622454c
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 :)
llvm-svn: 63027
2009-01-26 19:26:01 +00:00
Duncan Sands
be7e41481b
Cleanup whitespace and comments, and tweak some
...
prototypes, in operand type legalization. No
functionality change.
llvm-svn: 62680
2009-01-21 09:00:29 +00:00
Sanjiv Gupta
a70798cc9a
Allow targets to legalize operations (with illegal operands) that produces multiple values. For example, a load with an illegal operand (a load produces two values, a value and chain).
...
llvm-svn: 62663
2009-01-21 04:48:39 +00:00
Bill Wendling
2395916c87
Use "SINT_TO_FP" instead of "UINT_TO_FP" when getting the exponent. This was
...
causing the limited precision stuff to produce the wrong result for values in
the range [0, 1).
llvm-svn: 62615
2009-01-20 21:17:57 +00:00
Bill Wendling
786a683441
Shift types need to match.
...
llvm-svn: 62571
2009-01-20 06:10:42 +00:00
Devang Patel
44afc82ebe
Verify debug info.
...
llvm-svn: 62545
2009-01-19 23:21:49 +00:00
Mikhail Glushenkov
6e8d814d36
Registry.h should not depend on CommandLine.h.
...
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.
llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
b2f9a73029
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Devang Patel
76d190cf4a
Validate dbg_* intrinsics before lowering them.
...
llvm-svn: 62286
2009-01-15 23:41:32 +00:00
Rafael Espindola
6de96a1b5d
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Dan Gohman
91febd1330
More consts on TargetLowering references.
...
llvm-svn: 62262
2009-01-15 16:58:17 +00:00
Gabor Greif
08a4c281cb
minor refactoring: use a more specific API
...
llvm-svn: 62256
2009-01-15 11:10:44 +00:00
Devang Patel
5c6e1e3b7d
Use DebugInfo interface to lower dbg_* intrinsics.
...
llvm-svn: 62127
2009-01-13 00:35:13 +00:00
Duncan Sands
dc020f9c3c
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Dan Gohman
c7847cdb8d
Fix a bug in ComputeLinearIndex computation handling multi-level
...
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.
llvm-svn: 61828
2009-01-06 22:53:52 +00:00
Devang Patel
56a8bb670f
squash warnings.
...
llvm-svn: 61707
2009-01-05 17:31:22 +00:00
Duncan Sands
8feb694e8f
Fix PR3274: when promoting the condition of a BRCOND node,
...
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType. In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).
llvm-svn: 61542
2009-01-01 15:52:00 +00:00
Anton Korobeynikov
f4a66e8dda
Restore debug printing
...
llvm-svn: 61398
2008-12-23 22:26:18 +00:00
Anton Korobeynikov
d305d00796
Sometimes APInt syntax is really ugly... :(
...
llvm-svn: 61397
2008-12-23 22:26:01 +00:00
Anton Korobeynikov
05149bad18
Indent stuff properly
...
llvm-svn: 61396
2008-12-23 22:25:45 +00:00
Anton Korobeynikov
6f219132a7
Initial checkin of APInt'ififcation of switch lowering
...
llvm-svn: 61395
2008-12-23 22:25:27 +00:00
Dan Gohman
12f2490489
Clean up the atomic opcodes in SelectionDAG.
...
This removes all the _8, _16, _32, and _64 opcodes and replaces each
group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode
is now used to carry the size information. In tablegen, the size-specific
opcodes are replaced by size-independent opcodes that utilize the
ability to compose them with predicates.
This shrinks the per-opcode tables and makes the code that handles
atomics much more concise.
llvm-svn: 61389
2008-12-23 21:37:04 +00:00
Evan Cheng
c35fc49477
We have decided not to support inline asm where an output operand with a matching input operand with incompatible type (i.e. either one is a floating point and the other is an integer or the sizes of the types differ). SelectionDAGBuild will catch these and exit with an error.
...
llvm-svn: 61092
2008-12-16 18:21:39 +00:00
Bill Wendling
4eb2dcdc45
Whitespace fixes.
...
llvm-svn: 60818
2008-12-10 00:28:22 +00:00
Bill Wendling
db8ec2d75a
Add sub/mul overflow intrinsics. This currently doesn't have a
...
target-independent way of determining overflow on multiplication. It's very
tricky. Patch by Zoltan Varga!
llvm-svn: 60800
2008-12-09 22:08:41 +00:00
Duncan Sands
3d960941b1
There are no longer any places that require a
...
MERGE_VALUES node with only one operand, so get
rid of special code that only existed to handle
that possibility.
llvm-svn: 60349
2008-12-01 11:41:29 +00:00
Bill Wendling
66835479d7
- Make lowering of "add with overflow" customizable by back-ends.
...
- Mark "add with overflow" as having a custom lowering for X86. Give it a null
lowering representation for now.
llvm-svn: 59971
2008-11-24 19:21:46 +00:00