Commit Graph

31084 Commits

Author SHA1 Message Date
Chris Lattner
d1440c429f add a testcase for x86
llvm-svn: 35516
2007-03-30 21:22:46 +00:00
Evan Cheng
1d78d3deeb New test case.
llvm-svn: 35515
2007-03-30 20:41:18 +00:00
Evan Cheng
9a2a7b174a Don't add the same MI to register reuse "last def/use" twice if it reads the
register more than once.

llvm-svn: 35513
2007-03-30 20:21:35 +00:00
Evan Cheng
48dd5e7d44 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.

llvm-svn: 35512
2007-03-30 20:18:35 +00:00
Evan Cheng
9ca63d605c Test case for PR1279 (part 2).
llvm-svn: 35511
2007-03-30 20:15:22 +00:00
Zhou Sheng
fd28a33031 Make sure the use of ConstantInt::getZExtValue() for shift amount safe.
llvm-svn: 35510
2007-03-30 17:20:39 +00:00
Zhou Sheng
02d3ac6895 Make sure this method just return value equal or less than Limit.
llvm-svn: 35509
2007-03-30 16:50:28 +00:00
Reid Spencer
8c3d3dce2b 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.

llvm-svn: 35508
2007-03-30 16:41:50 +00:00
Duncan Sands
3bf01520eb Remove reference to checkpoint.
llvm-svn: 35507
2007-03-30 16:09:58 +00:00
Duncan Sands
16f122e6ad Various hopefully correct easy fixes.
llvm-svn: 35506
2007-03-30 12:22:09 +00:00
Zhou Sheng
b25806fa5f 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.

llvm-svn: 35505
2007-03-30 09:29:48 +00:00
Duncan Sands
3dd14331ac Correct typo.
llvm-svn: 35504
2007-03-30 06:39:42 +00:00
Zhou Sheng
5e60a4a6b0 Use APInt operation instead of ConstantExpr::getXX.
llvm-svn: 35503
2007-03-30 05:45:18 +00:00
Zhou Sheng
9737575772 Rename and correct the method "greaterOrEqual".
llvm-svn: 35502
2007-03-30 05:10:59 +00:00
Zhou Sheng
12b3549f5d Add two utility methods into ConstantInt.
llvm-svn: 35501
2007-03-30 03:22:55 +00:00
Reid Spencer
ef01c47512 For PR1289: Regenerate
llvm-svn: 35500
2007-03-30 01:37:39 +00:00
Reid Spencer
cf2ccbff1a 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.

llvm-svn: 35499
2007-03-30 01:37:13 +00:00
Reid Spencer
3c401f0613 For PR1289:
Remove an unneeded instance of "implementation" that soon won't be supported.

llvm-svn: 35498
2007-03-30 01:35:32 +00:00
Bill Wendling
2fbcbc16b4 Add MMX calling conventions.
llvm-svn: 35489
2007-03-30 00:35:22 +00:00
Evan Cheng
045414aa8e New entry.
llvm-svn: 35480
2007-03-29 21:40:13 +00:00
Evan Cheng
cc44b1e743 Can't re-materialize mov r, imm in thumb since mov would clobber the condition code.
llvm-svn: 35479
2007-03-29 21:38:31 +00:00
Reid Spencer
d232f311cb Remove some non-sensical logic that prevented llvm-nm from working on any
file other than one named "-".

llvm-svn: 35478
2007-03-29 19:49:07 +00:00
Reid Spencer
c7f485fd71 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.

llvm-svn: 35477
2007-03-29 19:11:22 +00:00
Reid Spencer
200c6f9c3d 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.

llvm-svn: 35476
2007-03-29 19:05:44 +00:00
Chris Lattner
7c82675afa the bytecode reader supports dematerializeFunction
llvm-svn: 35475
2007-03-29 18:58:08 +00:00
Reid Spencer
b9d7f2a3ba checkpoint -> implementation. This really needs to just drop the need for
a keyword by having the assembler check for incomplete types and values
upon end-of-file.

llvm-svn: 35474
2007-03-29 18:56:58 +00:00
Reid Spencer
0833b81248 Regenerate.
llvm-svn: 35473
2007-03-29 18:50:01 +00:00
Reid Spencer
01a599a202 Give users a grace period on the implementation keyword. This *will* get
removed in a few days.

llvm-svn: 35472
2007-03-29 18:49:28 +00:00
Chris Lattner
c3f4d87c90 add a hook to demat functions.
llvm-svn: 35471
2007-03-29 18:30:26 +00:00
Chris Lattner
323a5137c6 don't build runtime for now, ever
llvm-svn: 35470
2007-03-29 18:14:00 +00:00
Jeff Cohen
68e93b7c44 MS C does have inlining after all, just uses _inline instead of inline.
llvm-svn: 35467
2007-03-29 17:42:21 +00:00
Jeff Cohen
54a781be7d getFileStatus has a new parameter (caught by VC++).
llvm-svn: 35466
2007-03-29 17:29:59 +00:00
Jeff Cohen
73926a5fb5 uniqueID is a uint64_t (caught by VC++)
llvm-svn: 35465
2007-03-29 17:28:31 +00:00
Jeff Cohen
60c5522467 Determine absolute paths the correct way :)
llvm-svn: 35464
2007-03-29 17:27:38 +00:00
Reid Spencer
d394617a55 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.

llvm-svn: 35461
2007-03-29 17:00:31 +00:00
Reid Spencer
858045e396 Don't forget to delete the FileStatus structure on destruction of Path.
llvm-svn: 35459
2007-03-29 16:50:49 +00:00
Reid Spencer
78b899f665 For PR789:
Updates for change in interface of getFileStatus method of sys::Path class.

llvm-svn: 35458
2007-03-29 16:48:16 +00:00
Reid Spencer
0f92f0e519 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.

llvm-svn: 35456
2007-03-29 16:43:20 +00:00
Reid Spencer
908f777886 Regenerate for PR1283 fix.
llvm-svn: 35452
2007-03-29 15:38:33 +00:00
Reid Spencer
1a48abc2d4 For PR1283:
Change the llvm-gcc sanity check to look for "target datalayout" instead
of "implementation". The implementation keyword is no longer generated
by llvm or llvm-gcc.

llvm-svn: 35451
2007-03-29 15:37:57 +00:00
Zhou Sheng
b3a80b1d70 1. Make more use of APInt::getHighBitsSet/getLowBitsSet.
2. Let APInt variable do the binary operation stuff instead of using
   ConstantExpr::getXXX.

llvm-svn: 35450
2007-03-29 08:15:12 +00:00
Evan Cheng
ccee35fd0d Disable load width reduction xform of variant (zext (truncate load x)) for
big endian targets until llvm-gcc build issue has been resolved.

llvm-svn: 35449
2007-03-29 07:56:46 +00:00
Evan Cheng
8f592160c0 Add support for hidden visibility to darwin/arm.
llvm-svn: 35448
2007-03-29 07:49:34 +00:00
Zhou Sheng
444af49cc0 Clean up some codes in InstCombiner::SimplifyDemandedBits().
llvm-svn: 35446
2007-03-29 04:45:55 +00:00
Evan Cheng
86de3a009d New entries.
llvm-svn: 35445
2007-03-29 02:48:56 +00:00
Zhou Sheng
a4475575c0 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".

llvm-svn: 35444
2007-03-29 02:26:30 +00:00
Zhou Sheng
4961cf1c06 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.

llvm-svn: 35443
2007-03-29 01:57:21 +00:00
Jeff Cohen
cc560c93eb 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...).

llvm-svn: 35441
2007-03-28 23:08:37 +00:00
Jeff Cohen
277a237520 Update to current situation.
llvm-svn: 35440
2007-03-28 20:27:51 +00:00
Bill Wendling
4ad38abd40 Made this into a bug report: PR1286
llvm-svn: 35439
2007-03-28 19:07:34 +00:00
Anton Korobeynikov
0ad22563b8 Oops :)
llvm-svn: 35438
2007-03-28 18:38:33 +00:00
Anton Korobeynikov
7522c9d8e1 Don't allow MatchAddress recurse too much. This trims exponential
behaviour in some cases.

llvm-svn: 35437
2007-03-28 18:36:33 +00:00
Chris Lattner
3d9c1bd9e2 Stop using the foo HTML tag :)
llvm-svn: 35436
2007-03-28 18:27:57 +00:00
Chris Lattner
2ba38c8711 add a note
llvm-svn: 35435
2007-03-28 18:17:19 +00:00
Chris Lattner
bcd38852f2 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

llvm-svn: 35434
2007-03-28 18:12:31 +00:00
Chris Lattner
17331da6bd new testcases
llvm-svn: 35433
2007-03-28 18:11:17 +00:00
Chris Lattner
66cb5db76f new testcase
llvm-svn: 35432
2007-03-28 18:03:14 +00:00
Zhou Sheng
117477e28b Avoid unnecessary APInt construction.
llvm-svn: 35431
2007-03-28 17:38:21 +00:00
Chris Lattner
a6527d6a61 Dan pointed out that this is done, remove it!
llvm-svn: 35430
2007-03-28 17:26:52 +00:00
Scott Michel
734077b1f0 First test check-in.
llvm-svn: 35429
2007-03-28 17:04:43 +00:00
Zhou Sheng
23f7a1c947 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.

llvm-svn: 35424
2007-03-28 15:02:20 +00:00
Devang Patel
0b013d578d It is not possible to determine dominance between two PHI nodes
based on their ordering. This is applicable to ETForest::dominates() also.

llvm-svn: 35423
2007-03-28 14:57:43 +00:00
Zhou Sheng
2777a31850 1. Make more use of getLowBitsSet/getHighBitsSet.
2. Make the APInt value do the zext/trunc stuff instead of using
   ConstantExpr::getZExt().

llvm-svn: 35422
2007-03-28 09:19:01 +00:00
Evan Cheng
d771485d89 Notes on re-materialization.
llvm-svn: 35420
2007-03-28 08:30:04 +00:00
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
Jeff Cohen
d578f1f87f Fix problem with llvm-config that prevented JIT from being used on x86_64
systems.

llvm-svn: 35416
2007-03-28 04:45:02 +00:00
Reid Spencer
8cd7e8190b Delete the remanant of an obsolete comment.
llvm-svn: 35415
2007-03-28 03:23:22 +00:00
Zhou Sheng
18570b1f14 Remove unused APInt variable.
llvm-svn: 35414
2007-03-28 03:02:21 +00:00
Reid Spencer
15316f9568 Undocument the implementation keyword
Docuemnt the checkpoint keyword

llvm-svn: 35413
2007-03-28 02:46:29 +00:00
Reid Spencer
44259a29c0 Remove use of implementation keyword.
llvm-svn: 35412
2007-03-28 02:38:26 +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
Reid Spencer
bad2921deb The implementation keyword was replaced with checkpoint.
llvm-svn: 35409
2007-03-28 02:34:53 +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
Reid Spencer
de7e7122cd implementation keyword is going .. going .. gone.
llvm-svn: 35404
2007-03-28 01:52:40 +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
Chris Lattner
4ba1036a34 don't use 'not' when we can use a positive test
llvm-svn: 35402
2007-03-28 01:43:43 +00:00
Reid Spencer
90bb12c2e7 new test case for PR1280
llvm-svn: 35401
2007-03-28 01:43:35 +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
Reid Spencer
94a8cb4b4e For PR1280:
Remove test cases for and/xor/add -> trunc/sext that use bit widths that
the targets cannot code gen.

llvm-svn: 35399
2007-03-28 01:35:28 +00:00
Evan Cheng
1f4acbfea9 Added a test case for PR1279.
llvm-svn: 35398
2007-03-28 01:32:57 +00:00
Chris Lattner
4776ebc195 new testcase
llvm-svn: 35397
2007-03-28 01:31:33 +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
Chris Lattner
ae0f8dcd61 upgrade a random test
llvm-svn: 35395
2007-03-28 01:27:12 +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
Chris Lattner
517886963f new testcase
llvm-svn: 35391
2007-03-28 00:03:10 +00:00
Tanya Lattner
b453c429af Fixing doxygen.cfg target. I'm not a makefile expert, so hopefully this correct.Tested doxygen generation on zion.
llvm-svn: 35390
2007-03-27 23:19:39 +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
Duncan Sands
62574103d1 Test that a VIEW_CONVERT_EXPR used as an lvalue has the right type.
llvm-svn: 35387
2007-03-27 20:27:25 +00:00
Bill Wendling
ce43379aac Add better support for keywords.
llvm-svn: 35386
2007-03-27 20:23:56 +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
Bill Wendling
5852729ce8 Add support for integer comparison builtins.
llvm-svn: 35384
2007-03-27 20:21:31 +00:00
Evan Cheng
a4ed8a512a Unbreaks non-debug builds.
llvm-svn: 35383
2007-03-27 16:44:48 +00:00