Victor Hernandez
b324e66f4c
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
...
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.
llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Nate Begeman
d232150b83
Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
...
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer
Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.
llvm-svn: 93527
2010-01-15 18:51:18 +00:00
Victor Hernandez
8d4904b639
Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
...
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Bob Wilson
1a234c0aee
Change pre-regalloc tail duplication to only duplicate indirect branch blocks.
...
The pre-regalloc pass caused some regressions in both compile time and
performance of the generated code, and it did not improve performance, except
for indirect branches. I also moved the check for single-block loops to speed
up the common case when running the taildup pass before reg allocation.
llvm-svn: 93505
2010-01-15 06:29:17 +00:00
Victor Hernandez
5d6551816b
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
...
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Devang Patel
89880c8224
Do not use AT_specification die for static variables. It confuses gdb.
...
llvm-svn: 93494
2010-01-15 01:12:22 +00:00
Jim Grosbach
4f1b0ded75
fix 80-column violations
...
llvm-svn: 93487
2010-01-15 00:36:15 +00:00
Jim Grosbach
2e3abd7e82
Fix 80 column violations and clean up whitespace
...
llvm-svn: 93484
2010-01-15 00:32:47 +00:00
Devang Patel
2108ee075f
Do not emit multiple AT_container_type attributes.
...
We need to find a better way to emit this info.
llvm-svn: 93481
2010-01-15 00:26:31 +00:00
Dale Johannesen
b297cdd937
Fix a comment.
...
llvm-svn: 93463
2010-01-14 21:50:17 +00:00
Jim Grosbach
9ae81816bc
Add comment explaining the necessity of r93456
...
llvm-svn: 93459
2010-01-14 21:38:31 +00:00
Jim Grosbach
0868567fc3
Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,
...
catch info can get misplaced when a selector ends up more than one block
removed from the parent invoke(s). This could happen when a landing pad is
shared by multiple invokes and is also a target of a normal edge from
elsewhere.
llvm-svn: 93456
2010-01-14 21:22:16 +00:00
Dan Gohman
dd5286dc63
Fix a codegen abort seen in 483.xalancbmk.
...
llvm-svn: 93417
2010-01-14 03:08:49 +00:00
Evan Cheng
af0ad65ff2
Commit some changes I had managed to lose last night while refactoring the code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them.
...
This fixes PR6027.
llvm-svn: 93335
2010-01-13 19:16:39 +00:00
Evan Cheng
b5499d09d1
Re-enable extension optimization pass.
...
llvm-svn: 93313
2010-01-13 08:45:40 +00:00
Evan Cheng
957b8beaaa
Add comment; refactor; avoid pulling in DT if it's not used.
...
llvm-svn: 93306
2010-01-13 07:59:13 +00:00
Chris Lattner
25d8ed3773
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
2b630fe822
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
209aecad0c
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
8e26d19cb3
fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
...
llvm-svn: 93293
2010-01-13 04:39:46 +00:00
Chris Lattner
4581a4f03a
reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.
...
llvm-svn: 93292
2010-01-13 04:38:16 +00:00
Chris Lattner
a32ba6d056
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
7e0c164b5e
reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly
...
llvm-svn: 93290
2010-01-13 04:29:19 +00:00
Evan Cheng
d7d8f6d000
Disable opt-ext pass to unbreak the build for now.
...
llvm-svn: 93286
2010-01-13 01:51:43 +00:00
Evan Cheng
7a4bac3000
Remove debug option I accidentally left in.
...
llvm-svn: 93285
2010-01-13 01:43:20 +00:00
Ted Kremenek
451a965a78
Update CMake file.
...
llvm-svn: 93283
2010-01-13 01:02:47 +00:00
Evan Cheng
30bebff456
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
7b1a7ed330
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
5b562906ac
Fix a comment typo.
...
llvm-svn: 93261
2010-01-12 22:18:56 +00:00
Dan Gohman
d49763d200
Update a partially obsolete comment.
...
llvm-svn: 93228
2010-01-12 04:32:35 +00:00
Dan Gohman
f9d6d53823
Fix a typo in a comment.
...
llvm-svn: 93227
2010-01-12 04:30:26 +00:00
Jakob Stoklund Olesen
d2a1bee2d4
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
ec57c81e64
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
8992323bb9
s/NextValueNo/NextMDValueNo while processing metadata.
...
llvm-svn: 93165
2010-01-11 18:52:33 +00:00
Dan Gohman
6bd3ef82ff
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
0c6defd577
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
58ec4fec88
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
dab2cd543f
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
88de38453f
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
16b75ce19c
APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
...
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
Benjamin Kramer
b757a82902
Simplify code. No intended functionality/performance change.
...
llvm-svn: 92938
2010-01-07 19:46:15 +00:00
Benjamin Kramer
2b45998b7b
Kill dead store.
...
llvm-svn: 92920
2010-01-07 17:50:57 +00:00
Benjamin Kramer
d64b952e5e
Remove dead variable.
...
llvm-svn: 92919
2010-01-07 17:29:08 +00:00
Benjamin Kramer
cdb3889791
Use pop_back_val instead of back()+pop_back.
...
llvm-svn: 92918
2010-01-07 17:27:56 +00:00
Jakob Stoklund Olesen
29c7234eb7
Allow double defs after tail duplication.
...
llvm-svn: 92874
2010-01-06 23:52:46 +00:00
Jakob Stoklund Olesen
29a64c9575
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
a7cef4fab5
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
746012a6c1
Comment.
...
llvm-svn: 92850
2010-01-06 19:43:21 +00:00
Evan Cheng
166a4e6caa
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
eb431da074
80 column and whitespace cleanup
...
llvm-svn: 92837
2010-01-06 16:48:02 +00:00
Lang Hames
68dd9c7dd7
Fixed malformed -*- lines in PBQP headers.
...
llvm-svn: 92830
2010-01-06 08:53:34 +00:00
Jakob Stoklund Olesen
7725526de1
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
c075acbb54
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
578865ff3d
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
0a7056fe52
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
03f0af372c
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
404a984780
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
c3f2137c06
Restore dump() methods to Loop and MachineLoop.
...
llvm-svn: 92772
2010-01-05 21:08:02 +00:00
Benjamin Kramer
d2564e3afb
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Jakob Stoklund Olesen
4cb7702c4f
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
d146e2e3df
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
ccce8bae14
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
33f80d2303
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
43ef34d2a5
Use StringRef.startswith().
...
llvm-svn: 92671
2010-01-05 01:46:14 +00:00
David Greene
30ed3ca034
Change errs() to dbgs().
...
llvm-svn: 92597
2010-01-05 01:26:11 +00:00
David Greene
d18966c79f
Change errs() to dbgs().
...
llvm-svn: 92596
2010-01-05 01:26:09 +00:00
David Greene
fc886b99da
Change errs() to dbgs().
...
llvm-svn: 92595
2010-01-05 01:26:05 +00:00
David Greene
aa8ce38113
Change errs() to dbgs().
...
llvm-svn: 92594
2010-01-05 01:26:01 +00:00
David Greene
4b7aa24842
Change errs() to dbgs().
...
llvm-svn: 92593
2010-01-05 01:26:00 +00:00
David Greene
7e34eadd91
Change errs() to dbgs().
...
llvm-svn: 92592
2010-01-05 01:25:58 +00:00
David Greene
9f23703919
Change errs() to dbgs().
...
llvm-svn: 92591
2010-01-05 01:25:55 +00:00
David Greene
e3f851db18
Change errs() to dbgs().
...
llvm-svn: 92590
2010-01-05 01:25:52 +00:00
David Greene
714520fb89
Change errs() to dbgs().
...
llvm-svn: 92589
2010-01-05 01:25:50 +00:00
David Greene
97d9fc8cdb
Change errs() to dbgs().
...
llvm-svn: 92588
2010-01-05 01:25:47 +00:00
David Greene
91c42f851b
Change errs() to dbgs().
...
llvm-svn: 92587
2010-01-05 01:25:45 +00:00
David Greene
7e256f397c
Change errs() to dbgs().
...
llvm-svn: 92586
2010-01-05 01:25:43 +00:00
David Greene
94745d0d10
Change errs() to dbgs().
...
llvm-svn: 92585
2010-01-05 01:25:41 +00:00
David Greene
0c1e7772fb
Change errs() to dbgs().
...
llvm-svn: 92584
2010-01-05 01:25:39 +00:00
David Greene
025e934d54
Change errs() to dbgs().
...
llvm-svn: 92583
2010-01-05 01:25:20 +00:00
David Greene
85afc853b5
Change errs() to dbgs().
...
llvm-svn: 92582
2010-01-05 01:25:15 +00:00
David Greene
4eb5bed65b
Change errs() to dbgs().
...
llvm-svn: 92581
2010-01-05 01:25:11 +00:00
David Greene
d65bc15c81
Change errs() to dbgs().
...
llvm-svn: 92580
2010-01-05 01:25:09 +00:00
David Greene
6f021a30fe
Change errs() to dbgs().
...
llvm-svn: 92579
2010-01-05 01:25:04 +00:00
David Greene
fe5c3524c7
Change errs() to dbgs().
...
llvm-svn: 92578
2010-01-05 01:25:00 +00:00
David Greene
5730f203ee
Change errs() to dbgs().
...
llvm-svn: 92577
2010-01-05 01:24:57 +00:00
David Greene
f34d7ac9f1
Change errs() to dbgs().
...
llvm-svn: 92576
2010-01-05 01:24:54 +00:00
David Greene
ae4f266b2d
Change errs() to dbgs().
...
llvm-svn: 92575
2010-01-05 01:24:53 +00:00
David Greene
ec5883fc0e
Change errs() to dbgs().
...
llvm-svn: 92574
2010-01-05 01:24:50 +00:00
David Greene
807fcf6374
Change errs() to dbgs().
...
llvm-svn: 92573
2010-01-05 01:24:48 +00:00
David Greene
40deefdc4f
Change errs() to dbgs().
...
llvm-svn: 92572
2010-01-05 01:24:45 +00:00
David Greene
63145844c8
Change errs() to dbgs().
...
llvm-svn: 92571
2010-01-05 01:24:43 +00:00
David Greene
4cec475ed7
Change errs() to dbgs().
...
llvm-svn: 92570
2010-01-05 01:24:40 +00:00
David Greene
d93137dce7
Change errs() to dbgs().
...
llvm-svn: 92569
2010-01-05 01:24:36 +00:00
David Greene
7562faa4cf
Change errs() to dbgs().
...
llvm-svn: 92568
2010-01-05 01:24:34 +00:00
David Greene
d7c266bb9c
Change errs() to dbgs().
...
llvm-svn: 92567
2010-01-05 01:24:28 +00:00
David Greene
2555292e44
Change errs() to dbgs().
...
llvm-svn: 92566
2010-01-05 01:24:24 +00:00
David Greene
ac9f8199ba
Change errs() to dbgs().
...
llvm-svn: 92565
2010-01-05 01:24:21 +00:00
Dan Gohman
ea6f91ff64
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
f62be0c0a6
Change errs() to dbgs().
...
llvm-svn: 92563
2010-01-05 01:24:08 +00:00
David Greene
646aacb097
Change errs() to dbgs().
...
llvm-svn: 92548
2010-01-05 00:10:05 +00:00