Commit Graph

43147 Commits

Author SHA1 Message Date
Chris Lattner c5afd12557 even more simplifications. ARM MCInstLowering is now just
a single function instead of a class.  It doesn't need the
complexity that X86 does.

llvm-svn: 119070
2010-11-14 20:58:38 +00:00
Chris Lattner 18442f5543 more shrinkification
llvm-svn: 119068
2010-11-14 20:41:53 +00:00
Chris Lattner 3040e8c69b more simplifications.
llvm-svn: 119067
2010-11-14 20:40:08 +00:00
Chris Lattner b28e691657 simplify and tidy up
llvm-svn: 119066
2010-11-14 20:31:06 +00:00
Chris Lattner 0dcd800b22 implement basic support for memory operands and crbit operands,
this fixes 3 more ppc tests.

llvm-svn: 119065
2010-11-14 20:22:56 +00:00
Chris Lattner 9488143769 implement several trivial operand printers, reducing
failures in CodeGen/PowerPC from 120 -> 117

llvm-svn: 119063
2010-11-14 20:11:21 +00:00
Chris Lattner 7a5c57ecf4 Implement support for printing register and immediate operands,
add support for darwin vs aix syntax.  We now can print instructions
like this:

	add r3, r3, r4
	blr 

and (in aix mode):
	add 3, 3, 4
	blr 

llvm-svn: 119062
2010-11-14 20:02:39 +00:00
Chris Lattner 686a095d89 stub out PPCMCInstLowering, add a new option that uses it and the new
instprinter when -enable-ppc-inst-printer is passed to llc.

llvm-svn: 119061
2010-11-14 19:53:02 +00:00
Rafael Espindola b05ef7377a Fix the type of a symbol created with .comm and no corresponding .type.
llvm-svn: 119060
2010-11-14 19:40:55 +00:00
Chris Lattner a76eab433a stub out a powerpc MCInstPrinter implementation.
llvm-svn: 119059
2010-11-14 19:40:38 +00:00
Chris Lattner 66031ed839 move all the target's asmprinters into the main target. The piece
that should be split out is the InstPrinter (if a target is mc'ized).
This change makes all the targets be consistent.

llvm-svn: 119056
2010-11-14 18:43:56 +00:00
Duncan Sands b99f39b9f6 If dom tree information is available, make it possible to pass
it to get better phi node simplification.

llvm-svn: 119055
2010-11-14 18:36:10 +00:00
Chris Lattner 56477d1690 move PPCAsmPrinter into the main PPC library, like ARM and X86.
llvm-svn: 119054
2010-11-14 18:33:33 +00:00
Chris Lattner dab307c6f4 fix cmake
llvm-svn: 119053
2010-11-14 18:27:11 +00:00
Chris Lattner 9007c368c6 remove JIT support from the Alpha backend. The JIT will be moving to MC,
and the Alpha backend isn't MCized yet.  Approved by Andrew.

llvm-svn: 119051
2010-11-14 18:24:41 +00:00
Chris Lattner 57479f5ce9 random acts of tidiness.
llvm-svn: 119049
2010-11-14 18:09:50 +00:00
Duncan Sands 4581ddc123 Teach InstructionSimplify about phi nodes. I chose to have it simply
offload the work to hasConstantValue rather than do something more
complicated (such handling mutually recursive phis) because (1) it is
not clear it is worth it; and (2) if it is worth it, maybe such logic
would be better placed in hasConstantValue.  Adjust some GVN tests
which are now cleaned up much further (eg: all phi nodes are removed).

llvm-svn: 119043
2010-11-14 13:30:18 +00:00
Duncan Sands 1d27f01210 Boost the power of phi node constant folding slightly: if all
operands are the phi node itself or undef, then return undef.
This logic already existed at a higher level so in practice it
shouldn't make the slightest difference.  Note that this code
could be replaced by a call to PN->hasConstantValue().  However
since we bail out the moment we see a non-constant operand, it
is more efficient to have a specialized version of that logic.

llvm-svn: 119041
2010-11-14 12:53:18 +00:00
Duncan Sands 7e800d6f9c Strip trailing whitespace.
llvm-svn: 119038
2010-11-14 11:23:23 +00:00
Owen Anderson e0f6b41618 Second attempt at providing correct encodings for Thumb2 binary operators.
llvm-svn: 119029
2010-11-14 05:37:38 +00:00
Rafael Espindola 7d0ba3464e Handle a peculiar comdat case: Creating a section with an undefined
signature symbol causes a local symbol to be created unless there is
some other use of the symbol.

llvm-svn: 119026
2010-11-14 04:17:37 +00:00
Rafael Espindola 0e3decfcf7 Simplify getSymbolIndexInSymbolTable by setting the actual index of
the symbols.

llvm-svn: 119022
2010-11-14 03:12:24 +00:00
Rafael Espindola eba9022652 Fix warning.
llvm-svn: 119021
2010-11-14 01:34:31 +00:00
Peter Collingbourne feea10bcdf Recognise 32-bit ror-based bswap implementation used by uclibc
llvm-svn: 119007
2010-11-13 19:54:30 +00:00
Peter Collingbourne 1c6437a62a Support ; as asm separator
llvm-svn: 119006
2010-11-13 19:54:23 +00:00
Duncan Sands 641baf1646 Generalize the reassociation transform in SimplifyCommutative (now renamed to
SimplifyAssociativeOrCommutative) "(A op C1) op C2" -> "A op (C1 op C2)",
which previously was only done if C1 and C2 were constants, to occur whenever
"C1 op C2" simplifies (a la InstructionSimplify).  Since the simplifying operand
combination can no longer be assumed to be the right-hand terms, consider all of
the possible permutations.  When compiling "gcc as one big file", transform 2
(i.e. using right-hand operands) fires about 4000 times but it has to be said
that most of the time the simplifying operands are both constants.  Transforms
3, 4 and 5 each fired once.  Transform 6, which is an existing transform that
I didn't change, never fired.  With this change, the testcase is now optimized
perfectly with one run of instcombine (previously it required instcombine +
reassociate + instcombine, and it may just have been luck that this worked).

llvm-svn: 119002
2010-11-13 15:10:37 +00:00
Duncan Sands e5ac78e16e Fix typo pointed out by Trevor Harmon.
llvm-svn: 119001
2010-11-13 12:16:27 +00:00
Bill Wendling 9430eb489c Comment out the defms until they're activated.
llvm-svn: 119000
2010-11-13 11:20:05 +00:00
Bill Wendling 705ec77ab5 Add uses of the *_ldst_multi multiclasses. These aren't used yet.
llvm-svn: 118999
2010-11-13 10:57:02 +00:00
Bill Wendling c4c642832d Convert the modes to lower case.
llvm-svn: 118998
2010-11-13 10:43:34 +00:00
Bill Wendling f2fa04acfc Minor cleanups:
- Get the opcode once.
- Add a ParserMatchClass to reglist.

llvm-svn: 118997
2010-11-13 10:40:19 +00:00
Bill Wendling e69afc6bb7 Add *_ldst_mult multiclasses to the ARM back-end. These will be used in the
future to separate out the ia, ib, da, db variants of the load/store multiple
instructions.

llvm-svn: 118995
2010-11-13 09:09:38 +00:00
Daniel Dunbar fe0c28f4db MC: Simplify Mach-O and ELF object writer implementations.
- What was I thinking?????

llvm-svn: 118992
2010-11-13 07:33:40 +00:00
Wesley Peck 82471189b7 Fixed error and re-enabled MBlaze MC disassembler tests.
llvm-svn: 118987
2010-11-13 05:48:21 +00:00
Evan Cheng 79ff5238e9 Conditional moves are slightly more expensive than moves.
llvm-svn: 118985
2010-11-13 05:14:20 +00:00
Rafael Espindola 2d006b1ade Fix warning and add support for printing gnu_unique_object.
llvm-svn: 118981
2010-11-13 04:55:06 +00:00
Rafael Espindola 4bcf94c75a Parse and record the gnu_unique_object type.
llvm-svn: 118980
2010-11-13 04:51:02 +00:00
Rafael Espindola f01b622902 Parse and remember discriminators in .loc line. I try to output them with
another patch.
This lets us parse a bit more of the gcc 4.5 output.

llvm-svn: 118975
2010-11-13 03:18:27 +00:00
Daniel Dunbar 868e3f0977 JIT: More nitty style tweakage, aka territory marking.
llvm-svn: 118973
2010-11-13 02:48:57 +00:00
Daniel Dunbar 2ed3fe08e9 report_fatal_error: Simplify a possible ambiguity.
llvm-svn: 118972
2010-11-13 02:48:51 +00:00
Wesley Peck b3099e6863 1. Adding test cases for MBlaze MC disassembler.
2. Fixing several errors in disassembler uncovered by test cases.
3. Fixing invalid encoding of PCMPEQ and PCMPNE uncovered by test cases.

llvm-svn: 118969
2010-11-13 02:37:59 +00:00
Evan Cheng 2bcb8daa44 Add conditional move of large immediate.
llvm-svn: 118968
2010-11-13 02:25:14 +00:00
Jim Grosbach 1aa5863a3e Swap multiclass operand order for consistency with other patterns.
llvm-svn: 118965
2010-11-13 01:28:30 +00:00
Jim Grosbach 69fd90e661 Continue ARM indexed load refactoring. Multiclass for LDR{B} pre/post indexed
instructions.

llvm-svn: 118963
2010-11-13 01:07:20 +00:00
Rafael Espindola 1d37f35eea Fix the encoding of negative line deltas.
llvm-svn: 118962
2010-11-13 01:06:27 +00:00
Daniel Dunbar 4a92fcb9fd Fix some more 80-col violas.
llvm-svn: 118959
2010-11-13 00:55:45 +00:00
Daniel Dunbar e4f4743409 Fix 80-col violation / non-sensicalness.
llvm-svn: 118958
2010-11-13 00:55:42 +00:00
Jim Grosbach 2f790749e8 More ARM load/store indexed refactoring. Also fix an incorrect IndexMode
flag for the LDRT/STRT family instructions as a side effect.

llvm-svn: 118955
2010-11-13 00:35:48 +00:00
Dan Gohman 1279fc47f9 Revert r118917, which is implicated in the llvm-gcc-i386-linux-selfhost failure.
llvm-svn: 118954
2010-11-13 00:31:40 +00:00
Evan Cheng 8ce967e393 Fix an obvious typo which inverted an immediate.
llvm-svn: 118951
2010-11-13 00:27:47 +00:00