oota-llvm.git
14 years agoChange SCEVNAryExpr's operand array from a SmallVector to a plain
Dan Gohman [Wed, 17 Mar 2010 18:51:01 +0000 (18:51 +0000)]
Change SCEVNAryExpr's operand array from a SmallVector to a plain
pointer and length, and allocate the arrays in ScalarEvolution's
BumpPtrAllocator, so that they get released when their owning
SCEV gets released. SCEVs are immutable, so they don't need to worry
about operand array resizing. This fixes a memory leak reported
in PR6637.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98755 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove an unnecessary (and misspelled) typedef. Tweak whitespace.
Bob Wilson [Wed, 17 Mar 2010 18:43:25 +0000 (18:43 +0000)]
Remove an unnecessary (and misspelled) typedef.  Tweak whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98753 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomissing include
Andrew Lenharth [Wed, 17 Mar 2010 18:33:00 +0000 (18:33 +0000)]
missing include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98752 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago98745 contains something unrelated to the patch.
Johnny Chen [Wed, 17 Mar 2010 18:32:39 +0000 (18:32 +0000)]
98745 contains something unrelated to the patch.
Remove it from ARMAddressingModes.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98751 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonotes from evan
Chris Lattner [Wed, 17 Mar 2010 18:15:52 +0000 (18:15 +0000)]
notes from evan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98748 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdded sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
Johnny Chen [Wed, 17 Mar 2010 17:52:21 +0000 (17:52 +0000)]
Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w r9, [r7, #28]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98745 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTestcase for r98728.
Stuart Hastings [Wed, 17 Mar 2010 17:51:08 +0000 (17:51 +0000)]
Testcase for r98728.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98744 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix EmitSectionOffset incorrect argument. DwarfDebug is emitting debug info so isEH...
Devang Patel [Wed, 17 Mar 2010 17:29:55 +0000 (17:29 +0000)]
Fix EmitSectionOffset incorrect argument. DwarfDebug is emitting debug info so isEH is always false. This was hiding until now from compilers because of default arguments. This was hiding from dwarf debug info users because for most of the platform isAbsoluteEHSectionOffsets() is same as isAbsoluteDebugSectionOffsets(). But Chris found it while updating dwarf printer to use MC*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98743 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoseveral updates
Chris Lattner [Wed, 17 Mar 2010 17:25:49 +0000 (17:25 +0000)]
several updates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98742 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
Jeffrey Yasskin [Wed, 17 Mar 2010 17:04:56 +0000 (17:04 +0000)]
Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
non-unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98741 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed spelling errors.
John Criswell [Wed, 17 Mar 2010 15:01:50 +0000 (15:01 +0000)]
Fixed spelling errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98724 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a false-positive memory leak in code using RemoveFileOnSignal(). Because
Jeffrey Yasskin [Wed, 17 Mar 2010 07:08:12 +0000 (07:08 +0000)]
Fix a false-positive memory leak in code using RemoveFileOnSignal().  Because
libstdc++'s std::string class points to the interior of an allocation, valgrind
reports strings still alive at program termination as possible leaks.  I didn't
use a ManagedStatic for this because System can't depend on Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98716 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocombiner-aa too, what's its status?
Chris Lattner [Wed, 17 Mar 2010 06:42:25 +0000 (06:42 +0000)]
combiner-aa too, what's its status?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98715 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomore chris scribble.
Chris Lattner [Wed, 17 Mar 2010 06:41:58 +0000 (06:41 +0000)]
more chris scribble.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98714 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix GetOrCreateTemporarySymbol to require a name, clients
Chris Lattner [Wed, 17 Mar 2010 05:41:18 +0000 (05:41 +0000)]
fix GetOrCreateTemporarySymbol to require a name, clients
should use CreateTempSymbol() if they don't care about the
name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98712 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a bunch of random and unformatted notes as I am reading
Chris Lattner [Wed, 17 Mar 2010 04:41:49 +0000 (04:41 +0000)]
add a bunch of random and unformatted notes as I am reading
through tons of old commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98709 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd logo, comment out project info, they need to send updates
Chris Lattner [Wed, 17 Mar 2010 04:02:39 +0000 (04:02 +0000)]
add logo, comment out project info, they need to send updates
to get reincluded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98706 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove dead variable, patch by Nathan Howell!
Chris Lattner [Wed, 17 Mar 2010 01:45:17 +0000 (01:45 +0000)]
remove dead variable, patch by Nathan Howell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98704 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix death tests in -Asserts builds.
Jeffrey Yasskin [Wed, 17 Mar 2010 01:18:45 +0000 (01:18 +0000)]
Fix death tests in -Asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98701 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a check that can no longer be true, after r84803.
Bob Wilson [Tue, 16 Mar 2010 23:40:32 +0000 (23:40 +0000)]
Remove a check that can no longer be true, after r84803.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98694 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 98683. It is breaking something in the disassembler.
Bob Wilson [Tue, 16 Mar 2010 23:01:13 +0000 (23:01 +0000)]
Revert 98683.  It is breaking something in the disassembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98692 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix liveintervals handling of dbg_value instructions.
Evan Cheng [Tue, 16 Mar 2010 21:51:27 +0000 (21:51 +0000)]
Fix liveintervals handling of dbg_value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98686 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove redundant writeback flag from ARM address mode 6. Also remove the
Bob Wilson [Tue, 16 Mar 2010 21:44:40 +0000 (21:44 +0000)]
Remove redundant writeback flag from ARM address mode 6.  Also remove the
optional register update argument, which is currently unused -- when we add
support for that, it can just be a separate operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98683 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreapply r98656 unmodified, which exposed the asmprinter not
Chris Lattner [Tue, 16 Mar 2010 21:25:55 +0000 (21:25 +0000)]
reapply r98656 unmodified, which exposed the asmprinter not
handling constant unions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98680 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisambiguate the *_UPD and * variants by specifying the writeback flag as 1.
Johnny Chen [Tue, 16 Mar 2010 21:25:05 +0000 (21:25 +0000)]
Disambiguate the *_UPD  and * variants by specifying the writeback flag as 1.
This is for the disassembly work.

There are cases where this is not possible, for example, A8.6.53 LDM Encoding T1.
In such case, we'll use an adhoc approach to deduce the Opcode programmatically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98679 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd asmprinter suport for unions, fixing Feature/unions.ll to actually
Chris Lattner [Tue, 16 Mar 2010 21:21:35 +0000 (21:21 +0000)]
add asmprinter suport for unions, fixing Feature/unions.ll to actually
be doing something useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98677 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIgnore debug value instructions while analyzing BB for tail duplication.
Devang Patel [Tue, 16 Mar 2010 21:02:07 +0000 (21:02 +0000)]
Ignore debug value instructions while analyzing BB for tail duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98675 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r98666 too; it's checkin-without-testing day!
Daniel Dunbar [Tue, 16 Mar 2010 20:52:59 +0000 (20:52 +0000)]
Revert r98666 too; it's checkin-without-testing day!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98673 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agostr[r]chr returns its pointer argument so we cannot mark it as nocapture. Thanks...
Benjamin Kramer [Tue, 16 Mar 2010 20:33:15 +0000 (20:33 +0000)]
str[r]chr returns its pointer argument so we cannot mark it as nocapture. Thanks to Duncan for spotting my mistake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98671 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotemporarily xfail
Chris Lattner [Tue, 16 Mar 2010 20:08:07 +0000 (20:08 +0000)]
temporarily xfail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98666 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMark str[r]chr readonly.
Benjamin Kramer [Tue, 16 Mar 2010 19:36:43 +0000 (19:36 +0000)]
Mark str[r]chr readonly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98663 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r98656, its breaking all over the place.
Daniel Dunbar [Tue, 16 Mar 2010 19:35:34 +0000 (19:35 +0000)]
Revert r98656, its breaking all over the place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98662 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove support for uniontype and ConstantUnion, patch by Tim Northover!
Chris Lattner [Tue, 16 Mar 2010 19:15:03 +0000 (19:15 +0000)]
improve support for uniontype and ConstantUnion, patch by Tim Northover!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98656 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an rdar number to this test.
Dan Gohman [Tue, 16 Mar 2010 19:08:20 +0000 (19:08 +0000)]
Add an rdar number to this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98654 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agowork around an MSVC2010 bug, PR6504
Chris Lattner [Tue, 16 Mar 2010 19:07:05 +0000 (19:07 +0000)]
work around an MSVC2010 bug, PR6504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98653 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChris pointed out that producing undef here is wrong in
Duncan Sands [Tue, 16 Mar 2010 18:50:54 +0000 (18:50 +0000)]
Chris pointed out that producing undef here is wrong in
general.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98649 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove redundant writeback flag in ARM addressing mode 5.
Bob Wilson [Tue, 16 Mar 2010 18:38:09 +0000 (18:38 +0000)]
Remove redundant writeback flag in ARM addressing mode 5.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98648 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove the writeback flag from ARM's address mode 4. Now that we have separate
Bob Wilson [Tue, 16 Mar 2010 17:46:45 +0000 (17:46 +0000)]
Remove the writeback flag from ARM's address mode 4.  Now that we have separate
instructions for ld/st with writeback, the flag is completely redundant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98643 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix unused variable warnings.
Bob Wilson [Tue, 16 Mar 2010 17:44:45 +0000 (17:44 +0000)]
Fix unused variable warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98642 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago--- Reverse-merging r98637 into '.':
Bob Wilson [Tue, 16 Mar 2010 16:59:47 +0000 (16:59 +0000)]
--- Reverse-merging r98637 into '.':
U    test/CodeGen/ARM/tls2.ll
U    test/CodeGen/ARM/arm-negative-stride.ll
U    test/CodeGen/ARM/2009-10-30.ll
U    test/CodeGen/ARM/globals.ll
U    test/CodeGen/ARM/str_pre-2.ll
U    test/CodeGen/ARM/ldrd.ll
U    test/CodeGen/ARM/2009-10-27-double-align.ll
U    test/CodeGen/Thumb2/thumb2-strb.ll
U    test/CodeGen/Thumb2/ldr-str-imm12.ll
U    test/CodeGen/Thumb2/thumb2-strh.ll
U    test/CodeGen/Thumb2/thumb2-ldr.ll
U    test/CodeGen/Thumb2/thumb2-str_pre.ll
U    test/CodeGen/Thumb2/thumb2-str.ll
U    test/CodeGen/Thumb2/thumb2-ldrh.ll
U    utils/TableGen/TableGen.cpp
U    utils/TableGen/DisassemblerEmitter.cpp
D    utils/TableGen/RISCDisassemblerEmitter.h
D    utils/TableGen/RISCDisassemblerEmitter.cpp
U    Makefile.rules
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/Makefile
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
D    lib/Target/ARM/Disassembler
U    lib/Target/ARM/ARMInstrFormats.td
U    lib/Target/ARM/ARMAddressingModes.h
U    lib/Target/ARM/Thumb2ITBlockPass.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98640 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitial ARM/Thumb disassembler check-in. It consists of a tablgen backend
Johnny Chen [Tue, 16 Mar 2010 16:36:54 +0000 (16:36 +0000)]
Initial ARM/Thumb disassembler check-in.  It consists of a tablgen backend
(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w r9, [r7, #28]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98637 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStop using the old pre-UAL syntax for LDM/STM instruction suffixes.
Bob Wilson [Tue, 16 Mar 2010 16:19:07 +0000 (16:19 +0000)]
Stop using the old pre-UAL syntax for LDM/STM instruction suffixes.
This does not move entirely to UAL syntax, since the default "increment after"
suffix is empty but we still use "IA" for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98635 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomore BranchInst tests
Gabor Greif [Tue, 16 Mar 2010 15:53:58 +0000 (15:53 +0000)]
more BranchInst tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98634 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNNT: Add -nouname option, so machine uniquing can occur across physical machines.
Daniel Dunbar [Tue, 16 Mar 2010 15:53:02 +0000 (15:53 +0000)]
NNT: Add -nouname option, so machine uniquing can occur across physical machines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98633 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd BranchInst tests
Gabor Greif [Tue, 16 Mar 2010 15:26:09 +0000 (15:26 +0000)]
add BranchInst tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98632 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoappease valgrind testers
Gabor Greif [Tue, 16 Mar 2010 12:32:03 +0000 (12:32 +0000)]
appease valgrind testers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98628 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheck that P is not zero initialized.
Duncan Sands [Tue, 16 Mar 2010 11:36:35 +0000 (11:36 +0000)]
Check that P is not zero initialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98627 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd single return tests
Gabor Greif [Tue, 16 Mar 2010 11:24:53 +0000 (11:24 +0000)]
add single return tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98625 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix PR6589
Gabor Greif [Tue, 16 Mar 2010 10:59:48 +0000 (10:59 +0000)]
fix PR6589
adjusted unittest

I have added some doxygen to OptionalOperandTraits,
so hopefully there will be no confusion in the future.

Incidentally OptionalOperandTraits is not used any more (IIUC),
but the obvious client would be BranchInstr, and I plan
to rearrange it that way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98624 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agobegin humbly with a repro of PR6589
Gabor Greif [Tue, 16 Mar 2010 09:55:46 +0000 (09:55 +0000)]
begin humbly with a repro of PR6589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98623 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd support for bugpointing the integrated assembler. Something like this
Chris Lattner [Tue, 16 Mar 2010 06:41:47 +0000 (06:41 +0000)]
add support for bugpointing the integrated assembler.  Something like this
works for me: bugpoint Output/bisort.llvm.bc -run-llc-ia -safe-run-llc

This uses llc with the integrated assembler as the test compiler and llc
without it as the safe compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98618 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix the same bug on the x86-64 side of the fence.
Chris Lattner [Tue, 16 Mar 2010 06:39:08 +0000 (06:39 +0000)]
fix the same bug on the x86-64 side of the fence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98616 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix the encoding of TAILJMPd. This fixes Benchmarks/Olden/bisort
Chris Lattner [Tue, 16 Mar 2010 06:30:18 +0000 (06:30 +0000)]
fix the encoding of TAILJMPd.  This fixes Benchmarks/Olden/bisort
with the integrated assembler!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98615 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid a memory leak in JITDebugRegisterer.
Jeffrey Yasskin [Tue, 16 Mar 2010 05:54:54 +0000 (05:54 +0000)]
Avoid a memory leak in JITDebugRegisterer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98612 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a testcase for the change in r98586.
Bob Wilson [Tue, 16 Mar 2010 05:33:29 +0000 (05:33 +0000)]
Add a testcase for the change in r98586.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98610 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse getFirstTerminator().
Bill Wendling [Tue, 16 Mar 2010 02:01:51 +0000 (02:01 +0000)]
Use getFirstTerminator().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98604 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoForgot testcase for r98599.
Bill Wendling [Tue, 16 Mar 2010 01:54:20 +0000 (01:54 +0000)]
Forgot testcase for r98599.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98602 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen checking if something's killed, don't rely simply on whether it's marked as
Bill Wendling [Tue, 16 Mar 2010 01:05:35 +0000 (01:05 +0000)]
When checking if something's killed, don't rely simply on whether it's marked as
"used outside of the block". If the block ends in a return, then it won't be
used outside of it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98599 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't form a RecordChild or CheckChildType for child #'s over 7, we don't
Chris Lattner [Tue, 16 Mar 2010 00:35:11 +0000 (00:35 +0000)]
don't form a RecordChild or CheckChildType for child #'s over 7, we don't
have enums for them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98597 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWrap a long line and add some parens to be consistent.
Bob Wilson [Tue, 16 Mar 2010 00:31:15 +0000 (00:31 +0000)]
Wrap a long line and add some parens to be consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98596 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the third (and last known) case of code update problems due
Chris Lattner [Tue, 16 Mar 2010 00:29:39 +0000 (00:29 +0000)]
Fix the third (and last known) case of code update problems due
to LLVM IR changes with addr label weirdness.  In the testcase, we
generate references to the two bb's when codegen'ing the first
function:

_test1:                                 ## @test1
leaq Ltmp0(%rip), %rax
..
leaq Ltmp1(%rip), %rax

Then continue to codegen the second function where the blocks
get merged.  We're now smart enough to emit both labels, producing
this code:

_test_fun:                              ## @test_fun
## BB#0:                                ## %entry
Ltmp1:                                  ## Block address taken
Ltmp0:
## BB#1:                                ## %ret
movl $-1, %eax
ret

Rejoice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98595 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
Daniel Dunbar [Mon, 15 Mar 2010 23:51:06 +0000 (23:51 +0000)]
MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
 - Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue.
 - This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98592 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRecognize code for doing vector gather/scatter index calculations with
Dan Gohman [Mon, 15 Mar 2010 23:23:03 +0000 (23:23 +0000)]
Recognize code for doing vector gather/scatter index calculations with
32-bit indices. Instead of shuffling each element out of the index vector,
when all indices are needed, just store the input vector to the stack and
load the elements out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98588 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTranslate "cc" clobber in ARM inline assembly to ARM::CCRRegisterClass.
Bob Wilson [Mon, 15 Mar 2010 23:09:18 +0000 (23:09 +0000)]
Translate "cc" clobber in ARM inline assembly to ARM::CCRRegisterClass.
Radar 7459078.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98586 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSkip debug info intrinsics.
Devang Patel [Mon, 15 Mar 2010 22:23:03 +0000 (22:23 +0000)]
Skip debug info intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98584 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external...
Daniel Dunbar [Mon, 15 Mar 2010 21:56:50 +0000 (21:56 +0000)]
MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external relocations, but we don't have x86_64 relocations yet).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98583 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/Mach-O: Add MCSectionMachO::getType()
Daniel Dunbar [Mon, 15 Mar 2010 21:56:38 +0000 (21:56 +0000)]
MC/Mach-O: Add MCSectionMachO::getType()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98582 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSkip debug info intrinsics.
Devang Patel [Mon, 15 Mar 2010 21:25:29 +0000 (21:25 +0000)]
Skip debug info intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98581 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNow that the default for Darwin platforms is to place the LSDA into the TEXT
Bill Wendling [Mon, 15 Mar 2010 21:09:38 +0000 (21:09 +0000)]
Now that the default for Darwin platforms is to place the LSDA into the TEXT
section, remove the target-specific code that performs this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98580 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement support for the case when a reference to a addr-of-bb
Chris Lattner [Mon, 15 Mar 2010 20:39:00 +0000 (20:39 +0000)]
Implement support for the case when a reference to a addr-of-bb
label is generated, but then the block is deleted.  Since the
value is undefined, we just emit the label right after the entry
label of the function.  It might matter that the label is in the
same section as the function was afterall.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98579 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse Mang->getSymbol()
Chris Lattner [Mon, 15 Mar 2010 20:37:57 +0000 (20:37 +0000)]
use Mang->getSymbol()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98578 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse Mang->getSymbol() more.
Chris Lattner [Mon, 15 Mar 2010 20:37:38 +0000 (20:37 +0000)]
use Mang->getSymbol() more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98577 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtend MemoryBuffer::getFile() to take an optional "stat" structure
Douglas Gregor [Mon, 15 Mar 2010 20:32:14 +0000 (20:32 +0000)]
Extend MemoryBuffer::getFile() to take an optional "stat" structure
pointer. If given, the structure will be set with the stat information from
the file actually read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98575 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCreate SDDbgValue for dbg_value intrinsics and remember its connections with DAG...
Devang Patel [Mon, 15 Mar 2010 19:15:44 +0000 (19:15 +0000)]
Create SDDbgValue for dbg_value intrinsics and remember its connections with DAG nodes.
This is a work in progress. Patch by Dale Johannesen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98568 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the case when a reference to an address taken BB is emitted in one
Chris Lattner [Mon, 15 Mar 2010 19:09:43 +0000 (19:09 +0000)]
Fix the case when a reference to an address taken BB is emitted in one
function, then the BB is RAUW'd before the definition is emitted.  There
are still two cases not being handled, but this should improve us back to
the situation before I touched anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98566 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIn "empty" bb, the return instruction may not be first instruction, if dbg value...
Devang Patel [Mon, 15 Mar 2010 19:05:46 +0000 (19:05 +0000)]
In "empty" bb, the return instruction may not be first instruction, if dbg value intrinsics are present in this bb. Use terminator to find return instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98565 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPlace the LSDA into the TEXT section for x86 Darwin. If the global it's pointing
Bill Wendling [Mon, 15 Mar 2010 19:04:37 +0000 (19:04 +0000)]
Place the LSDA into the TEXT section for x86 Darwin. If the global it's pointing
to is local to the translation unit, we need to place fill the value of that
symbol into the non-lazy pointer.

This should conclude all Darwin changes for placing the LSDA into the TEXT
section. There is some cleanup to do. I.e., there's no longer a special need for
target-specific code here. But that can come later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98564 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid sibcall optimization if either caller or callee is using sret semantics.
Evan Cheng [Mon, 15 Mar 2010 18:54:48 +0000 (18:54 +0000)]
Avoid sibcall optimization if either caller or callee is using sret semantics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98561 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert r98550, it isn't necessary or sufficient.
Chris Lattner [Mon, 15 Mar 2010 18:42:01 +0000 (18:42 +0000)]
revert r98550, it isn't necessary or sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98558 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEmit dwarf variable info communicated by code generator through DBG_VALUE machine...
Devang Patel [Mon, 15 Mar 2010 18:33:46 +0000 (18:33 +0000)]
Emit dwarf variable info communicated by code generator through DBG_VALUE machine instructions.
This is a work in progress.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98556 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't eliminate address-taken blocks here.
Chris Lattner [Mon, 15 Mar 2010 16:37:42 +0000 (16:37 +0000)]
don't eliminate address-taken blocks here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98550 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSIGN_EXTEND from the same type as the dest is valid.
Chris Lattner [Mon, 15 Mar 2010 16:15:56 +0000 (16:15 +0000)]
SIGN_EXTEND from the same type as the dest is valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98548 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosink the call to VT.getSizeInBits() down into its uses,
Chris Lattner [Mon, 15 Mar 2010 16:05:15 +0000 (16:05 +0000)]
sink the call to VT.getSizeInBits() down into its uses,
not all unary nodes necessarily have a simple result type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98547 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTreat copysignl like the other copysign functions.
Duncan Sands [Mon, 15 Mar 2010 14:01:44 +0000 (14:01 +0000)]
Treat copysignl like the other copysign functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98542 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't save a temporary string into a StringRef field.
Jeffrey Yasskin [Mon, 15 Mar 2010 06:59:21 +0000 (06:59 +0000)]
Don't save a temporary string into a StringRef field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98538 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix MCSectionELF to not leak memory, just like I did for MCSymbol.
Chris Lattner [Mon, 15 Mar 2010 06:23:52 +0000 (06:23 +0000)]
fix MCSectionELF to not leak memory, just like I did for MCSymbol.
MCSectionMachO is already fine (yay for fixed size arrays?),
MCSectionCOFF still leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98537 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a memory leak yjasskin pointed out: MCSymbol is bump pointer
Chris Lattner [Mon, 15 Mar 2010 06:15:35 +0000 (06:15 +0000)]
fix a memory leak yjasskin pointed out: MCSymbol is bump pointer
allocated and thus not freed.  This is cool except that it contains
and std::string so the string data didn't get freed.  In any case
there is no reason to redundantly store the string data in the
MCSymbol anyway, just make the MCSymbol ref the string data in the
MCContext StringMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98536 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoeliminate some #if 0 code I added in r96905, type inference
Chris Lattner [Mon, 15 Mar 2010 06:03:22 +0000 (06:03 +0000)]
eliminate some #if 0 code I added in r96905, type inference
now enforces that input/output named values have hte same type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98535 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCompletely rewrite tblgen's type inference mechanism,
Chris Lattner [Mon, 15 Mar 2010 06:00:16 +0000 (06:00 +0000)]
Completely rewrite tblgen's type inference mechanism,
changing the primary datastructure from being a
"std::vector<unsigned char>" to being a new TypeSet class
that actually has (gasp) invariants!

This changes more things than I remember, but one major
innovation here is that it enforces that named input
values agree in type with their output values.

This also eliminates code that transparently assumes (in
some cases) that SDNodeXForm input/output types are the
same, because this is wrong in many case.

This also eliminates a bug which caused a lot of ambiguous
patterns to go undetected, where a register class would
sometimes pick the first possible type, causing an
ambiguous pattern to get arbitrary results.

With all the recent target changes, this causes no
functionality change!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98534 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMachineMove ctor doesn't need to to mutate input, add 'const'
Chris Lattner [Mon, 15 Mar 2010 05:55:35 +0000 (05:55 +0000)]
MachineMove ctor doesn't need to to mutate input, add 'const'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98533 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodo some serious surgery on CellSPU to get it back into a world
Chris Lattner [Mon, 15 Mar 2010 05:53:47 +0000 (05:53 +0000)]
do some serious surgery on CellSPU to get it back into a world
where it uses types consistently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98532 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a few more ambiguous types.
Chris Lattner [Mon, 15 Mar 2010 05:53:30 +0000 (05:53 +0000)]
fix a few more ambiguous types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98531 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some missing types
Chris Lattner [Mon, 15 Mar 2010 05:35:37 +0000 (05:35 +0000)]
add some missing types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98530 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTell Valgrind when we modify already-executed machine code so it knows
Jeffrey Yasskin [Mon, 15 Mar 2010 04:57:55 +0000 (04:57 +0000)]
Tell Valgrind when we modify already-executed machine code so it knows
to re-instrument the code.  We depend on the system valgrind.h to
avoid adding a new license.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98529 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agovarious cleanups from daniel
Chris Lattner [Mon, 15 Mar 2010 04:12:21 +0000 (04:12 +0000)]
various cleanups from daniel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98528 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix an ambiguous pattern, contrary to expectations, scalar_to_vector
Chris Lattner [Mon, 15 Mar 2010 00:52:43 +0000 (00:52 +0000)]
fix an ambiguous pattern, contrary to expectations, scalar_to_vector
doesn't have a type constraint on the scalar because we don't have
an 'sAny' type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98527 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove dead method.
Chris Lattner [Mon, 15 Mar 2010 00:00:42 +0000 (00:00 +0000)]
remove dead method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98526 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't forget to close a FD on an error condition, found by
Chris Lattner [Sun, 14 Mar 2010 23:16:45 +0000 (23:16 +0000)]
don't forget to close a FD on an error condition, found by
cppcheck, PR6617.  Patch by Ettl Martin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98525 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up and expound more on how half-float works.
Chris Lattner [Sun, 14 Mar 2010 23:03:31 +0000 (23:03 +0000)]
tidy up and expound more on how half-float works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98524 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy indentation
Chris Lattner [Sun, 14 Mar 2010 22:44:11 +0000 (22:44 +0000)]
tidy indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98523 91177308-0d34-0410-b5e6-96231b3b80d8