1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

36997 Commits

Author SHA1 Message Date
Benjamin Kramer
bad76b004a Try to fix a valgrind error on 32 bit platforms: use %zu instead of %llu to format a size_t.
llvm-svn: 98819
2010-03-18 12:18:36 +00:00
Evan Cheng
5ace6fffac Turning off post-ra scheduling for x86. It isn't a consistent win.
llvm-svn: 98810
2010-03-18 06:55:42 +00:00
Dan Gohman
69cd222c14 Reapply r98755 with a thinko which miscompiled gengtype fixed.
llvm-svn: 98793
2010-03-18 01:17:13 +00:00
Daniel Dunbar
8b149ce7fd MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will need this for accessing to symbol modifiers.
llvm-svn: 98791
2010-03-18 00:59:10 +00:00
Daniel Dunbar
26cbc4b1a3 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.

llvm-svn: 98789
2010-03-18 00:58:53 +00:00
Jakob Stoklund Olesen
d35fc676e4 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.

llvm-svn: 98784
2010-03-18 00:23:47 +00:00
Evan Cheng
41730fc7c8 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.
llvm-svn: 98780
2010-03-17 23:58:35 +00:00
Devang Patel
9ad039e65f Debug info intrinsic does not intefer during tail call optimization.
llvm-svn: 98778
2010-03-17 23:52:37 +00:00
Johnny Chen
b1d61d9be1 Revert 98745 with respect to the addition of NEONFrm subformats for disassembly.
There is a better way coming up.

llvm-svn: 98777
2010-03-17 23:26:50 +00:00
Jakob Stoklund Olesen
e05919807e 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.

llvm-svn: 98776
2010-03-17 23:21:58 +00:00
Johnny Chen
08d7095c33 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.

llvm-svn: 98775
2010-03-17 23:14:23 +00:00
Johnny Chen
5c58c86098 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.

llvm-svn: 98774
2010-03-17 23:01:59 +00:00
Bob Wilson
2fcf1547f2 Clean up whitespace.
llvm-svn: 98769
2010-03-17 21:16:45 +00:00
Bob Wilson
aa67850cc5 Increase format field from 5 to 6 bits. ARMII::FormMask was increased to 0x3f
in svn r74988 but the format field was never widened.

llvm-svn: 98768
2010-03-17 21:13:43 +00:00
Benjamin Kramer
35de5cfb4c Initialize Size member to appease valgrind.
llvm-svn: 98763
2010-03-17 19:55:31 +00:00
Dan Gohman
f9a688a249 Revert 98755, which may be causing trouble.
llvm-svn: 98762
2010-03-17 19:54:53 +00:00
Dan Gohman
d90131eff2 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.

llvm-svn: 98755
2010-03-17 18:51:01 +00:00
Johnny Chen
7cea0e9dd5 98745 contains something unrelated to the patch.
Remove it from ARMAddressingModes.h.

llvm-svn: 98751
2010-03-17 18:32:39 +00:00
Johnny Chen
0212e0df47 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]

llvm-svn: 98745
2010-03-17 17:52:21 +00:00
Devang Patel
4df8850a32 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*.
llvm-svn: 98743
2010-03-17 17:29:55 +00:00
Jeffrey Yasskin
58964f4bee 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.

llvm-svn: 98716
2010-03-17 07:08:12 +00:00
Chris Lattner
962d3d700b fix GetOrCreateTemporarySymbol to require a name, clients
should use CreateTempSymbol() if they don't care about the
name.

llvm-svn: 98712
2010-03-17 05:41:18 +00:00
Bob Wilson
7a9bf0aa55 Remove a check that can no longer be true, after r84803.
llvm-svn: 98694
2010-03-16 23:40:32 +00:00
Bob Wilson
3778e7f389 Revert 98683. It is breaking something in the disassembler.
llvm-svn: 98692
2010-03-16 23:01:13 +00:00
Evan Cheng
fb978ca2c5 Fix liveintervals handling of dbg_value instructions.
llvm-svn: 98686
2010-03-16 21:51:27 +00:00
Bob Wilson
79f10e6233 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.

llvm-svn: 98683
2010-03-16 21:44:40 +00:00
Chris Lattner
cf7f134913 reapply r98656 unmodified, which exposed the asmprinter not
handling constant unions.

llvm-svn: 98680
2010-03-16 21:25:55 +00:00
Johnny Chen
54bb1efbe0 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.

llvm-svn: 98679
2010-03-16 21:25:05 +00:00
Chris Lattner
b51960824f add asmprinter suport for unions, fixing Feature/unions.ll to actually
be doing something useful.

llvm-svn: 98677
2010-03-16 21:21:35 +00:00
Devang Patel
16c77b14f2 Ignore debug value instructions while analyzing BB for tail duplication.
llvm-svn: 98675
2010-03-16 21:02:07 +00:00
Benjamin Kramer
94c90c236b str[r]chr returns its pointer argument so we cannot mark it as nocapture. Thanks to Duncan for spotting my mistake.
llvm-svn: 98671
2010-03-16 20:33:15 +00:00
Benjamin Kramer
4b48f8274f Mark str[r]chr readonly.
llvm-svn: 98663
2010-03-16 19:36:43 +00:00
Daniel Dunbar
faade5305c Revert r98656, its breaking all over the place.
llvm-svn: 98662
2010-03-16 19:35:34 +00:00
Chris Lattner
7a96045d0a improve support for uniontype and ConstantUnion, patch by Tim Northover!
llvm-svn: 98656
2010-03-16 19:15:03 +00:00
Bob Wilson
aee6e76a7d Remove redundant writeback flag in ARM addressing mode 5.
llvm-svn: 98648
2010-03-16 18:38:09 +00:00
Bob Wilson
279818d473 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.

llvm-svn: 98643
2010-03-16 17:46:45 +00:00
Bob Wilson
92cb518b94 Fix unused variable warnings.
llvm-svn: 98642
2010-03-16 17:44:45 +00:00
Bob Wilson
34aca030c5 --- 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

llvm-svn: 98640
2010-03-16 16:59:47 +00:00
Johnny Chen
ff030064fb 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]

llvm-svn: 98637
2010-03-16 16:36:54 +00:00
Bob Wilson
67c88e4977 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.

llvm-svn: 98635
2010-03-16 16:19:07 +00:00
Chris Lattner
b91b5cdb03 fix the same bug on the x86-64 side of the fence.
llvm-svn: 98616
2010-03-16 06:39:08 +00:00
Chris Lattner
53210a1f20 fix the encoding of TAILJMPd. This fixes Benchmarks/Olden/bisort
with the integrated assembler!

llvm-svn: 98615
2010-03-16 06:30:18 +00:00
Jeffrey Yasskin
4eb3242b81 Avoid a memory leak in JITDebugRegisterer.
llvm-svn: 98612
2010-03-16 05:54:54 +00:00
Bill Wendling
44b1fe3ee1 Use getFirstTerminator().
llvm-svn: 98604
2010-03-16 02:01:51 +00:00
Bill Wendling
5f6361464d 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.

llvm-svn: 98599
2010-03-16 01:05:35 +00:00
Bob Wilson
cb28bed4f6 Wrap a long line and add some parens to be consistent.
llvm-svn: 98596
2010-03-16 00:31:15 +00:00
Chris Lattner
adff4d133f 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.

llvm-svn: 98595
2010-03-16 00:29:39 +00:00
Daniel Dunbar
241d3cb048 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.

llvm-svn: 98592
2010-03-15 23:51:06 +00:00
Dan Gohman
db6002b964 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.

llvm-svn: 98588
2010-03-15 23:23:03 +00:00
Bob Wilson
ac5881b842 Translate "cc" clobber in ARM inline assembly to ARM::CCRRegisterClass.
Radar 7459078.

llvm-svn: 98586
2010-03-15 23:09:18 +00:00