Chris Lattner
1b6c061cd0
remove uses of deprecated functions, this generates slightly
...
different BlockAddress labels, but nothing semantically important.
Add a FIXME that BlockAddress codegen is broken if the LLVM BB has
an empty name (e.g. strip was run).
llvm-svn: 93303
2010-01-13 07:30:49 +00:00
Chris Lattner
086d0d1a2b
use the new form of getNameWithPrefix, not makeNameProper.
...
Among other things, this would do very weird things if the
basic block name had (e.g.) a space in it on darwin:
makeNameProper would add quotes, then the mcsymbol would
escape the quotes.
llvm-svn: 93302
2010-01-13 07:16:53 +00:00
Chris Lattner
3c2fad1fc6
change Mangler::makeNameProper to return its result in a SmallVector
...
instead of returning it in an std::string. Based on this change:
1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
prefixes, not use temporary std::strings, and to avoid other crimes.
llvm-svn: 93298
2010-01-13 06:38:18 +00:00
Chris Lattner
e8e56916d1
fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
...
llvm-svn: 93293
2010-01-13 04:39:46 +00:00
Chris Lattner
633c7a95c5
reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.
...
llvm-svn: 93292
2010-01-13 04:38:16 +00:00
Chris Lattner
4e95cbcd12
reduce indentation and add a fast-path to EmitGlobalConstant for 8-byte
...
integers on 64-bit systems.
llvm-svn: 93291
2010-01-13 04:34:19 +00:00
Chris Lattner
452f5ad8f2
reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly
...
llvm-svn: 93290
2010-01-13 04:29:19 +00:00
Evan Cheng
973fceab0c
Disable opt-ext pass to unbreak the build for now.
...
llvm-svn: 93286
2010-01-13 01:51:43 +00:00
Evan Cheng
7fcebf982c
Remove debug option I accidentally left in.
...
llvm-svn: 93285
2010-01-13 01:43:20 +00:00
Ted Kremenek
2d9c86e98b
Update CMake file.
...
llvm-svn: 93283
2010-01-13 01:02:47 +00:00
Evan Cheng
76db3bb18e
Add a quick pass to optimize sign / zero extension instructions. For targets where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg.
...
For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used.
llvm-svn: 93278
2010-01-13 00:30:23 +00:00
Dale Johannesen
1738d7d11a
Further progration of metadata operands. The
...
dumper doesn't really do what I want yet, but
at least it doesn't crash now.
llvm-svn: 93272
2010-01-13 00:00:24 +00:00
Bob Wilson
0ec53edad3
Fix a comment typo.
...
llvm-svn: 93261
2010-01-12 22:18:56 +00:00
Dan Gohman
2cd1b789c7
Update a partially obsolete comment.
...
llvm-svn: 93228
2010-01-12 04:32:35 +00:00
Dan Gohman
da0bcb49b5
Fix a typo in a comment.
...
llvm-svn: 93227
2010-01-12 04:30:26 +00:00
Jakob Stoklund Olesen
f1c71ef6ba
Avoid adding PHI arguments for a predecessor that has gone away when a BRCOND was constant folded.
...
This fixes PR5980.
llvm-svn: 93184
2010-01-11 21:02:33 +00:00
Mon P Wang
e8470bbcc4
Disable transformation of select of two loads to a select of address and then a load if the
...
loads are not in the default address space because the transformation discards src value info.
llvm-svn: 93180
2010-01-11 20:12:49 +00:00
Devang Patel
9874d72976
s/NextValueNo/NextMDValueNo while processing metadata.
...
llvm-svn: 93165
2010-01-11 18:52:33 +00:00
Dan Gohman
3708af1c59
Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
...
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.
Also, fix some more issues with legalization of vector casts.
llvm-svn: 93043
2010-01-09 02:13:55 +00:00
Evan Cheng
afa00d14db
Dan pointed out checking whether a node is dead by comparing its opcode to ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead.
...
llvm-svn: 93031
2010-01-09 00:21:08 +00:00
Evan Cheng
f96a9ec02b
ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
...
llvm-svn: 92988
2010-01-08 02:36:12 +00:00
Chris Lattner
e0199dff81
Fix rdar://7517201, a regression introduced by r92849.
...
When folding a and(any_ext(load)) both the any_ext and the
load have to have only a single use.
This removes the anyext-uses.ll testcase which started failing
because it is unreduced and unclear what it is testing.
llvm-svn: 92950
2010-01-07 21:59:23 +00:00
Chris Lattner
f68e328a99
factor this code better and reduce nesting at the same
...
time, no functionality change.
llvm-svn: 92948
2010-01-07 21:53:27 +00:00
Evan Cheng
4523041394
APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
...
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
Benjamin Kramer
bbaf8cac38
Simplify code. No intended functionality/performance change.
...
llvm-svn: 92938
2010-01-07 19:46:15 +00:00
Benjamin Kramer
badb9914d2
Kill dead store.
...
llvm-svn: 92920
2010-01-07 17:50:57 +00:00
Benjamin Kramer
a97aab4995
Remove dead variable.
...
llvm-svn: 92919
2010-01-07 17:29:08 +00:00
Benjamin Kramer
22ec2524fd
Use pop_back_val instead of back()+pop_back.
...
llvm-svn: 92918
2010-01-07 17:27:56 +00:00
Jakob Stoklund Olesen
b90023e707
Allow double defs after tail duplication.
...
llvm-svn: 92874
2010-01-06 23:52:46 +00:00
Jakob Stoklund Olesen
a63aa4e54b
Add Target hook to duplicate machine instructions.
...
Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.
llvm-svn: 92873
2010-01-06 23:47:07 +00:00
Jim Grosbach
0beaad246d
Anti-dependency breaking needs to be careful regarding instructions with
...
multiple register definitions.
llvm-svn: 92864
2010-01-06 22:21:25 +00:00
Evan Cheng
f9dade0634
Comment.
...
llvm-svn: 92850
2010-01-06 19:43:21 +00:00
Evan Cheng
25dcf9b830
Teach dag combine to fold the following transformation more aggressively:
...
(OP (trunc x), (trunc y)) -> (trunc (OP x, y))
Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel.
This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places.
llvm-svn: 92849
2010-01-06 19:38:29 +00:00
Jim Grosbach
2101815d36
80 column and whitespace cleanup
...
llvm-svn: 92837
2010-01-06 16:48:02 +00:00
Lang Hames
3e8519b563
Fixed malformed -*- lines in PBQP headers.
...
llvm-svn: 92830
2010-01-06 08:53:34 +00:00
Jakob Stoklund Olesen
03dea01d94
Add <imp-def> and <imp-kill> operands when replacing virtual sub-register defs and kills.
...
An instruction like this:
%reg1097:1<def> = VMOVSR %R3<kill>, 14, %reg0
Must be replaced with this when substituting physical registers:
%S0<def> = VMOVSR %R3<kill>, 14, %reg0, %D0<imp-def>
llvm-svn: 92812
2010-01-06 00:29:28 +00:00
Bill Wendling
b4f0d6e3b6
The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.
...
llvm-svn: 92810
2010-01-06 00:23:35 +00:00
Bill Wendling
41e18c3512
Only check the ordering if there is an ordering for each nodes.
...
llvm-svn: 92807
2010-01-06 00:09:23 +00:00
Bill Wendling
b7d6746476
Add a semi-primitive form of scheduling via the "SDNode ordering" to the
...
bottom-up scheduler. We prefer the lower order number.
llvm-svn: 92806
2010-01-05 23:48:12 +00:00
Bill Wendling
7e9607ab56
Don't assign the shift the same type as the variable being shifted. This could
...
result in illegal types for the SHL operator.
llvm-svn: 92797
2010-01-05 22:39:10 +00:00
Dan Gohman
9ef9e2c758
Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
...
uses several kinds of opcode values which are not declared within
that enum. This fixes PR5946.
llvm-svn: 92794
2010-01-05 22:26:32 +00:00
Dan Gohman
b4e120e7a7
Restore dump() methods to Loop and MachineLoop.
...
llvm-svn: 92772
2010-01-05 21:08:02 +00:00
Benjamin Kramer
0ba7479f2c
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Jakob Stoklund Olesen
0277c4cd0b
Remove livein checks from machine code verifier.
...
A phi operand that is implicitly defined in a predecessor becomes an undefined
register after phi elimination. This causes a lot of false positives when the
verifier is checking if live-in registers are live-out from all predecessors.
Removing the verifier checks seems like a better solution than insisting on
IMPLICIT_DEF instructions in predecessor blocks.
llvm-svn: 92769
2010-01-05 20:59:36 +00:00
Devang Patel
eb75073664
If a scope has only one instruction then first instruction is also the last instruction.
...
llvm-svn: 92736
2010-01-05 16:59:17 +00:00
Benjamin Kramer
e90a3c66c4
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
Devang Patel
9c02d20409
Delete renaming use of dead dbg intrinsics.
...
Intrinsic::dbg_stoppoint
Intrinsic::dbg_region_start
Intrinsic::dbg_region_end
Intrinsic::dbg_func_start
llvm-svn: 92672
2010-01-05 01:47:06 +00:00
Devang Patel
e6e1c93fb9
Use StringRef.startswith().
...
llvm-svn: 92671
2010-01-05 01:46:14 +00:00
David Greene
e5bee4794b
Change errs() to dbgs().
...
llvm-svn: 92597
2010-01-05 01:26:11 +00:00
David Greene
9fab20f5d2
Change errs() to dbgs().
...
llvm-svn: 92596
2010-01-05 01:26:09 +00:00
David Greene
9564dbcc2a
Change errs() to dbgs().
...
llvm-svn: 92595
2010-01-05 01:26:05 +00:00
David Greene
e121e605f7
Change errs() to dbgs().
...
llvm-svn: 92594
2010-01-05 01:26:01 +00:00
David Greene
51c811205c
Change errs() to dbgs().
...
llvm-svn: 92593
2010-01-05 01:26:00 +00:00
David Greene
727e700d3d
Change errs() to dbgs().
...
llvm-svn: 92592
2010-01-05 01:25:58 +00:00
David Greene
71f44c85e8
Change errs() to dbgs().
...
llvm-svn: 92591
2010-01-05 01:25:55 +00:00
David Greene
6000f59a50
Change errs() to dbgs().
...
llvm-svn: 92590
2010-01-05 01:25:52 +00:00
David Greene
879bc8bffa
Change errs() to dbgs().
...
llvm-svn: 92589
2010-01-05 01:25:50 +00:00
David Greene
39454e8cb5
Change errs() to dbgs().
...
llvm-svn: 92588
2010-01-05 01:25:47 +00:00
David Greene
99517775a2
Change errs() to dbgs().
...
llvm-svn: 92587
2010-01-05 01:25:45 +00:00
David Greene
ecb5255809
Change errs() to dbgs().
...
llvm-svn: 92586
2010-01-05 01:25:43 +00:00
David Greene
ce47312026
Change errs() to dbgs().
...
llvm-svn: 92585
2010-01-05 01:25:41 +00:00
David Greene
5857f38bbe
Change errs() to dbgs().
...
llvm-svn: 92584
2010-01-05 01:25:39 +00:00
David Greene
8e4443c9ae
Change errs() to dbgs().
...
llvm-svn: 92583
2010-01-05 01:25:20 +00:00
David Greene
9f18bb0e40
Change errs() to dbgs().
...
llvm-svn: 92582
2010-01-05 01:25:15 +00:00
David Greene
b1764ac8cb
Change errs() to dbgs().
...
llvm-svn: 92581
2010-01-05 01:25:11 +00:00
David Greene
54706ebebb
Change errs() to dbgs().
...
llvm-svn: 92580
2010-01-05 01:25:09 +00:00
David Greene
4f5be2f621
Change errs() to dbgs().
...
llvm-svn: 92579
2010-01-05 01:25:04 +00:00
David Greene
bf6025f893
Change errs() to dbgs().
...
llvm-svn: 92578
2010-01-05 01:25:00 +00:00
David Greene
2c9dbf7b18
Change errs() to dbgs().
...
llvm-svn: 92577
2010-01-05 01:24:57 +00:00
David Greene
3a4b23b913
Change errs() to dbgs().
...
llvm-svn: 92576
2010-01-05 01:24:54 +00:00
David Greene
a9fbae472c
Change errs() to dbgs().
...
llvm-svn: 92575
2010-01-05 01:24:53 +00:00
David Greene
5201625e9c
Change errs() to dbgs().
...
llvm-svn: 92574
2010-01-05 01:24:50 +00:00
David Greene
aaf3acc471
Change errs() to dbgs().
...
llvm-svn: 92573
2010-01-05 01:24:48 +00:00
David Greene
4c9eb54e83
Change errs() to dbgs().
...
llvm-svn: 92572
2010-01-05 01:24:45 +00:00
David Greene
216139c074
Change errs() to dbgs().
...
llvm-svn: 92571
2010-01-05 01:24:43 +00:00
David Greene
82adcc9c8f
Change errs() to dbgs().
...
llvm-svn: 92570
2010-01-05 01:24:40 +00:00
David Greene
616c94ab91
Change errs() to dbgs().
...
llvm-svn: 92569
2010-01-05 01:24:36 +00:00
David Greene
b22b413dff
Change errs() to dbgs().
...
llvm-svn: 92568
2010-01-05 01:24:34 +00:00
David Greene
6de371c435
Change errs() to dbgs().
...
llvm-svn: 92567
2010-01-05 01:24:28 +00:00
David Greene
aff8539d1d
Change errs() to dbgs().
...
llvm-svn: 92566
2010-01-05 01:24:24 +00:00
David Greene
8edc0a70f1
Change errs() to dbgs().
...
llvm-svn: 92565
2010-01-05 01:24:21 +00:00
Dan Gohman
9bcfdf98f1
Change SelectCode's argument from SDValue to SDNode *, to make it more
...
clear what information these functions are actually using.
This is also a micro-optimization, as passing a SDNode * around is
simpler than passing a { SDNode *, int } by value or reference.
llvm-svn: 92564
2010-01-05 01:24:18 +00:00
David Greene
271a921b6d
Change errs() to dbgs().
...
llvm-svn: 92563
2010-01-05 01:24:08 +00:00
David Greene
020c436572
Change errs() to dbgs().
...
llvm-svn: 92548
2010-01-05 00:10:05 +00:00
David Greene
f1e49c30ee
Change errs() to dbgs().
...
llvm-svn: 92547
2010-01-05 00:03:48 +00:00
David Greene
1f1c9c4164
Change errs() to dbgs().
...
llvm-svn: 92545
2010-01-04 23:48:20 +00:00
David Greene
fdc1779703
Change errs() to dbgs().
...
llvm-svn: 92544
2010-01-04 23:39:17 +00:00
David Greene
5e5f312e5f
Change errs() to dbgs().
...
llvm-svn: 92542
2010-01-04 23:22:07 +00:00
David Greene
1527704e3e
Change errs() to dbgs().
...
llvm-svn: 92539
2010-01-04 23:14:46 +00:00
David Greene
155692eeb8
Change errs() to dbgs().
...
llvm-svn: 92535
2010-01-04 23:06:47 +00:00
Devang Patel
6915c52d56
Fix debug_inlined section entries for routines whose names are changed through __asm() extension.
...
llvm-svn: 92533
2010-01-04 23:04:36 +00:00
David Greene
dc5355f563
Change errs() to dbgs().
...
llvm-svn: 92532
2010-01-04 23:02:10 +00:00
David Greene
47695623c5
Change errs() to dbgs().
...
llvm-svn: 92529
2010-01-04 22:49:02 +00:00
David Greene
5f0560aeb8
Change errs() to dbgs().
...
llvm-svn: 92528
2010-01-04 22:41:43 +00:00
David Greene
593fd246ac
Change errs() to dbgs().
...
llvm-svn: 92524
2010-01-04 22:33:16 +00:00
David Greene
8d04d65a84
Change errs() to dbgs().
...
llvm-svn: 92520
2010-01-04 22:02:01 +00:00
David Greene
56dd445b5f
Change errs() to dbgs().
...
llvm-svn: 92518
2010-01-04 21:48:34 +00:00
David Greene
42bc25814f
Change errs() to dbgs().
...
llvm-svn: 92516
2010-01-04 21:35:15 +00:00
David Greene
d43c9cad00
Change errs() to dbgs().
...
llvm-svn: 92515
2010-01-04 21:26:07 +00:00
Dan Gohman
2754bdcfdb
Use a pointer type rather than MVT::Other for the ExternalSymbol node used
...
in an inline asm.
llvm-svn: 92512
2010-01-04 21:00:54 +00:00