Commit Graph

5099 Commits

Author SHA1 Message Date
Duncan Sands
48a3e98c27 Correct typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 06:39:42 +00:00
Zhou Sheng
0642f75836 Rename and correct the method "greaterOrEqual".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35502 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 05:10:59 +00:00
Zhou Sheng
b422d2d9e5 Add two utility methods into ConstantInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-30 03:22:55 +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
a37ddb5296 add a hook to demat functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35471 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 18:30:26 +00:00
Jeff Cohen
b9681893c8 uniqueID is a uint64_t (caught by VC++)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:28:31 +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
a5cb38980b Don't forget to delete the FileStatus structure on destruction of Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35459 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 16:50:49 +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
Evan Cheng
caaf69107e Remove isLegalAddressImmediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35406 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 01:53:55 +00:00
Bill Wendling
b94827769a Add support for integer comparison builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35384 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-27 20:21:31 +00:00
Evan Cheng
32eb1f1ca4 Change findRegisterUseOperand() to return operand index instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35363 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 22:37:45 +00:00
Dale Johannesen
c6b9ef80a8 Fix reversed logic in getRegsUsed. Rename RegStates to RegsAvailable to
hopefully forestall similar errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35362 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 22:23:54 +00:00
Bill Wendling
eebc8a1bc5 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35351 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 07:53:08 +00:00
Chris Lattner
5eeb4b5bf6 Start value symbol tables out small (space for 16 elts), not huge (space for 512).
This is particularly useful for the JIT, which lazily deserializes functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35346 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 01:45:35 +00:00
Reid Spencer
f6bef488ee Compute getLowBitsSet correctly. Using the complement of a 64-bit value
and shifting down without regard for the bitwidth of the APInt can lead
to incorrect initialization values. Instead, check for the word size case
(to avoid undef results from shift) and then do (1 << loBitsSet) - 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35344 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-25 21:58:42 +00:00
Anton Korobeynikov
3a84b9baf6 First step of switch lowering refactoring: perform worklist-driven
strategy, emit JT's where possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35338 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-25 15:07:15 +00:00
Chris Lattner
4234f57fa0 switch TargetLowering::getConstraintType to take the entire constraint,
not just the first letter.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35322 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-25 02:14:49 +00:00
Reid Spencer
5b9f2d6186 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-25 01:13:46 +00:00
Reid Spencer
a1689ea60e Actually, for getHighBitsSet and getLowBitsSet, don't make a 0 bit size
illegal. Instead do the 0 valued construction for the user. This is because
the caller may not know (or care to check) that the number of bits set is
zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35315 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-25 00:01:47 +00:00
Reid Spencer
758d1bc919 Make it illegal to set 0 bits in getHighBitsSet and getLowBitsSet. For that
they should have used the uint64_t constructor. This avoids causing
undefined results via shifts by the word size when the bit width is an
exact multiple of the word size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35313 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 23:47:58 +00:00
Reid Spencer
5b7e659e22 In the getBitsSet function, don't optimize for a common case that is
already covered by getLowBitsSet (i.e. when loBits==0). Consequently, remove
the default value for loBits and reorder the arguments to the more natural
loBits, hiBits order. This makes it more clear that this function is for bit
groups in the middle of the bit width and not towards one end or the other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35312 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 23:42:47 +00:00
Reid Spencer
ca76fc2cd3 Don't invoke undefined behavior in shifts in the functions getHighBitsSet
and getLowBitsSet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 23:35:54 +00:00
Reid Spencer
8f969ee62c Implement the getBitsSet function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 23:27:48 +00:00
Reid Spencer
8da7d65b83 Implement the getHighBitsSet and getLowBitsSet functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35308 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 23:05:35 +00:00
Reid Spencer
013263f7b0 Get the signs in the right place!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35307 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 22:50:43 +00:00
Reid Spencer
d3af825d29 Undo the last change and make this really implement remainder and not
modulus. The previous change was a result of incorrect documentation in
the LangRef.html.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35305 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 22:37:23 +00:00
Reid Spencer
53c9520b23 Correct the implementation of srem to be remainder, not modulus. The sign of
the result must follow the sign of the divisor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35302 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 21:56:22 +00:00
Reid Spencer
7ac2f81e49 Clean up this interface:
1. Group similar methods into doxygen groups
2. Reorganize the groups into a consist flow.
3. Significantly improve the quality of the documentation on several methods
4. Rewrite srem and sdiv to eliminate a copy and improve readability.
5. Eliminate unneeded forward references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 18:09:18 +00:00
Chris Lattner
0d3988f408 add a valuetype for v1i64, which is needed by mmx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-24 17:36:26 +00:00
Bill Wendling
b172ab0533 This is dead. DEAD I tells you!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35291 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-23 22:42:04 +00:00
Bill Wendling
b8440a0c39 PR1260:
Add final support to get the QT example to compile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-23 22:35:46 +00:00
Dan Gohman
423c2260f9 Add the 'explicit' keyword to several constructors that accept one
argument that don't appear intended as implicit-conversion operators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35280 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-23 18:44:11 +00:00
Bill Wendling
02ced83ce7 We generate a shufflevector instruction, so we don't need the builtin
intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35269 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 20:29:26 +00:00
Jeff Cohen
c3c395cf5e Be more explicit concerning argument sizes.
Use VC++ byteswap intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35267 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 19:11:57 +00:00
Bill Wendling
a348c56fde Support added for shifts and unpacking MMX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 18:42:45 +00:00
Reid Spencer
ac86cc1b7e For PR1145:
Add the NoUnwindAttribute to allow explicit marking of functions that do
not unwind the stack via the unwind instruction. This is akin to gcc's
NoThrow attribute and used for optimizing exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35250 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 00:32:02 +00:00
Reid Spencer
3a3aacfe10 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-21 22:22:19 +00:00
Dale Johannesen
fa4bce2b76 repair x86 performance, dejagnu problems from previous change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-21 21:51:52 +00:00
Dale Johannesen
8e59e163db do not share old induction variables when this would result in invalid
instructions (that would have to be split later)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35227 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 21:54:54 +00:00
Dale Johannesen
69cb9b78f1 maintain LiveIn when splitting blocks (register scavenging needs it)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 21:35:06 +00:00
Devang Patel
58efcd3bcd LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35222 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 20:19:48 +00:00
Evan Cheng
2638e1a6b9 First cut trivial re-materialization support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35208 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 08:13:50 +00:00
Evan Cheng
bf2c8b3c96 Added MRegisterInfo hook to re-materialize an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35205 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 08:09:38 +00:00
Zhou Sheng
e51ffcf27f Correct the name: isStrictPositive --> isStrictlyPositive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35201 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 02:18:16 +00:00
Chris Lattner
b9174dd5dc Add a dtor to fix leaks from all clients of BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35200 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 02:10:56 +00:00
Reid Spencer
7fc44c8c5f Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35181 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 20:39:08 +00:00
Reid Spencer
95da121395 Add an indication of signedness to the uint64_t constructor so sign bits
can be extended. This helps fix test/Assembler/2007-03-19-NegValue.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35179 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 20:36:48 +00:00
Duncan Sands
d8197fd9d7 Fix obvious typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35164 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 14:25:02 +00:00
Evan Cheng
5d5c93f659 Add a TargetInstrDescriptor flag to mark an instruction as "re-materializable".
It means the instruction can be easily re-materialized at any point. e.g.
constant generation, load from constantpool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 06:19:16 +00:00