Commit Graph

37129 Commits

Author SHA1 Message Date
Dan Gohman
1584390e55 Add explicit braces to avoid ambiguous ‘else’.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98838 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 18:07:13 +00:00
Chris Lattner
e10038e54e callq is pcrelative
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98835 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 17:52:22 +00:00
Bob Wilson
35ee7d6e04 Check if function names start with "llvm." before trying to lookup them up as
intrinsics.  The intrinsic lookup code assumes that this check has been done
and assumes the names are at least 6 characters long.  Valgrind complained
about this.  pr6638.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98831 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 16:52:15 +00:00
Devang Patel
1ac2429d1f Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 16:41:16 +00:00
Dan Gohman
c93b4cff89 Add the ability to "intern" FoldingSetNodeID data into a
BumpPtrAllocator-allocated region to allow it to be stored in a more
compact form and to avoid the need for a non-trivial destructor call.

Use this new mechanism in ScalarEvolution instead of
FastFoldingSetNode to avoid leaking memory in the case where a
FoldingSetNodeID uses heap storage, and to reduce overall memory
usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98829 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 16:16:38 +00:00
Benjamin Kramer
7c97ed7d07 Try to fix a valgrind error on 32 bit platforms: use %zu instead of %llu to format a size_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 12:18:36 +00:00
Evan Cheng
bdc652bab8 Turning off post-ra scheduling for x86. It isn't a consistent win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98810 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 06:55:42 +00:00
Dan Gohman
f9e64729af Reapply r98755 with a thinko which miscompiled gengtype fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 01:17:13 +00:00
Daniel Dunbar
9a1d20042f MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will need this for accessing to symbol modifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98791 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 00:59:10 +00:00
Daniel Dunbar
0682951b4f MC/Darwin: Add a new target hook for whether the target uses "reliable" symbol differences, basically whether the assembler should attempt to understand atoms when using scattered symbols.
Also, avoid some virtual call overhead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 00:58:53 +00:00
Jakob Stoklund Olesen
ec1176a206 Revert "Change coalescer complexity from N^2 to N logN by changing one letter."
This reverts commit 98776. It broke the llvm-gcc boot strap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98784 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 00:23:47 +00:00
Evan Cheng
f3caa525cc X86 address mode matching code MatchAddressRecursively does some aggressive hack which require doing a RAUW. It may end up deleting some SDNode up stream. It should avoid referencing deleted nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98780 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 23:58:35 +00:00
Devang Patel
c3188ce0f1 Debug info intrinsic does not intefer during tail call optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98778 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 23:52:37 +00:00
Johnny Chen
6c8648b4c9 Revert 98745 with respect to the addition of NEONFrm subformats for disassembly.
There is a better way coming up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 23:26:50 +00:00
Jakob Stoklund Olesen
0427b2ac45 Change coalescer complexity from N^2 to N logN by changing one letter.
Remove ugly hack that aborted the coalescer before using N^2 time.

This affects functions with very complicated live intervals for physical
registers, i.e. functions with thousands of function calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98776 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 23:21:58 +00:00
Johnny Chen
b675e255d0 Fixed a bug in the IT mask printing where T means the cond bit in the mask
matches that of Firstcond[0] and E means otherwise.  The Firstcond[0] is also
tagged in the Mask to facilitate Asm printing.  The disassembler also depends
on this arrangement.  This is similar to what's described in A2.5.2 ITSTATE.

Ran:

utils/lit/lit.py test/CodeGen/ARM test/CodeGen/Thumb test/CodeGen/Thumb2

successfully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98775 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 23:14:23 +00:00
Johnny Chen
77bdc48eb6 Refines 98745 so that it only contains the patch related to the output of the
addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>.

This patch removes the impl of printT2AddrModeImm8s4OffsetOperand() from
ARMAsmPrinter.cpp.  It is used by disassembler as of now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 23:01:59 +00:00
Bob Wilson
87949d4d5a Clean up whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 21:16:45 +00:00
Bob Wilson
89ef7b797a Increase format field from 5 to 6 bits. ARMII::FormMask was increased to 0x3f
in svn r74988 but the format field was never widened.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 21:13:43 +00:00
Benjamin Kramer
e5636a3221 Initialize Size member to appease valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 19:55:31 +00:00
Dan Gohman
ebf78f18df Revert 98755, which may be causing trouble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 19:54:53 +00:00
Dan Gohman
0afc29c3e6 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
2010-03-17 18:51:01 +00:00
Johnny Chen
e6f83878bc 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
2010-03-17 18:32:39 +00:00
Johnny Chen
9e08876a2a 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
2010-03-17 17:52:21 +00:00
Devang Patel
5b33f3148c 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
2010-03-17 17:29:55 +00:00
Jeffrey Yasskin
b7ccf75de5 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
2010-03-17 07:08:12 +00:00
Chris Lattner
77e7694026 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
2010-03-17 05:41:18 +00:00
Bob Wilson
a1bdfc3c7f 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
2010-03-16 23:40:32 +00:00
Bob Wilson
a43e6bf690 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
2010-03-16 23:01:13 +00:00
Evan Cheng
4507f089d4 Fix liveintervals handling of dbg_value instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 21:51:27 +00:00
Bob Wilson
bb6c77e6b9 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
2010-03-16 21:44:40 +00:00
Chris Lattner
93b122d3c4 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
2010-03-16 21:25:55 +00:00
Johnny Chen
2b0272e43d 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
2010-03-16 21:25:05 +00:00
Chris Lattner
94c484d3b8 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
2010-03-16 21:21:35 +00:00
Devang Patel
cbe1e31732 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
2010-03-16 21:02:07 +00:00
Benjamin Kramer
2d7186ae6d 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
2010-03-16 20:33:15 +00:00
Benjamin Kramer
4446b04052 Mark str[r]chr readonly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 19:36:43 +00:00
Daniel Dunbar
b85c7100c5 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
2010-03-16 19:35:34 +00:00
Chris Lattner
8b3b34f410 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
2010-03-16 19:15:03 +00:00
Bob Wilson
2d357f6b44 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
2010-03-16 18:38:09 +00:00
Bob Wilson
ab3460519e 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
2010-03-16 17:46:45 +00:00
Bob Wilson
9e54b6ab3f Fix unused variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 17:44:45 +00:00
Bob Wilson
49d9dc4dd2 --- 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
2010-03-16 16:59:47 +00:00
Johnny Chen
d30a98e43a 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
2010-03-16 16:36:54 +00:00
Bob Wilson
ea7f22c31d 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
2010-03-16 16:19:07 +00:00
Chris Lattner
4d82068167 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
2010-03-16 06:39:08 +00:00
Chris Lattner
840e6371ea 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
2010-03-16 06:30:18 +00:00
Jeffrey Yasskin
6efed73eb5 Avoid a memory leak in JITDebugRegisterer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 05:54:54 +00:00
Bill Wendling
b0d27662ea Use getFirstTerminator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 02:01:51 +00:00
Bill Wendling
8fe347a8b5 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
2010-03-16 01:05:35 +00:00
Bob Wilson
8d95e0be13 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
2010-03-16 00:31:15 +00:00
Chris Lattner
999aee24c7 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
2010-03-16 00:29:39 +00:00
Daniel Dunbar
4e815f8a8c 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
2010-03-15 23:51:06 +00:00
Dan Gohman
1bbf72b069 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
2010-03-15 23:23:03 +00:00
Bob Wilson
33cc5cb983 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
2010-03-15 23:09:18 +00:00
Devang Patel
7b9f6b1b21 Skip debug info intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 22:23:03 +00:00
Daniel Dunbar
d6e59084d0 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
2010-03-15 21:56:50 +00:00
Daniel Dunbar
99d22adcad MC/Mach-O: Add MCSectionMachO::getType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 21:56:38 +00:00
Devang Patel
689fac0226 Skip debug info intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 21:25:29 +00:00
Bill Wendling
505ad8bed3 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
2010-03-15 21:09:38 +00:00
Chris Lattner
9cc0da9c29 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
2010-03-15 20:39:00 +00:00
Chris Lattner
034721eb6a use Mang->getSymbol()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 20:37:57 +00:00
Chris Lattner
4c6741f707 use Mang->getSymbol() more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 20:37:38 +00:00
Douglas Gregor
1bb30b6f75 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
2010-03-15 20:32:14 +00:00
Devang Patel
001903485f 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
2010-03-15 19:15:44 +00:00
Chris Lattner
0220ba7995 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
2010-03-15 19:09:43 +00:00
Devang Patel
ca70495797 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
2010-03-15 19:05:46 +00:00
Bill Wendling
757e75b033 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
2010-03-15 19:04:37 +00:00
Evan Cheng
a375d47137 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
2010-03-15 18:54:48 +00:00
Chris Lattner
88698f5dbc 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
2010-03-15 18:42:01 +00:00
Devang Patel
90a48adf9c 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
2010-03-15 18:33:46 +00:00
Chris Lattner
fc6e69bcb2 don't eliminate address-taken blocks here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 16:37:42 +00:00
Chris Lattner
ed7d10e100 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
2010-03-15 16:15:56 +00:00
Chris Lattner
7fb5c2dbec 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
2010-03-15 16:05:15 +00:00
Duncan Sands
87cd7ed408 Treat copysignl like the other copysign functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98542 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 14:01:44 +00:00
Chris Lattner
1f8008cf21 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
2010-03-15 06:23:52 +00:00
Chris Lattner
c28cc093e3 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
2010-03-15 06:15:35 +00:00
Chris Lattner
420c69da57 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
2010-03-15 05:53:47 +00:00
Chris Lattner
3d00578c95 fix a few more ambiguous types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98531 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 05:53:30 +00:00
Chris Lattner
4de35024bc add some missing types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 05:35:37 +00:00
Jeffrey Yasskin
f28411f732 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
2010-03-15 04:57:55 +00:00
Chris Lattner
77144e719f 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
2010-03-15 00:52:43 +00:00
Chris Lattner
a833f6b061 remove dead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 00:00:42 +00:00
Chris Lattner
cdff5f7787 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
2010-03-14 23:16:45 +00:00
Chris Lattner
149add0d28 tidy indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 22:44:11 +00:00
Chris Lattner
1c436d0b0b no really, all 64-bit cpu's have cmov support. This should
fix the rest of the buildbot failures on non-x86 hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 22:39:35 +00:00
Chris Lattner
1f84e32ada all 64-bit cpus have cmov, this should fix CodeGen/X86/cmov.ll
(at least) on non-x86 builders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 22:24:34 +00:00
Benjamin Kramer
1610d430be Remove pointless forward declaration, MSVC got confused by this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98519 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 22:00:28 +00:00
Duncan Sands
d2c817eff1 Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodes
with ppc_f128 type by having the type legalizer turn these back into a
call to copysignl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 21:08:40 +00:00
Evan Cheng
a8efe28a44 Rename SDDbgValue.h to SDNodeDbgValue.h for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 19:56:39 +00:00
Chris Lattner
c4a3f23b92 fix ShrinkDemandedOps to not leave dead nodes around,
fixing PR6607


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 19:46:02 +00:00
Chris Lattner
25e0ab9ae5 rewrite ShrinkDemandedOps to be faster and indent less,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 19:43:04 +00:00
Evan Cheng
700c71d2e8 Fix jit encoding bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 19:28:34 +00:00
Chris Lattner
552186dfd3 make -view-isel-dags print after the 'ShrinkDemandedOps' pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 19:27:55 +00:00
Chris Lattner
da0688e08a fix PR6605, X86ISD::CMP always returns i32 (EFLAGS), not
the operand type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:44:35 +00:00
Anton Korobeynikov
631379e79c Add substarget feature for FP16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:42:38 +00:00
Anton Korobeynikov
bec3dd25c7 Add codegen support for FP16 on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98502 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:42:31 +00:00
Anton Korobeynikov
927411b7ce Make default expansion for FP16 <-> FP32 nodes into libcalls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98501 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:42:24 +00:00
Anton Korobeynikov
be5b032e4b Add DAG nodes to represent FP16 <-> FP32 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98500 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:42:15 +00:00
Chris Lattner
314a113184 add support for pentium class CPUs which do not have cmov,
PR4841.  Patch by Craig Smith!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 18:31:44 +00:00