Commit Graph

18122 Commits

Author SHA1 Message Date
Zhou Sheng
1c5d163634 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-31 02:50:26 +00:00
Zhou Sheng
b9cb95f8e3 Use APInt operators to calculate the carry bits, remove this loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35524 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-31 02:38:39 +00:00
Bill Wendling
db5c993121 Match GCC's MMX calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35523 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-31 01:03:53 +00:00
Chris Lattner
31442f9dc5 Add a -print-lsr-output option to LLC, to print the output of the LSR pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-31 00:24:43 +00:00
Chris Lattner
c9addb7488 implement the new addressing mode description hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35521 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 23:15:24 +00:00
Chris Lattner
1436bb657d add one addressing mode description hook to rule them all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 23:14:50 +00:00
Dale Johannesen
2041a0ef75 Fix incorrect combination of different loads. Reenable zext-over-truncate
combination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35517 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 21:38:07 +00:00
Evan Cheng
7cb33c8652 Don't add the same MI to register reuse "last def/use" twice if it reads the
register more than once.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 20:21:35 +00:00
Evan Cheng
2f52457539 Bug fix for PR1279. When isDead is propagate by copy coalescing, we keep length
of dead def live interval at 1 to avoid multiple def's targeting the same
register. The previous patch missed a case where the source operand is live-in.
In that case, remove the whole interval.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 20:18:35 +00:00
Zhou Sheng
302748dd30 Make sure the use of ConstantInt::getZExtValue() for shift amount safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 17:20:39 +00:00
Reid Spencer
97e0c22330 For PR1293:
* Rename the FunctionType* parameter from M to FT on all the functions.
* Implement a fix for PR1293 by just asserting that library functions that
  must return pointers should have pointer typed results. This just makes
  sure that we don't attempt to use an uninitialized integer or something
  later on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 16:41:50 +00:00
Zhou Sheng
0e2d3ac0f8 1. Make sure the use of ConstantInt::getZExtValue() for getting shift
amount is safe.
2. Use new method on ConstantInt instead of (? :) operator.
3. Use new method uge() on ConstantInt to simplify codes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 09:29:48 +00:00
Zhou Sheng
90b9681886 Use APInt operation instead of ConstantExpr::getXX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 05:45:18 +00:00
Reid Spencer
0d60b5a543 For PR1289: Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35500 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 01:37:39 +00:00
Reid Spencer
cd5bd90a7b For PR1289:
Check at the end of the parse that there are no unresolved types and no
undefined values. Issue errors if there are. This gets rid of the need
for implementation or checkpoint by ensuring you can't finish a parse with
undefined things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 01:37:13 +00:00
Bill Wendling
e2501b303c Add MMX calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 00:35:22 +00:00
Evan Cheng
87c6c9abb3 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35480 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 21:40:13 +00:00
Evan Cheng
5e3c203cfd Can't re-materialize mov r, imm in thumb since mov would clobber the condition code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 21:38:31 +00:00
Reid Spencer
1ea733db9d Use the stat information in the Path object, if it is already obtained. This
avoids a call to ::fstat by MappedFile when the file size information was
already obtained by the Path object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 19:11:22 +00:00
Reid Spencer
8475ec068c For PR789:
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 19:05:44 +00:00
Chris Lattner
f735f7b3ac the bytecode reader supports dematerializeFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:58:08 +00:00
Reid Spencer
3025dfd5b5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:50:01 +00:00
Reid Spencer
a5005c077b Give users a grace period on the implementation keyword. This *will* get
removed in a few days.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:49:28 +00:00
Jeff Cohen
e2cd2a0b4b MS C does have inlining after all, just uses _inline instead of inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35467 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:42:21 +00:00
Jeff Cohen
84892be310 Determine absolute paths the correct way :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35464 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:27:38 +00:00
Reid Spencer
4031befb62 Add a uniqueID field to the FileStatus structure for Paths. This will map
to the inode number on Unix and something far less unique on Windows. The
windows case needs to be improved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:00:31 +00:00
Reid Spencer
5ba2b702c2 For PR789:
Updates for change in interface of getFileStatus method of sys::Path class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35458 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 16:48:16 +00:00
Reid Spencer
69cce815e7 For PR789:
* Add a method: bool isAbsolute() const, which determines if the path name
  is absolute or not.
* Implement caching of file status information in the Path object. Allow it
  to be updated forcefully or lazily re-fetched from the cached value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 16:43:20 +00:00
Zhou Sheng
290bec5c15 1. Make more use of APInt::getHighBitsSet/getLowBitsSet.
2. Let APInt variable do the binary operation stuff instead of using
   ConstantExpr::getXXX.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35450 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 08:15:12 +00:00
Evan Cheng
b0b6c76ffe Disable load width reduction xform of variant (zext (truncate load x)) for
big endian targets until llvm-gcc build issue has been resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35449 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 07:56:46 +00:00
Evan Cheng
616cc663da Add support for hidden visibility to darwin/arm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35448 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 07:49:34 +00:00
Zhou Sheng
d48653a3ab Clean up some codes in InstCombiner::SimplifyDemandedBits().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35446 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 04:45:55 +00:00
Evan Cheng
974777868c New entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35445 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 02:48:56 +00:00
Zhou Sheng
01542f3d80 Clean up codes in InstCombiner::SimplifyDemandedBits():
1. Line out nested call of APInt::zext/trunc.
2. Make more use of APInt::getHighBitsSet/getLowBitsSet.
3. Use APInt[] operator instead of expression like "APIntVal & SignBit".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35444 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 02:26:30 +00:00
Zhou Sheng
97b52c260f 1. Make the APInt variable do the binary operation stuff if possible
instead of using ConstantExpr::getXX.
2. Use constant reference to APInt if possible instead of expensive
   APInt copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 01:57:21 +00:00
Jeff Cohen
ab47895c6b Fix C Backend to generate code that works with Microsoft C for the benefit of
front ends that do not depend on the GCC runtime (someday...).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35441 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 23:08:37 +00:00
Bill Wendling
03179060ee Made this into a bug report: PR1286
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35439 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 19:07:34 +00:00
Anton Korobeynikov
f6e9353e1a Oops :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35438 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 18:38:33 +00:00
Anton Korobeynikov
33bf8c44dd Don't allow MatchAddress recurse too much. This trims exponential
behaviour in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35437 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 18:36:33 +00:00
Chris Lattner
6ef3307062 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35435 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 18:17:19 +00:00
Chris Lattner
995f55036f Compile CodeGen/X86/lea-3.ll:test2 to:
_test3:
        leaq (,%rdi,4), %rax
        orq %rdi, %rax
        ret

instead of:
_test2:
        movq %rdi, %rax
        shlq $2, %rax
        orq %rdi, %rax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35434 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 18:12:31 +00:00
Zhou Sheng
34a4b38cbd Avoid unnecessary APInt construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35431 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 17:38:21 +00:00
Chris Lattner
e9a61234ce Dan pointed out that this is done, remove it!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35430 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 17:26:52 +00:00
Scott Michel
6461bbfc50 First test check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35429 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 17:04:43 +00:00
Zhou Sheng
e9e03f6b76 1. Make more use of getLowBitsSet/getHighBitsSet.
2. Use APInt[] instead of "X & SignBit".
3. Clean up some codes.
4. Make the expression like "ShiftAmt = ShiftAmtC->getZExtValue()" safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35424 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 15:02:20 +00:00
Devang Patel
9dea3a340a It is not possible to determine dominance between two PHI nodes
based on their ordering. This is applicable to ETForest::dominates() also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 14:57:43 +00:00
Zhou Sheng
e82fca09bf 1. Make more use of getLowBitsSet/getHighBitsSet.
2. Make the APInt value do the zext/trunc stuff instead of using
   ConstantExpr::getZExt().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35422 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 09:19:01 +00:00
Evan Cheng
197d19d11c Notes on re-materialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 08:30:04 +00:00
Evan Cheng
2005a02f32 Move rematerialization out of beta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35419 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 08:26:40 +00:00
Zhou Sheng
4acf155af3 Use UnknownBIts[BitWidth-1] instead of UnknownBIts & SignBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 05:15:57 +00:00