Commit Graph

9732 Commits

Author SHA1 Message Date
Evan Cheng
59b3655564 Pretty print DBG_VALUE machine instructions.
Before:
DBG_VALUE %RSI, 0, !-1; dbg:SimpleRegisterCoalescing.cpp:2707
Now:
DBG_VALUE %RSI, 0, !"this"; dbg:SimpleRegisterCoalescing.cpp:2707


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 20:03:13 +00:00
Chris Lattner
e87f7bb50e Rework global alignment computation again. Now we do round up
alignment of globals to the preferred alignment, but only when
there is no section specified on the global (by far the common
case).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 19:58:07 +00:00
Devang Patel
54fc4d6a48 While lowering dbg_declare, emit DBG_VALUE machine instruction if alloca matching llvm.dbg.declare intrinsic is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 19:27:33 +00:00
Jakob Stoklund Olesen
0fd109963a Recompute kill flags from live intervals after coalescing instead of trying to
update them. Computing kill flags is notoriously difficult, and the coalescer
would get it wrong sometimes, and it would completely skip physical registers.

Now we simply remove kill flags based on the live intervals after coalescing.
This is a few percent slower, but now we get correct kill flags for physical
registers after coalescing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 18:28:39 +00:00
Evan Cheng
b3a3d5e858 Try operation promotion only if regular dag combine and target-specific ones failed to do anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 07:10:39 +00:00
Devang Patel
28ff35d030 Emit debug info for byval parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102486 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 01:39:28 +00:00
Chris Lattner
a7b611c10d further simplify EmitAlignment by eliminating the
ForcedAlignBits argument, tweaking the single client of it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 01:08:40 +00:00
Chris Lattner
755824756c remove a dead argument to EmitAlignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 01:06:02 +00:00
Chris Lattner
059ea138a6 remove some default arguments to EmitAlignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 01:05:45 +00:00
Devang Patel
a43098d388 Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-28 01:03:09 +00:00
Devang Patel
97303ee27d Use isReg(), isImm() and isFPImm().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 22:04:41 +00:00
Devang Patel
dcde3db38e Check operand type first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 21:49:04 +00:00
Devang Patel
0f9d952542 Ignore DBG_VALUE instructions that points to undef values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 20:54:45 +00:00
Evan Cheng
ac7eae5b89 - When legal, promote a load to zextload rather than ext load.
- Catch more further dag combine opportunities as result of operand promotion, e.g. (i32 anyext (i16 trunc (i32 x))) -> (i32 x)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 19:48:13 +00:00
Devang Patel
eac9c07fde Identify when a lexical scope is split in to multiple instruction ranges. Emit such ranges using DW_AT_ranges.
This patch fixes bug (PR6894) introduced by previous version of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 19:46:33 +00:00
Evan Cheng
ed33b13a10 Do not count kill, implicit_def instructions as printed instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 19:38:45 +00:00
Chris Lattner
4c4d0c0cc5 round zero-byte .zerofill directives up to 1 byte. This
should fix some "g++.dg-struct-layout-1" failures, 
rdar://7886017


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 07:41:44 +00:00
Dale Johannesen
fc0b860bcc Revert a small part of 102372; this fixes at least one
of the dbg testsuite regressions.  I don't think this is
really the right fix; this change exposed an existing problem
upstream somewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27 02:10:05 +00:00
Chris Lattner
d61647d306 add a comment in verbose-asm mode indicating why a noop is being generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102401 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 23:41:43 +00:00
Chris Lattner
ee9eb411ff on darwin empty functions need to codegen into something of non-zero length,
otherwise labels get incorrectly merged.  We handled this by emitting a 
".byte 0", but this isn't correct on thumb/arm targets where the text segment
needs to be a multiple of 2/4 bytes.  Handle this by emitting a noop.  This
is more gross than it should be because arm/ppc are not fully mc'ized yet.

This fixes rdar://7908505



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 23:37:21 +00:00
Bob Wilson
cc7354e993 Avoid adding a null MD node operand, which crashes with "-debug" when trying
to print the operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 22:56:56 +00:00
Devang Patel
5098da0a7e Use DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This simplifies debug range entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 22:54:28 +00:00
Dale Johannesen
925965e6ba Remove crufty comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 20:48:54 +00:00
Dale Johannesen
fdb42fa5fe Add DBG_VALUE handling for byval parameters; this
produces a comment on targets that support it, but
the Dwarf writer is not hooked up yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 20:06:49 +00:00
Evan Cheng
f48023b3cf Insert dbg_value instructions for function entry block liveins (i.e. function arguments).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102368 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 19:16:00 +00:00
Chris Lattner
567dd1f5d0 fix PR6921 a different way. Intead of increasing the
alignment of globals with a specified alignment, we fix
common variables to obey their alignment.  Add a comment
explaining why this behavior is important.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 18:46:46 +00:00
Evan Cheng
6fa7636e61 Re-enable 102323 with fix: do not update dbg_value's with incorrect frame indices when the live interval are being re-materialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 18:37:21 +00:00
Chris Lattner
f74e25f60c Revert r102300/102301, which serious broke objc apps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 18:30:45 +00:00
Bob Wilson
211678a0d7 Update MachineSSAUpdater with the same changes I made for the IR-level
SSAUpdater.  I'm going to try to refactor this to share most of the code
between them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102353 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 17:40:49 +00:00
Evan Cheng
6cd4b34261 Temporary disable spiller modifying dbg_value. It's breaking build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 08:24:07 +00:00
Evan Cheng
962021bc7f - Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo and rename it to emitFrameIndexDebugValue.
- Teach spiller to modify DBG_VALUE instructions to reference spill slots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102323 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26 07:38:55 +00:00
Dale Johannesen
f822e733af Stop abusing EmitInstrWithCustomInserter for target-dependent
form of DEBUG_VALUE, as it doesn't have reasonable default
behavior for unsupported targets.  Add a new hook instead.
No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102320 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-25 21:33:54 +00:00
Dale Johannesen
7dc7840850 Add comment re byval args. Doesn't actually work this way yet.
xs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102316 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-25 21:03:54 +00:00
Chris Lattner
044698b39a Fix PR6921: globals were not getting correctly rounded up to their
preferred alignment unless they were common or some other special
case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-25 05:30:43 +00:00
Evan Cheng
95c57ea182 When a load operand is promoted to an extload, replace other uses with uses of extload result truncated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 04:43:44 +00:00
Dan Gohman
a7bcef1bce Apply a fix for a vector setcc dagcombine from Jan Sjodin. No
testcase yet, as the testcase now fails downstream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 01:17:30 +00:00
Evan Cheng
caf7740f96 Code refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 19:10:30 +00:00
Dan Gohman
e8c92dd439 Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
itself too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102176 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 15:29:50 +00:00
Dan Gohman
314bf7cbbf Revert 102135, 102129, 102127, 102106, 102104, 102102, 102012, 102004,
because 102004 causes codegen to emit invalid assembly on at least
x86_64-unknown-gnu-linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 01:18:53 +00:00
Devang Patel
c04d54527e Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:56:35 +00:00
Dan Gohman
c105a2b5b7 Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks down
into SelectionDAGBuilder itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102128 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:55:53 +00:00
Devang Patel
18ee3bb0b7 Adjust debug range offsets for isWeakForLinker() functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102127 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:52:00 +00:00
Dan Gohman
f81eca0ab9 Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISel
and into SelectionDAGBuilder and FastISel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102123 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:46:50 +00:00
Evan Cheng
07c4e1085d - It's not safe to promote rotates (at least not trivially).
- Some code refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:19:46 +00:00
Dan Gohman
3b172f1c01 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:06:42 +00:00
Dan Gohman
620427d5a1 Move PHINodesToUpdate out of SelectionDAGBuilder and into
FunctionLoweringInfo, as it isn't SelectionDAG-specific. This isn't
completely natural, as PHI node state is not per-function but rather
per-basic-block, however there's currently no other convenient
per-basic-block state to group it with.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 19:55:20 +00:00
Devang Patel
f1dabde404 Rename InsnAfterLabelMap and InsnBeforeLabelMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 18:43:35 +00:00
Devang Patel
3547a88b50 Keep track of MCSymbol used to mark beginning of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 18:39:21 +00:00
Devang Patel
bc655eaee0 At this point Start and End are not null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102102 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 18:28:58 +00:00
Jakob Stoklund Olesen
a063e19593 Run LiveVariables instead of computing liveness locally in -regalloc=fast.
This actually makes everything slower, but the plan is to have isel add <kill>
flags the way it is already adding <dead> flags. Then LiveVariables can be
removed again.

When ignoring the time spent in LiveVariables, -regalloc=fast is now twice as
fast as -regalloc=local.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 23:18:07 +00:00
Evan Cheng
e3dd8550c6 Do not try to optimize a copy that has already been marked for deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 20:57:54 +00:00
Devang Patel
708e474c2f Add command line option to disable debug info printing in .s file. This option does not impact debug info generation and preservation through earlier compile starges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102012 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 19:08:53 +00:00
Jakob Stoklund Olesen
00207237dd Add fast register allocator, enabled with -regalloc=fast.
So far this is just a clone of -regalloc=local that has been lobotomized to run
25% faster. It drops the least-recently-used calculations, and is just plain
stupid when it runs out of registers.

The plan is to make this go even faster for -O0 by taking advantage of the short
live intervals in unoptimized code. It should not be necessary to calculate
liveness when most virtual registers are killed 2-3 instructions after they are
born.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 18:02:42 +00:00
Devang Patel
9cdb4109d5 Identify when a lexical scope is split in to multiple instruction ranges. Emit such ranges using DW_AT_ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102004 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 16:32:19 +00:00
Evan Cheng
e566763b19 Implement -disable-non-leaf-fp-elim which disable frame pointer elimination
optimization for non-leaf functions. This will be hooked up to gcc's
-momit-leaf-frame-pointer option. rdar://7886181


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 03:18:23 +00:00
Dan Gohman
f0757b0edc Add more const qualifiers on TargetMachine and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 01:34:56 +00:00
Dan Gohman
af5097537c Update CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101976 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 01:32:29 +00:00
Dan Gohman
5eb6d65a27 Move several SelectionDAG-independent utility functions out of the
SelectionDAG directory and into a new Analysis.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 01:22:34 +00:00
Evan Cheng
30fdb5c2ac - Clean up some crappy code which deals with coalescing of copies which look at
extract_subreg / insert_subreg, etc.
- Add support for more aggressive insert_subreg coalescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101971 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 00:44:22 +00:00
Evan Cheng
3115698611 Rewrite machine cse to avoid recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 00:21:07 +00:00
Dan Gohman
bc7588eb68 Add another variant of this test which found a place where
CodeGen's ComputeMaskedBits was being over-conservative when computing
bits for an ADD.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21 00:19:28 +00:00
Dale Johannesen
7609017dc3 Because of the EMMS problem, right now we have to support
user-defined operations that use MMX register types, but
the compiler shouldn't generate them on its own.  This adds
a Synthesizable abstraction to represent this, and changes
the vector widening computation so it won't produce MMX types.
(The motivation is to remove noise from the ABI compatibility
part of the gcc test suite, which has some breakage right now.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 22:34:09 +00:00
Jakob Stoklund Olesen
9196ab6405 When MachineLICM is hoisting a physical register after regalloc, make sure the
register is not killed in the loop.

This fixes 188.ammp on ARM where the post-ra scheduler would grab a register
that looked available but wasn't.

A testcase would be huge and fragile, sorry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 18:45:47 +00:00
Evan Cheng
d6060a4ce9 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 17:27:38 +00:00
Dan Gohman
92884f7ee5 Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISel
into SelectionDAGBuilder. This avoids a separate pass over the
instructions, and has the side effect of providing debug location
information to the copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 15:03:56 +00:00
Dan Gohman
ba5be5c07b Don't send PHI nodes down to SelectionDAGBuilder of FastISel, since
they end up doing nothing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 15:00:41 +00:00
Dan Gohman
d84e806dd4 Sink this use_empty() check into isUsedOutsideOfDefiningBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101902 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 14:50:13 +00:00
Dan Gohman
c025c85352 If a PHI node somehow has debug info, propogate it to the MachineInstr PHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 14:48:02 +00:00
Dan Gohman
3f1403f14e Don't iterate through the whole block just to find the PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 14:46:25 +00:00
Gabor Greif
a9b2313c13 use abstract accessors to CallInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 13:13:04 +00:00
Chris Lattner
44e05080f8 Bill's change in r95336 broke empty aggregates embedded
in other types.  fix this by only bumping zero-byte globals
up to a single byte if the *entire global* is zero size,
fixing PR6340.

This also fixes empty arrays etc to be handled correctly,
and only does this on subsection-via-symbols targets (aka
darwin) which is the only place where this matters.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101879 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 06:20:21 +00:00
Dan Gohman
8b1dbebc1e Delete a redundant return statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 01:58:20 +00:00
Bill Wendling
86c5abb4c0 The visitXOR method can return the same SDNode. If so, we don't want to delete
it as it's not dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 01:25:01 +00:00
Dan Gohman
a9056dbec1 Remove this debug output; it isn't that useful, and it's incomplete
in the case where a basic block is split.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:56:44 +00:00
Dan Gohman
8ba3aa7f9c Sink DebugLoc handling out of SelectionDAGISel into FastISel and
SelectionDAGBuilder, where it doesn't have to be as complicated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:48:35 +00:00
Dan Gohman
084751cd16 Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cpp
responsible for figuring out what that's supposed to be on its own.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:37:27 +00:00
Dan Gohman
a9a3321938 Reapply the removal of SelectionDAGISel's BB, with a fix for the case
where multiple blocks are emitted; functions which do this need to return
the new BB so that their callers can stay current.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101843 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 00:29:35 +00:00
Dan Gohman
68b7960c1a Revert 101825, which is causing trouble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101832 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 23:34:15 +00:00
Dan Gohman
66db3a0f10 Make BreakAntiDependencies' SUnits argument const, and make the Begin
and End arguments by-value rather than by-reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 23:11:58 +00:00
Dan Gohman
35bb85b7ee Eliminate SelectionDAGISel's "current block" member. Just pass it as
an argument to things that need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101825 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 22:51:14 +00:00
Dan Gohman
99be8ae389 Eliminate the CurMBB member from SelectionDAGBuilder. For places that
need it, just pass around the parent block of the current instruction
explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101822 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 22:41:47 +00:00
Evan Cheng
4c26e93e89 More progress on promoting i16 operations to i32 for x86. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:29:22 +00:00
Dan Gohman
50d2b1ac02 Give SelectionDAG a TargetMachine too, rather than having it
fetch one from the MachineFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:22:07 +00:00
Evan Cheng
285fb1cc4a More 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101806 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:17:44 +00:00
Devang Patel
2a4a3b7c61 Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:14:02 +00:00
Dan Gohman
55e59c1863 Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101802 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 19:05:59 +00:00
Dan Gohman
46007b3712 Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
SelectionDAG-specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101801 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 18:41:46 +00:00
Dan Gohman
3fb150a902 Fix -Wcast-qual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 17:42:52 +00:00
Dan Gohman
0d805c33d1 Add const qualifiers to TargetLoweringObjectFile usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 16:44:48 +00:00
Dan Gohman
82d5eaf23e Use const_cast instead of a C-style cast to cast away const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 16:43:55 +00:00
Dan Gohman
9f23dee08c Start function numbering at 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 16:29:15 +00:00
Dan Gohman
383b5f6b91 Delete now-unnecessary const_casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 15:32:28 +00:00
Dan Gohman
d858e90f03 Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 15:26:15 +00:00
Evan Cheng
94d1d9c219 Postra machine licm must add registers defined by loop invariants to *all* of
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 07:07:11 +00:00
Evan Cheng
f2b910922d Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 06:47:47 +00:00
Evan Cheng
e5b51ac770 More work to allow dag combiner to promote 16-bit ops to 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 06:13:15 +00:00
Evan Cheng
4ff28527bb Another 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 06:12:32 +00:00
Bob Wilson
8295d4c96c As a temporary workaround for post-RA not handling DebugValue instructions,
just remove them all.  Radar 7873207 (working around the root problem of
Radar 7759363).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 00:49:11 +00:00
Jakob Stoklund Olesen
23eaf26fa3 Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."
This reverts commit 101392. It broke a buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 00:38:36 +00:00
Eric Christopher
551754c495 Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 23:37:20 +00:00