1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

260 Commits

Author SHA1 Message Date
Chris Lattner
f25a9e1265 revert 93934, removing the MCAsmInfo endianness bit. I can't
stomache MCAsmInfo having this, and I found a better solution to
this layering issue.

llvm-svn: 93985
2010-01-20 06:34:14 +00:00
Chris Lattner
8e3badb9a7 give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
I really want clients of the streamer to be able to say "emit this
64-bit integer" and have it get broken down right by the streamer.

I may change this in the future, we'll see how it works out.

llvm-svn: 93934
2010-01-19 22:42:28 +00:00
Chris Lattner
377bd87849 Now that we have everything nicely factored (e.g. asmprinter is not
doing global variable classification anymore) and hookized, sink almost
all target targets global variable emission code into AsmPrinter and out
of each target.

Some notes:

1. PIC16 does completely custom and crazy stuff, so it is not changed.
2. XCore has some custom handling for extra directives.  I'll look at it next.
3. This switches linux/ppc to use .globl instead of .global.  If .globl is
   actually wrong, let me know and I'll fix it.
4. This makes linux/ppc get a lot of random cases right which were obviously
   wrong before, it is probably now a bit healthier.
5. Blackfin will probably start getting .comm and other things that it didn't
   before.  If this is undesirable, it should explicitly opt out of these
   things by clearing the relevant fields of MCAsmInfo.

This leads to a nice diffstat:
 14 files changed, 127 insertions(+), 830 deletions(-)

llvm-svn: 93858
2010-01-19 05:38:33 +00:00
Chris Lattner
86287085ba remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
llvm-svn: 93699
2010-01-18 00:37:40 +00:00
Chris Lattner
6f360c3c91 now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use 
<< instead, which is much simpler and cleaner.

llvm-svn: 93695
2010-01-17 21:43:43 +00:00
Chris Lattner
ea72cfbd42 eliminate uses of mangler and simplify code.
llvm-svn: 93615
2010-01-16 01:40:07 +00:00
Chris Lattner
40eb58664f MCize a bunch more stuff, eliminating a lot of uses of the mangler
and CurrentFnName.

llvm-svn: 93594
2010-01-16 00:21:18 +00:00
Ted Kremenek
89fb514857 Update CMake build.
llvm-svn: 93570
2010-01-15 22:59:11 +00:00
Anton Korobeynikov
8d5197ab8a zext / truncate is free on msp430. Inform codegen about this.
llvm-svn: 93556
2010-01-15 21:19:43 +00:00
Anton Korobeynikov
f1080f2bbe Add branch relaxation pass (shamelessly stolen from PPC).
llvm-svn: 93554
2010-01-15 21:19:05 +00:00
Anton Korobeynikov
75c93b4ec3 Provide instruction sizes & encoding. No opcodes yet (but not needed so far).
llvm-svn: 93553
2010-01-15 21:18:39 +00:00
Anton Korobeynikov
719dd1465f Enable bit tests and setcc stuff.
llvm-svn: 93552
2010-01-15 21:18:18 +00:00
Anton Korobeynikov
aaed919671 Add micro-optimization which allows us to fold imm into cmp. This allows us to save 1 word (sometimes) and reduce register pressure.
llvm-svn: 93551
2010-01-15 21:18:02 +00:00
Anton Korobeynikov
0ca5fcdfaa Add instruction formats & support stuff
llvm-svn: 93550
2010-01-15 21:17:13 +00:00
Anton Korobeynikov
fb1954f28d Fix cmp emission on msp430: we definitely should turn stuff like
"icmp lhs, rhs" into "cmp rhs, lhs". This should fix PR5979.

llvm-svn: 93496
2010-01-15 01:29:49 +00:00
Anton Korobeynikov
5eb86c0b47 Remove pseudo-MI in custom inserter.
llvm-svn: 93467
2010-01-14 22:09:11 +00:00
Dan Gohman
9bcfdf98f1 Change SelectCode's argument from SDValue to SDNode *, to make it more
clear what information these functions are actually using.

This is also a micro-optimization, as passing a SDNode * around is
simpler than passing a { SDNode *, int } by value or reference.

llvm-svn: 92564
2010-01-05 01:24:18 +00:00
Bill Wendling
5457c30e95 Mark variable used by 'assert' as 'unused'.
llvm-svn: 92198
2009-12-28 02:07:00 +00:00
Bill Wendling
a717566a5c Remove dead variable.
llvm-svn: 92197
2009-12-28 02:05:36 +00:00
Anton Korobeynikov
89d281c7c3 Mark FPW as allocable when frame address is taken.
llvm-svn: 91841
2009-12-21 20:18:49 +00:00
John McCall
923cb2d8d7 Pass the error string directly to llvm_unreachable instead of the residual
(0 && "error").  Rough consensus seems to be that g++ *should* be diagnosing
this because the pointer makes it not an ICE in c++03.  Everyone agrees that
the current standard is silly and null-pointer-ness should not be based on
ICE-ness.  Excellent fight scene in Act II, denouement weak, two stars.

llvm-svn: 91644
2009-12-18 00:27:18 +00:00
Anton Korobeynikov
fddfe4d096 Do not allow uninitialize access during debug printing
llvm-svn: 91232
2009-12-13 01:00:32 +00:00
Anton Korobeynikov
5cd169e17e Implement variable-width shifts.
No testcase yet - it seems we're exposing generic codegen bugs.

llvm-svn: 91221
2009-12-12 18:55:37 +00:00
Anton Korobeynikov
724c82337f Lower setcc branchless, if this is profitable.
Based on the patch by Brian Lucas!

llvm-svn: 91175
2009-12-11 23:01:29 +00:00
Anton Korobeynikov
0ace515a4c Reduce (cmp 0, and_su (foo, bar)) into (bit foo, bar). This saves extra instruction. Patch inspired by Brian Lucas!
llvm-svn: 90819
2009-12-08 01:03:04 +00:00
Anton Korobeynikov
615499bd84 Some pretty-printing
llvm-svn: 90742
2009-12-07 02:28:41 +00:00
Anton Korobeynikov
d01ed4146b Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
llvm-svn: 90740
2009-12-07 02:28:10 +00:00
Anton Korobeynikov
71b92ae4e0 Initial codegen support for MSP430 ISRs
llvm-svn: 90739
2009-12-07 02:27:53 +00:00
Anton Korobeynikov
02fa40119e Add ability to select hw multiplier mode and select appropriate libcalls.
llvm-svn: 90737
2009-12-07 02:27:08 +00:00
Dan Gohman
f9654e9258 Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.

llvm-svn: 90634
2009-12-05 00:44:40 +00:00
Chris Lattner
9ce833945e improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!

llvm-svn: 90365
2009-12-03 00:50:42 +00:00
Anton Korobeynikov
5511c0260f Minor optimization: when doing eq/ne comparions and RHS is a constant - swap operands, this will allow us to fold imm into comparison.
llvm-svn: 89574
2009-11-22 01:14:08 +00:00
Anton Korobeynikov
10669b8c42 Drop unsupported imm operands
llvm-svn: 89573
2009-11-22 01:13:54 +00:00
Anton Korobeynikov
44886c9a90 Use 2-byte alignment for functions. 4 bytes are clear overkill here.
llvm-svn: 89572
2009-11-22 01:13:39 +00:00
Anton Korobeynikov
9cea2b264c Use semicolon as assembler comment string
llvm-svn: 89571
2009-11-22 01:12:49 +00:00
Dan Gohman
ca4026afec Update for new getBlockAddress signature.
llvm-svn: 89507
2009-11-20 23:21:00 +00:00
David Greene
97a1f550d1 Move DebugInfo checks into EmitComments and remove them from
target-specific AsmPrinters.  Not all comments need DebugInfo.

Re-enable the line numbers comment test.

llvm-svn: 88697
2009-11-13 21:34:57 +00:00
David Greene
9934b1d063 Make the MachineFunction argument of getFrameRegister const.
This also fixes a build error.

llvm-svn: 87027
2009-11-12 21:00:03 +00:00
David Greene
58e7c6145b Add a bool flag to StackObjects telling whether they reference spill
slots.  The AsmPrinter will use this information to determine whether to
print a spill/reload comment.

Remove default argument values.  It's too easy to pass a wrong argument
value when multiple arguments have default values.  Make everything
explicit to trap bugs early.

Update all targets to adhere to the new interfaces..

llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Dan Gohman
4631d78a3b Set isBarrier = 1 on return instructions, as they are control barriers.
llvm-svn: 86851
2009-11-11 18:11:07 +00:00
Jeffrey Yasskin
23ac706aab Fix DenseMap iterator constness.
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.

The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.

Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.

Patch by Victor Zverovich!

llvm-svn: 86636
2009-11-10 01:02:17 +00:00
Anton Korobeynikov
552b831b91 Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!
llvm-svn: 86471
2009-11-08 15:33:12 +00:00
Anton Korobeynikov
ff23fbb6c0 Move OR patterns upper to all logical stuff. No functionality change.
llvm-svn: 86470
2009-11-08 15:32:44 +00:00
Anton Korobeynikov
79aadcfa1a Some nice peephole patterns. Based on patch by Brian Lucas!
llvm-svn: 86469
2009-11-08 15:32:28 +00:00
Anton Korobeynikov
aaf4cc8e92 Print tab before operand of jcc
llvm-svn: 86468
2009-11-08 15:32:11 +00:00
Anton Korobeynikov
6f4ee0efe1 Fix invalid operand updates & implement post-inc memory operands
llvm-svn: 86466
2009-11-08 14:27:38 +00:00
Chris Lattner
25421b6954 indicate what the native integer types for the target are.
Please verify.

llvm-svn: 86397
2009-11-07 19:07:32 +00:00
Anton Korobeynikov
123d792160 First try of the post-inc operands handling... Not fully worked, though :(
llvm-svn: 86386
2009-11-07 17:15:25 +00:00
Anton Korobeynikov
9dc741f523 Add some dummy support for post-incremented loads
llvm-svn: 86385
2009-11-07 17:15:06 +00:00
Anton Korobeynikov
0a13189111 Add 8 bit libcalls and make use of them for msp430
llvm-svn: 86384
2009-11-07 17:14:39 +00:00