Commit Graph

34614 Commits

Author SHA1 Message Date
David Greene
e59011e7d9 Add circular_raw_ostream, which buffers its output in a circular queue
and outputs it when explicitly flushed.  The intent is to use it in
situations such as debug output logging where a signal handler can take
care of flushing the buffer at program termination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 16:08:15 +00:00
Sanjiv Gupta
76d2f9a4db Reapply 91904.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91996 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 11:19:09 +00:00
Sanjiv Gupta
7fb0ead091 Added missing patterns for subtract instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91995 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 10:56:02 +00:00
Sanjiv Gupta
6d48855a56 Reverting back 91904.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 09:46:01 +00:00
Dale Johannesen
9949933d6e Use more sensible type for flags in asms. PR 5570.
Patch by Sylve`re Teissier (sorry, ASCII only).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 07:32:51 +00:00
Eric Christopher
d060b2576a Update objectsize intrinsic and associated dependencies. Fix
lowering code and update testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 02:51:48 +00:00
Chris Lattner
ac105c4dca really remove the instruction, don't just comment it out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:46:40 +00:00
Chris Lattner
9e3238303c completely eliminate the MOV16r0 'instruction'. The only
interesting part of this is the divrem changes, which are
already tested by CodeGen/X86/divrem.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:45:04 +00:00
Sean Callanan
5227cc89f4 More fixes for Visual C++. Replaced several very small
static inline functions with macros.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:32:29 +00:00
Chris Lattner
6a38182471 stop pattern matching 16-bit zero's of a register to MOV16r0,
instead use the appropriate subreggy thing.  This generates identical
code on some large apps (thanks to Evan's cross class coalescing
stuff he did back in july).  This means that MOV16r0 can go away
completely in the future soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:30:26 +00:00
Bill Wendling
0d58013c3f Remove superfluous SDNode ordering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:28:19 +00:00
Bill Wendling
fc67bbe7bc Remove node ordering from inline asm nodes. It's not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:47:20 +00:00
Bill Wendling
c1d3c944ab Remove node ordering from VA nodes. It's not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:44:51 +00:00
Bill Wendling
775db97a50 Revert r91949 r91942 and r91936.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:28:23 +00:00
Bill Wendling
122d06de74 Finish up node ordering in ExpandNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:05:09 +00:00
Jakob Stoklund Olesen
4b6677f1c6 Add coalescer asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91945 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:54:54 +00:00
Jakob Stoklund Olesen
24b34f8f3e Add a SPR register class to the ARM target.
Certain Thumb instructions require only SP (e.g. tSTRspi).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:54:44 +00:00
Jeffrey Yasskin
c5818fb837 Partially revert r91626. Materializing extra functions to determine whether
they're available_externally broke VMKit, which was relying on the fact that
functions would only be materialized when they were first called.  We'll have
to wait for http://llvm.org/PR5737 to really fix this.

I also added a test for one of the F->isDeclaration() calls which wasn't
covered by anything else in the test suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:47:23 +00:00
Bill Wendling
3dbcb55b40 Assign ordering to nodes created in ExpandNode. Only roughly 1/2 of the function
is finished.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:44:56 +00:00
Jeffrey Yasskin
92fdf4537b Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCI
argument to runJITOnFunction(), which caused a null pointer dereference at
every call.

Patch by Gianluca Guida!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:18:18 +00:00
Bill Wendling
167bea71a4 Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
was using "Tmp1" in the first getNode call instead of Node->getOperand(0).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 22:53:39 +00:00
Sean Callanan
542eabcba6 Removed the "inline" keyword from the disassembler decoder,
because the Visual C++ build does not build .c files as C99


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91935 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 22:51:40 +00:00
Jakob Stoklund Olesen
18ea3a1551 Remove minimal CFG sanity checks from verifier.
These checks would often trigger on unreachable statements inserted by
bugpoint, leading it astray.

It would be nice if we could distinguish unreachable blocks from errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 21:52:27 +00:00
Jakob Stoklund Olesen
5711564b09 Allow explicit %reg0 operands beyond what the .td file describes.
ARM uses these to indicate predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 21:48:20 +00:00
Bill Wendling
3ea58b6d7a Allow 0 as an order number. Don't assign an order to formal arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 21:35:02 +00:00
Sean Callanan
7fb35a2fd8 Fixes to the X86 disassembler:
Made LEA memory operands emit only 4 MCInst operands.
Made the scale operand equal 1 for instructions that have no
SIB byte.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 21:12:55 +00:00
Chris Lattner
aadadb3973 Fix the Convert to scalar to not insert dead loads in the store case. The
load is needed when we have a small store into a large alloca (at which 
point we get a load/insert/store sequence), but when you do a full-sized
store, this load ends up being dead.

This dead load is bad in really large nasty testcases where the load ends
up causing mem2reg to insert large chains of dependent phi nodes which only
ADCE can delete.  Instead of doing this, just don't insert the dead load.

This fixes rdar://6864035



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 19:33:28 +00:00
Chris Lattner
97eee027f9 fix some fixme's by using twines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 19:23:33 +00:00
Jakob Stoklund Olesen
e9912dc553 Use proper move instructions. Make the verifier happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 18:49:55 +00:00
Bob Wilson
e261b0c90b Report an error for bad inline assembly, where the value passed for an
"indirect" operand is not a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 18:34:19 +00:00
Evan Cheng
b1f4981333 Remove target attribute break-sse-dep. Instead, do not fold load into sse partial update instructions unless optimizing for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 17:47:23 +00:00
Douglas Gregor
3dac3b7d23 Include based on the current path, since we already -I the X86 target's path. Fixes CMake build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 17:25:11 +00:00
Sanjiv Gupta
66500208a5 While converting one of the operands to a memory operand, we need to check if it is Legal and does not result into a cyclic dep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91904 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 14:25:37 +00:00
Bob Wilson
f27a4cd783 Generalize SROA to allow the first index of a GEP to be non-zero. Add a
missing check that an array reference doesn't go past the end of the array,
and remove some redundant checks for in-bound array and vector references
that are no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:57:14 +00:00
Chris Lattner
1a0e7081c3 Implement PR5795 by merging duplicated return blocks. This could go further
by merging all returns in a function into a single one, but simplifycfg 
currently likes to duplicate the return (an unfortunate choice!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 06:07:30 +00:00
Chris Lattner
0ee443d169 The phi translated pointer can be computed when returning a partially cached result
instead of stored.  This reduces memdep memory usage, and also eliminates a bunch of
weakvh's.  This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91885 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 04:25:02 +00:00
Bill Wendling
3ea3c24619 Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 02:10:19 +00:00
Sean Callanan
06b766d1c0 Changed REG_* to MODRM_REG_* to avoid conflicts
with symbols in AuroraUX's global namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 02:07:42 +00:00
Daniel Dunbar
baf2e35e18 Fix some may-be-uninitialized var warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 01:41:37 +00:00
Bill Wendling
651ad13d3c Add SDNode ordering to inlined asm and VA functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 01:25:10 +00:00
Eric Christopher
f734be2ba4 Whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 01:23:51 +00:00
Bill Wendling
ec72e32fb0 Adding more assignment of ordering to SDNodes. This time in the "call" and
generic copy functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 01:11:43 +00:00
Sean Callanan
0122c9051a Fixed library dependencies between the X86 disassembler and
X86 codegen that were causing circular symbol dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 01:11:26 +00:00
Chris Lattner
9b96ecaffa avoid calling extractMallocCall when it's obvious we don't have
a call.  This speeds up memdep ~1.5%


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 01:00:32 +00:00
Bill Wendling
e80ae836f2 Add ordering of SDNodes to LowerCallTo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 00:50:32 +00:00
Chris Lattner
ffc0574a12 print pcrel immediates as signed values instead of unsigned so that we
get things like this out of the disassembler:

0x100000ecb: callq	-96

instead of:

0x100000ecb: callq	4294967200

rdar://7491123



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 00:44:05 +00:00
Bill Wendling
d0283fa69f Now add ordering to SDNodes created by the massive intrinsic lowering function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 00:40:51 +00:00
Bill Wendling
856ff41079 To make things interesting, I added MORE code to set the ordering of
SDNodes. This time in the load/store and limited-precision code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 00:12:37 +00:00
Lang Hames
74ab5eeffb Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 00:11:50 +00:00
Bill Wendling
87710f04e5 Add more plumbing to assign ordering to SDNodes. Have the "getValue" method
assign the ordering when called. Combine some of the ordering assignments to
keep things simple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-21 23:47:40 +00:00