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

37021 Commits

Author SHA1 Message Date
Chris Lattner
938747fc7f Now that tblgen can handle matching implicit defs of instructions
to input patterns, we can fix X86ISD::CMP and X86ISD::BT as taking
two inputs (which have to be the same type) and *returning an i32*.
This is how the SDNodes get made in the graph, but we weren't able
to model it this way due to deficiencies in the pattern language.

Now we can change things like this:

 def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP,
-                  [(X86cmp RFP80:$lhs, RFP80:$rhs),
-                   (implicit EFLAGS)]>; // CC = ST(0) cmp ST(i)
+                  [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>;

and fix terrible crimes like this:

-def : Pat<(parallel (X86cmp GR8:$src1, 0), (implicit EFLAGS)),
+def : Pat<(X86cmp GR8:$src1, 0),
           (TEST8rr GR8:$src1, GR8:$src1)>;

This relies on matching the result of TEST8rr (which is EFLAGS, which is
an implicit def) to the result of X86cmp, an i32.

llvm-svn: 98903
2010-03-19 00:01:11 +00:00
Bob Wilson
5c35e064e5 Update comment to refer to the right filename.
llvm-svn: 98902
2010-03-18 23:57:57 +00:00
Chris Lattner
09704dc656 tidy up
llvm-svn: 98901
2010-03-18 23:57:57 +00:00
Anton Korobeynikov
eeae840ed7 Get rid of target-specific fp <-> int nodes when still I'm here.
llvm-svn: 98889
2010-03-18 22:35:45 +00:00
Anton Korobeynikov
23c07f492e Get rid of target-specific nodes for fp16 <-> fp32 conversion.
llvm-svn: 98888
2010-03-18 22:35:37 +00:00
Anton Korobeynikov
f07111ada7 Refactor Reg-Reg copy emission routine for ARM. This makes cross-regclass copies weirdness more straightforward. Also, add GPR <-> SPR copy support.
llvm-svn: 98887
2010-03-18 22:35:02 +00:00
Eric Christopher
eb546c4d7d Couple of changes that Dan mentioned for llvm.stackprotector fast-isel.
llvm-svn: 98881
2010-03-18 21:58:33 +00:00
Daniel Dunbar
1a50b05aff X86MCCodeEmitter: Fix two minor issues with reloc_riprel_4byte_movq_load, we
were missing it on some movq instructions and were not including the appropriate
PCrel bias.

llvm-svn: 98880
2010-03-18 21:53:54 +00:00
Chris Lattner
87af55dfd6 fix some buggy ops concatentation
llvm-svn: 98869
2010-03-18 21:06:54 +00:00
Chris Lattner
09143aa2b0 use ins/outs.
llvm-svn: 98866
2010-03-18 20:55:18 +00:00
Chris Lattner
2560ce9976 outs come before ins.
llvm-svn: 98864
2010-03-18 20:50:06 +00:00
Eric Christopher
37a2274c91 Make fast-isel understand llvm.stackprotector.
llvm-svn: 98862
2010-03-18 20:27:26 +00:00
Bob Wilson
504b4c8243 Refactor NEON ld/st instructions to hardcode class arguments that are constants.
No functional changes.

llvm-svn: 98860
2010-03-18 20:18:39 +00:00
Daniel Dunbar
ab14df376a MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement a
temporary workaround for matching inc/dec on x86_64 to the correct instruction.
 - This hack will eventually be replaced with a robust mechanism for handling
   matching instructions based on the available target features.

llvm-svn: 98858
2010-03-18 20:06:02 +00:00
Chris Lattner
bf3e096258 fix an x86-64 encoding bug Daniel found.
llvm-svn: 98855
2010-03-18 20:04:36 +00:00
Dan Gohman
b24354fcf7 Simplify this code.
llvm-svn: 98853
2010-03-18 19:34:33 +00:00
Dan Gohman
ff37afdc4b Define placement new wrappers for BumpPtrAllocator and
RecyclingAllocator to allow client code to be simpler, and
simplify several clients.

llvm-svn: 98847
2010-03-18 18:49:47 +00:00
Bob Wilson
a8b566d854 Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() to
always create a new jump table.  The intention was to avoid merging jump
tables in SelectionDAGBuilder, and to wait for the branch folding pass to
merge tables.  Unfortunately, the same getJumpTableIndex() method is also
used to merge tables in branch folding, so as a result of this change
branch tables are never merged.  Worse, the branch folding code is expecting
getJumpTableIndex to always return the index of an existing table, but with
this change, it never does so.  In at least some cases, e.g., pr6543, this
creates references to non-existent tables.

I've fixed the problem by adding a new createJumpTableIndex function, which
will always create a new table, and I've changed getJumpTableIndex to only
look at existing tables.

llvm-svn: 98845
2010-03-18 18:42:41 +00:00
Chris Lattner
45ab55ccec add a special relocation type for movq loads for object
files that produce special relocation types where the 
linker changes movq's into lea's.

llvm-svn: 98839
2010-03-18 18:10:56 +00:00
Dan Gohman
76da319f8f Add explicit braces to avoid ambiguous ‘else’.
llvm-svn: 98838
2010-03-18 18:07:13 +00:00
Chris Lattner
0be133bc3d callq is pcrelative
llvm-svn: 98835
2010-03-18 17:52:22 +00:00
Bob Wilson
cc9d5b7093 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.

llvm-svn: 98831
2010-03-18 16:52:15 +00:00
Devang Patel
dd5c1fcba9 Fix comment.
llvm-svn: 98830
2010-03-18 16:41:16 +00:00
Dan Gohman
8f98d70a9b 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.

llvm-svn: 98829
2010-03-18 16:16:38 +00:00
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