Commit Graph

48185 Commits

Author SHA1 Message Date
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Chris Lattner
8b8d31e3ec remove two methods that no longer exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:07:39 +00:00
Chris Lattner
01d9a1b78d more getting windows to build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74981 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:52:12 +00:00
Chris Lattner
a47d9669b7 eliminate the v[if]cmp versions of these tests, now that [if]cmp+sext works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:49:35 +00:00
Chris Lattner
b2773e1ada Change these tests to use [fi]cmp+sext instead of v[fi]cmp. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:46:57 +00:00
Chris Lattner
2b7a271c71 dag combine sext(setcc) -> vsetcc before legalize. To make this safe,
VSETCC must define all bits, which is different than it was documented
to before.  Since all targets that implement VSETCC already have this
behavior, and we don't optimize based on this, just change the 
documentation.  We now get nice code for vec_compare.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:31:33 +00:00
Chris Lattner
8e5a084d47 hopefully fix the build on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:29:32 +00:00
Evan Cheng
c9a4153eef Add a todo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:05:05 +00:00
Evan Cheng
0fc0ade095 Also statically set bit 25 for BR_JT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:45:10 +00:00
Owen Anderson
f81b57694b LLVMContext-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:43:39 +00:00
Evan Cheng
bc8a94540a Statically encode bit 25 to indicate immediate form of data processing instructions. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:40:25 +00:00
Bill Wendling
97b4d4a8b5 --- Reverse-merging (from foreign repository) r74952 into '.':
U    lib/Target/X86/X86RegisterInfo.cpp
U    lib/Target/X86/X86RegisterInfo.h

Temporarily revert. This was causing an infinite loop in the linker on Leopard.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:37:49 +00:00
Chris Lattner
a4f7318245 SelectionDAG::SignBitIsZero doesn't work right for vectors,
for now, conservatively return false.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:28:46 +00:00
Dale Johannesen
9fcff043fe Commit the file I actually changed as part of last
patch, instead of one I didn't.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:28:22 +00:00
Dale Johannesen
8ea5ec681b Operand of asm("call") (the callee function) is represented
as "X" constraint and "P" modifier on x86.  Make this work.
(Change may not be sufficient to fix it for non-Darwin, but
I'm pretty sure it won't break anything.)
gcc.apple/asm-block-32.c
gcc.apple/asm-block-33.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:26:33 +00:00
Chris Lattner
c2c27b3627 add support for legalizing an icmp where the result is illegal (4xi1) but
the input is legal (4 x i32)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:03:54 +00:00
Chris Lattner
cb178c61e4 add a trivial test that vector compares work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:51:09 +00:00
Chris Lattner
0a6c2d8dea random code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:49:15 +00:00
Chris Lattner
5962ed0a36 implement support for spliting and scalarizing vector setcc's. This
finishes off enough support for vector compares to get the icmp/fcmp
version of 2008-07-23-VSetCC.ll passing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:47:46 +00:00
Chris Lattner
9800e849c1 lower vector icmp/fcmp to ICMP/FCMP nodes with the right result
(vector of bool).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:41:32 +00:00
Chris Lattner
87c411b5cc ScalarizeVecRes_ShiftOp and ScalarizeVecRes_BinOp are the same,
eliminate the former.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:28:41 +00:00
Bob Wilson
cd8eb8b60a Change NEON vldN/vstN intrinsics to specify "N" as an immediate operand
instead of having a separate intrinsic for each value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:27:20 +00:00
Chris Lattner
64a3fa23f8 add support for vector legalizing of *_EXTEND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:27:17 +00:00
Jeffrey Yasskin
9a3b13fa9b Fix http://llvm.org/PR4481: Make llvm-config print the right include paths when
srcdir!=objdir.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:15:37 +00:00
Devang Patel
120505d5e7 Disable loop index split for now and let nightly tester verify its usefulness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74955 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:09:42 +00:00
Chris Lattner
33d6a3451b verify that the fcmp version of this works just as well as the
vfcmp version.  We actually get better code for this silly testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 22:07:47 +00:00
Devang Patel
261cc194d7 Accidently dropped this while removing dead code in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:55:14 +00:00
Bill Wendling
66c6324fcf DWARF requires frame moves be specified at specific times. If you have a
prologue like this:

__Z3fooi:
Leh_func_begin1:
LBB1_0: ## entry
        pushl   %ebp
Llabel1:
        movl    %esp, %ebp
Llabel2:
        pushl   %esi
Llabel3:
        subl    $20, %esp
        call    "L1$pb"
"L1$pb":
        popl    %esi

The "pushl %ebp" needs a table entry specifying the offset. The "movl %esp,
%ebp" makes %ebp the new stack frame register, so that needs to be specified in
DWARF. And "pushl %esi" saves the callee-saved %esi register, which also needs
to be specified in DWARF.

Before, all of this logic was in one method. This didn't work too well, because
as you can see there are multiple FDE line entries that need to be created.

This fix creates the "MachineMove" objects directly when they're needed; instead
of waiting until the end, and losing information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:53:07 +00:00
Owen Anderson
62e744b555 LLVMContext-ifiy the implementation of the C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:33:58 +00:00
Devang Patel
0a4afb6caf Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:12:32 +00:00
Owen Anderson
c9ab7bf98f LLVM Context-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:07:14 +00:00
Dan Gohman
18476eeb4a Fix a typo and a grammaro in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:47:48 +00:00
Evan Cheng
e253c951b3 Add Thumb2 movcc instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:39:03 +00:00
Evan Cheng
35bd43da76 Add missing tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74945 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:38:08 +00:00
Chris Lattner
4e4db7adfc Implement parsing support for the .comm directive. Patch by
Kevin Enderby!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:30:46 +00:00
Owen Anderson
74a77812d1 LLVMContext-ify the bitcode reader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:18:58 +00:00
Dan Gohman
f667e7ed18 Add a paragraph about the Add->FAdd API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:05:15 +00:00
Evan Cheng
1c83eb33c3 Add BX and BXr9 encodings. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 19:16:24 +00:00
Mike Stump
d33007eb5f Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:52:14 +00:00
Owen Anderson
ff6c91efcf Use LLVMContext in the LLLexer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74934 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:44:11 +00:00
Chris Lattner
151f369c53 fix a bug in post-order iterators with external storage, patch by
Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:43:48 +00:00
Chris Lattner
f5a1edce23 fix some type confusion in ReadVBR64: "Piece" should be only 32 bits,
not 64, because we read at most 32 bits at a time.  OTOH, "Result" must
be 64-bits and insertion into it must be 64-bit clean.  Thanks to Ivan
Sorokin for bringing this up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74932 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:39:49 +00:00
Owen Anderson
a9d1f2c559 Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:33:04 +00:00
Chris Lattner
fd15beefee Fix lli to print an error and exit when EE returns null but no string. Patch
by Eric Rannaud!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74930 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:31:09 +00:00
Chris Lattner
393aec6a44 "BinaryObject.h was implicitly converting between uint{16,32,64}_t to
uint8_t (via 'foo & 255'), i replaced this with an explicit (uint8_t)
cast which is equivalent, faster and more correct (silences
type-related warnings). Also, following coding standards I replaced
post-increment with pre-increment."

Patch by Ryan Flynn!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:28:00 +00:00
Bill Wendling
df225c0253 Remove unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:21:19 +00:00
Chris Lattner
a9b7d60d67 Eliminate the static constructors and locks from DynamicLibrary.cpp.
This fixes PR4512 and eliminating static ctors is always good.  Losing
thread safety is unfortunate, but the code is just incredibly poorly
designed.

If someone is interested, the "right" solution is to split
DynamicLibrary.cpp into two separate pieces: a stateless piece in
libsystem, and a simple support file in libsupport that has the
"state" (e.g.  AddSymbol) in managed static objects.

Doing this would both fix memory leaks we already have, as well as make
the code thread safe again.  it would also make sense to move all the
unix specific code in System/DynamicLibrary.cpp into 
System/Unix/DynamicLibrary.inc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:17:07 +00:00
Chris Lattner
72501b4a21 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:01:58 +00:00
Evan Cheng
ddb03d831b Revert 74898. It broke several tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:50:43 +00:00
Chris Lattner
0875c7ccf5 we don't use libtool anymore, update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:50:11 +00:00