Commit Graph

17987 Commits

Author SHA1 Message Date
Evan Cheng 603e49c6da Move rematerialization out of beta.
llvm-svn: 35419
2007-03-28 08:26:40 +00:00
Zhou Sheng c2d3309b99 Use UnknownBIts[BitWidth-1] instead of UnknownBIts & SignBits.
llvm-svn: 35418
2007-03-28 05:15:57 +00:00
Zhou Sheng 18570b1f14 Remove unused APInt variable.
llvm-svn: 35414
2007-03-28 03:02:21 +00:00
Reid Spencer b7e45e705a Regenerate.
llvm-svn: 35411
2007-03-28 02:37:40 +00:00
Reid Spencer 2e35a58838 Replace the "implementation" keyword with "checkpoint". This more accurately
describes its function as check against unresolved types and definitions.
This is handy for forcing error messages in assembly test cases or otherwise
ensuring that everything is resolved at that point in the assembly.

llvm-svn: 35410
2007-03-28 02:36:42 +00:00
Zhou Sheng 57e3f7324b Clean up codes in ComputeMaskedBits():
1. Line out nested use of zext/trunc.
2. Make more use of getHighBitsSet/getLowBitsSet.
3. Use APInt[] != 0 instead of "(APInt & SignBit) != 0".

llvm-svn: 35408
2007-03-28 02:19:03 +00:00
Evan Cheng 4388043b25 Scale 1 is always ok.
llvm-svn: 35407
2007-03-28 01:55:52 +00:00
Evan Cheng c2cba18f2b Remove isLegalAddressImmediate.
llvm-svn: 35406
2007-03-28 01:53:55 +00:00
Reid Spencer 6d8e75ddb2 No need to generate the implementation keyword any more. Its frivolous.
llvm-svn: 35405
2007-03-28 01:53:20 +00:00
Evan Cheng 07c42d43a2 GEP index sinking fixes:
1) Take address scale into consideration. e.g. i32* -> scale 4.
2) Examine all the users of GEP.
3) Generalize to inter-block GEP's (no longer uses loopinfo).
4) Don't do xform if GEP has other variable index(es).

llvm-svn: 35403
2007-03-28 01:49:39 +00:00
Reid Spencer a5c18bf798 For PR1280:
When converting an add/xor/and triplet into a trunc/sext, only do so if the
intermediate integer type is a bitwidth that the targets can handle.

llvm-svn: 35400
2007-03-28 01:36:16 +00:00
Evan Cheng b41697c006 Fix for PR1279. Dead def has a live interval of length 1. Copy coalescing should
not violate that.

llvm-svn: 35396
2007-03-28 01:30:37 +00:00
Bill Wendling 2338e21b2b Remove cruft I put in there...
llvm-svn: 35394
2007-03-28 01:02:54 +00:00
Chris Lattner c56e4920d2 Fix a problem building llvm-gcc on amd64-unknown-freebsd6.2, due to the
system assembler not groking legal instructions like "leal (,%esi,8), %ecx".

llvm-svn: 35393
2007-03-28 00:58:40 +00:00
Bill Wendling ad2db4a4cf Unbreak mmx arithmetic. It was barfing trying to do v8i8 arithmetic.
llvm-svn: 35392
2007-03-28 00:57:11 +00:00
Bill Wendling 999c77f89c Add the "unpack low packed data" instructions. This should be the last of
the MMX instructions that are needed...

llvm-svn: 35389
2007-03-27 21:20:36 +00:00
Devang Patel 5a1bd4045d Use SmallPtrSet.
llvm-svn: 35388
2007-03-27 20:50:46 +00:00
Bill Wendling 6dff51ae65 Fix so that pandn is emitted instead of an xor/and combo. Add integer
comparison operators.

llvm-svn: 35385
2007-03-27 20:22:40 +00:00
Evan Cheng a4ed8a512a Unbreaks non-debug builds.
llvm-svn: 35383
2007-03-27 16:44:48 +00:00
Lauro Ramos Venancio 682baf2dda "The C standards do say that "char" may either be a "signed char" or "unsigned
char" and it is up to the compilers implementation or the platform which is
followed."
http://www.arm.linux.org.uk/docs/faqs/signedchar.php

llvm-svn: 35382
2007-03-27 16:33:08 +00:00
Lauro Ramos Venancio 143b0dff31 bugfix: sometimes the spiller puts a load between the "mov lr, pc" and "bx" of a CALL_NOLINK.
llvm-svn: 35381
2007-03-27 16:19:21 +00:00
Anton Korobeynikov 37a0bfe128 Remove dead code
llvm-svn: 35380
2007-03-27 12:05:48 +00:00
Anton Korobeynikov 3a9d68181a Split big monster into small helpers. No functionality change.
llvm-svn: 35379
2007-03-27 11:29:11 +00:00
Evan Cheng c42406b5ad SDISel does not preserve all, it changes CFG and other info.
llvm-svn: 35376
2007-03-27 00:53:36 +00:00
Evan Cheng fdbdf43632 Don't call getOperandConstraint() if operand index is greater than
TID->numOperands.

llvm-svn: 35375
2007-03-27 00:48:28 +00:00
Devang Patel 2850c677af Spell check.
llvm-svn: 35374
2007-03-27 00:16:08 +00:00
Reid Spencer 54d5b1b8f8 Implement some minor review feedback.
llvm-svn: 35373
2007-03-26 23:58:26 +00:00
Reid Spencer 441486c172 For PR1271:
Fix another incorrectly converted shift mask.

llvm-svn: 35371
2007-03-26 23:45:51 +00:00
Devang Patel 4398e242dd Reduce malloc/free traffic.
llvm-svn: 35370
2007-03-26 23:19:29 +00:00
Devang Patel bea581d70c It is not possible to determie dominance between two PHI nodes
based on their ordering.

llvm-svn: 35369
2007-03-26 23:18:28 +00:00
Devang Patel 55566a972c Use std::vector<DFCalculateWorkObject> instead of
std::vector<DFCalculateWorkObject *> to reduce malloc/free traffic.

llvm-svn: 35368
2007-03-26 23:17:19 +00:00
Evan Cheng 7dbbd00b06 findRegisterUseOperand() changed.
llvm-svn: 35366
2007-03-26 22:41:48 +00:00
Evan Cheng 4a09b1b5be Fix for PR1266. Don't mark a two address operand IsKill.
llvm-svn: 35365
2007-03-26 22:40:42 +00:00
Evan Cheng ec3ac316e2 Change findRegisterUseOperand() to return operand index instead.
llvm-svn: 35363
2007-03-26 22:37:45 +00:00
Dale Johannesen fd18a0cdf4 Fix reversed logic in getRegsUsed. Rename RegStates to RegsAvailable to
hopefully forestall similar errors.

llvm-svn: 35362
2007-03-26 22:23:54 +00:00
Chris Lattner d2602d5054 eliminate use of std::set
llvm-svn: 35361
2007-03-26 20:40:50 +00:00
Reid Spencer e20090b88d Add a comment to explain a folding transform.
llvm-svn: 35360
2007-03-26 20:09:02 +00:00
Reid Spencer 755d0e7ffc Get better debug output by having modified instructions print both the
original and new instruction. A slight performance hit with ostringstream
but it is only for debug.
Also, clean up an uninitialized variable warning noticed in a release build.

llvm-svn: 35358
2007-03-26 17:44:01 +00:00
Reid Spencer 769a5a8e0b Get the number of bits to set in a mask correct for a shl/lshr transform.
llvm-svn: 35357
2007-03-26 17:18:58 +00:00
Bill Wendling 158f6092a2 Promote to v1i64 type...
llvm-svn: 35353
2007-03-26 08:03:33 +00:00
Bill Wendling 48a24419bf Updated.
llvm-svn: 35352
2007-03-26 07:55:58 +00:00
Bill Wendling 98d2104c6f Add support for the v1i64 type. This makes better code for this:
#include <mmintrin.h>

extern __m64 C;

void baz(__v2si *A, __v2si *B)
{
  *A = C;
  _mm_empty();
}

We get this:

_baz:
        call "L1$pb"
"L1$pb":
        popl %eax
        movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax
        movq (%eax), %mm0
        movl 4(%esp), %eax
        movq %mm0, (%eax)
        emms
        ret

GCC gives us this:

_baz:
        pushl   %ebx
        call    L3
"L00000000001$pb":
L3:
        popl    %ebx
        subl    $8, %esp
        movl    L_C$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax
        movl    (%eax), %edx
        movl    4(%eax), %ecx
        movl    16(%esp), %eax
        movl    %edx, (%eax)
        movl    %ecx, 4(%eax)
        emms
        addl    $8, %esp
        popl    %ebx
        ret

llvm-svn: 35351
2007-03-26 07:53:08 +00:00
Evan Cheng 8275f0e0af SIGN_EXTEND_INREG requires one extra operand, a ValueType node.
llvm-svn: 35350
2007-03-26 07:12:51 +00:00
Reid Spencer 50898607a9 For PR1271:
Fix SingleSource/Regression/C/2003-05-21-UnionBitFields.c by changing a
getHighBitsSet call to getLowBitsSet call that was incorrectly converted
from the original lshr constant expression.

llvm-svn: 35348
2007-03-26 05:25:00 +00:00
Dale Johannesen e5866e7b89 Look through bitcast when finding IVs. (Chris' patch really.)
llvm-svn: 35347
2007-03-26 03:01:27 +00:00
Reid Spencer 52830327e9 For PR1271:
Remove a use of getLowBitsSet that caused the mask used for replacement of
shl/lshr pairs with an AND instruction to be computed incorrectly. Its not
clear exactly why this is the case. This solves the disappearing shifts
problem, but it doesn't fix Regression/C/2003-05-21-UnionBitFields. It
seems there is more going on.

llvm-svn: 35342
2007-03-25 21:11:44 +00:00
Chris Lattner 9bf53ffaa2 implement Transforms/InstCombine/cast2.ll:test3 and PR1263
llvm-svn: 35341
2007-03-25 20:43:09 +00:00
Reid Spencer 624766f8a2 Some cleanup from review:
* Don't assume shift amounts are <= 64 bits
* Avoid creating an extra APInt in SubOne and AddOne by using -- and ++
* Add another use of getLowBitsSet
* Convert a series of if statements to a switch

llvm-svn: 35339
2007-03-25 19:55:33 +00:00
Anton Korobeynikov 7037826c86 First step of switch lowering refactoring: perform worklist-driven
strategy, emit JT's where possible.

llvm-svn: 35338
2007-03-25 15:07:15 +00:00
Anton Korobeynikov e8ac2fce97 Fix authorship
llvm-svn: 35337
2007-03-25 13:44:26 +00:00