oota-llvm.git
14 years agoRemove superfluous SDNode ordering.
Bill Wendling [Wed, 23 Dec 2009 01:28:19 +0000 (01:28 +0000)]
Remove superfluous SDNode ordering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91971 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDisable JITTest.FunctionIsRecompiledAndRelinked on ARM where it's not
Jeffrey Yasskin [Wed, 23 Dec 2009 00:58:02 +0000 (00:58 +0000)]
Disable JITTest.FunctionIsRecompiledAndRelinked on ARM where it's not
implemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91963 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove node ordering from inline asm nodes. It's not needed.
Bill Wendling [Wed, 23 Dec 2009 00:47:20 +0000 (00:47 +0000)]
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

14 years agoSuppress compiler warning.
Daniel Dunbar [Wed, 23 Dec 2009 00:45:10 +0000 (00:45 +0000)]
Suppress compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91959 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove node ordering from VA nodes. It's not needed.
Bill Wendling [Wed, 23 Dec 2009 00:44:51 +0000 (00:44 +0000)]
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

14 years agoUpdate docs for bitcode changes. For object size checking we won't
Eric Christopher [Wed, 23 Dec 2009 00:29:49 +0000 (00:29 +0000)]
Update docs for bitcode changes. For object size checking we won't
work with partial objects so just count the type as a boolean. Update
appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91954 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r91949 r91942 and r91936.
Bill Wendling [Wed, 23 Dec 2009 00:28:23 +0000 (00:28 +0000)]
Revert r91949 r91942 and r91936.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91953 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorestore 'make update' functionality by not ignoring 'clang' here
Gabor Greif [Wed, 23 Dec 2009 00:18:40 +0000 (00:18 +0000)]
restore 'make update' functionality by not ignoring 'clang' here

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91950 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFinish up node ordering in ExpandNode.
Bill Wendling [Wed, 23 Dec 2009 00:05:09 +0000 (00:05 +0000)]
Finish up node ordering in ExpandNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91949 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd coalescer asserts.
Jakob Stoklund Olesen [Tue, 22 Dec 2009 23:54:54 +0000 (23:54 +0000)]
Add coalescer asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91945 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a SPR register class to the ARM target.
Jakob Stoklund Olesen [Tue, 22 Dec 2009 23:54:44 +0000 (23:54 +0000)]
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

14 years agoPartially revert r91626. Materializing extra functions to determine whether
Jeffrey Yasskin [Tue, 22 Dec 2009 23:47:23 +0000 (23:47 +0000)]
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

14 years agoAssign ordering to nodes created in ExpandNode. Only roughly 1/2 of the function
Bill Wendling [Tue, 22 Dec 2009 23:44:56 +0000 (23:44 +0000)]
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

14 years agoFix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCI
Jeffrey Yasskin [Tue, 22 Dec 2009 23:18:18 +0000 (23:18 +0000)]
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

14 years agoAssign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
Bill Wendling [Tue, 22 Dec 2009 22:53:39 +0000 (22:53 +0000)]
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

14 years agoRemoved the "inline" keyword from the disassembler decoder,
Sean Callanan [Tue, 22 Dec 2009 22:51:40 +0000 (22:51 +0000)]
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

14 years agorename HexDisassembler -> Disassembler, it works on any input
Chris Lattner [Tue, 22 Dec 2009 22:50:29 +0000 (22:50 +0000)]
rename HexDisassembler -> Disassembler, it works on any input
integer encoding (0123, 0b10101, 42, etc).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91934 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agojust discard the debug output from the disassembler.
Chris Lattner [Tue, 22 Dec 2009 22:47:43 +0000 (22:47 +0000)]
just discard the debug output from the disassembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91933 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd testcase for PR5703
Anton Korobeynikov [Tue, 22 Dec 2009 22:37:23 +0000 (22:37 +0000)]
Add testcase for PR5703

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91931 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove minimal CFG sanity checks from verifier.
Jakob Stoklund Olesen [Tue, 22 Dec 2009 21:52:27 +0000 (21:52 +0000)]
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

14 years agoAllow explicit %reg0 operands beyond what the .td file describes.
Jakob Stoklund Olesen [Tue, 22 Dec 2009 21:48:20 +0000 (21:48 +0000)]
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

14 years agoAllow 0 as an order number. Don't assign an order to formal arguments.
Bill Wendling [Tue, 22 Dec 2009 21:35:02 +0000 (21:35 +0000)]
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

14 years agoFixes to the X86 disassembler:
Sean Callanan [Tue, 22 Dec 2009 21:12:55 +0000 (21:12 +0000)]
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

14 years agoRestore snprintf weirdness for VCPP only
Anton Korobeynikov [Tue, 22 Dec 2009 20:11:00 +0000 (20:11 +0000)]
Restore snprintf weirdness for VCPP only

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91918 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the Convert to scalar to not insert dead loads in the store case. The
Chris Lattner [Tue, 22 Dec 2009 19:33:28 +0000 (19:33 +0000)]
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

14 years agofix some fixme's by using twines
Chris Lattner [Tue, 22 Dec 2009 19:23:33 +0000 (19:23 +0000)]
fix some fixme's by using twines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91916 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse proper move instructions. Make the verifier happy.
Jakob Stoklund Olesen [Tue, 22 Dec 2009 18:49:55 +0000 (18:49 +0000)]
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

14 years agoReport an error for bad inline assembly, where the value passed for an
Bob Wilson [Tue, 22 Dec 2009 18:34:19 +0000 (18:34 +0000)]
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

14 years agoRemove target attribute break-sse-dep. Instead, do not fold load into sse partial...
Evan Cheng [Tue, 22 Dec 2009 17:47:23 +0000 (17:47 +0000)]
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

14 years agoInclude based on the current path, since we already -I the X86 target's path. Fixes...
Douglas Gregor [Tue, 22 Dec 2009 17:25:11 +0000 (17:25 +0000)]
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

14 years agoWhile converting one of the operands to a memory operand, we need to check if it...
Sanjiv Gupta [Tue, 22 Dec 2009 14:25:37 +0000 (14:25 +0000)]
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

14 years agospecify what is invalid about it
Chris Lattner [Tue, 22 Dec 2009 07:03:21 +0000 (07:03 +0000)]
specify what is invalid about it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91901 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agospecify a triple to use, fixing the test on non-x86-64 hosts.
Chris Lattner [Tue, 22 Dec 2009 07:01:12 +0000 (07:01 +0000)]
specify a triple to use, fixing the test on non-x86-64 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91900 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreject invalid input with a caret, e.g.:
Chris Lattner [Tue, 22 Dec 2009 06:58:29 +0000 (06:58 +0000)]
reject invalid input with a caret, e.g.:

simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91898 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGeneralize SROA to allow the first index of a GEP to be non-zero. Add a
Bob Wilson [Tue, 22 Dec 2009 06:57:14 +0000 (06:57 +0000)]
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

14 years agovarious cleanups, make the disassemble reject lines with too much
Chris Lattner [Tue, 22 Dec 2009 06:56:51 +0000 (06:56 +0000)]
various cleanups, make the disassemble reject lines with too much
data on them, for example:

addb %al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0
    ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91896 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIf you thought that it didn't make sense for the disassembler
Chris Lattner [Tue, 22 Dec 2009 06:45:48 +0000 (06:45 +0000)]
If you thought that it didn't make sense for the disassembler
to not produce caret diagnostics, you were right!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91895 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorewrite the file parser for the disassembler, implementing support for
Chris Lattner [Tue, 22 Dec 2009 06:37:58 +0000 (06:37 +0000)]
rewrite the file parser for the disassembler, implementing support for
comments.  Also, check in a simple testcase for the disassembler,
including a test for r91864

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91894 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't crash on blank lines, rename some variables.
Chris Lattner [Tue, 22 Dec 2009 06:24:00 +0000 (06:24 +0000)]
don't crash on blank lines, rename some variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91892 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement PR5795 by merging duplicated return blocks. This could go further
Chris Lattner [Tue, 22 Dec 2009 06:07:30 +0000 (06:07 +0000)]
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

14 years agoconvert to filecheck
Chris Lattner [Tue, 22 Dec 2009 06:04:26 +0000 (06:04 +0000)]
convert to filecheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91889 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
Chris Lattner [Tue, 22 Dec 2009 04:47:41 +0000 (04:47 +0000)]
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91886 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe phi translated pointer can be computed when returning a partially cached result
Chris Lattner [Tue, 22 Dec 2009 04:25:02 +0000 (04:25 +0000)]
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

14 years agoAdd more plumbing. This time in the LowerArguments and "get" functions which
Bill Wendling [Tue, 22 Dec 2009 02:10:19 +0000 (02:10 +0000)]
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

14 years agoChanged REG_* to MODRM_REG_* to avoid conflicts
Sean Callanan [Tue, 22 Dec 2009 02:07:42 +0000 (02:07 +0000)]
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

14 years agoFix some may-be-uninitialized var warnings.
Daniel Dunbar [Tue, 22 Dec 2009 01:41:37 +0000 (01:41 +0000)]
Fix some may-be-uninitialized var warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91878 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix unit test that I broke.
Chris Lattner [Tue, 22 Dec 2009 01:38:23 +0000 (01:38 +0000)]
fix unit test that I broke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91877 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd SDNode ordering to inlined asm and VA functions.
Bill Wendling [Tue, 22 Dec 2009 01:25:10 +0000 (01:25 +0000)]
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

14 years agoWhitespace fixes.
Eric Christopher [Tue, 22 Dec 2009 01:23:51 +0000 (01:23 +0000)]
Whitespace fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91875 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotypes don't need atomic inc/dec, they are local to an llvmcontext.
Chris Lattner [Tue, 22 Dec 2009 01:17:43 +0000 (01:17 +0000)]
types don't need atomic inc/dec, they are local to an llvmcontext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91873 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdding more assignment of ordering to SDNodes. This time in the "call" and
Bill Wendling [Tue, 22 Dec 2009 01:11:43 +0000 (01:11 +0000)]
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

14 years agoFixed library dependencies between the X86 disassembler and
Sean Callanan [Tue, 22 Dec 2009 01:11:26 +0000 (01:11 +0000)]
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

14 years agoavoid calling extractMallocCall when it's obvious we don't have
Chris Lattner [Tue, 22 Dec 2009 01:00:32 +0000 (01:00 +0000)]
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

14 years agocomment fix: weakvh -> tracking vh
Chris Lattner [Tue, 22 Dec 2009 00:51:57 +0000 (00:51 +0000)]
comment fix: weakvh -> tracking vh

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91867 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd ordering of SDNodes to LowerCallTo.
Bill Wendling [Tue, 22 Dec 2009 00:50:32 +0000 (00:50 +0000)]
Add ordering of SDNodes to LowerCallTo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91866 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoprint pcrel immediates as signed values instead of unsigned so that we
Chris Lattner [Tue, 22 Dec 2009 00:44:05 +0000 (00:44 +0000)]
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

14 years agoNow add ordering to SDNodes created by the massive intrinsic lowering function.
Bill Wendling [Tue, 22 Dec 2009 00:40:51 +0000 (00:40 +0000)]
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

14 years agoTo make things interesting, I added MORE code to set the ordering of
Bill Wendling [Tue, 22 Dec 2009 00:12:37 +0000 (00:12 +0000)]
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

14 years agoChanged slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
Lang Hames [Tue, 22 Dec 2009 00:11:50 +0000 (00:11 +0000)]
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

14 years agoAdd more plumbing to assign ordering to SDNodes. Have the "getValue" method
Bill Wendling [Mon, 21 Dec 2009 23:47:40 +0000 (23:47 +0000)]
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

14 years agoAdd suggested parentheses.
Daniel Dunbar [Mon, 21 Dec 2009 23:27:57 +0000 (23:27 +0000)]
Add suggested parentheses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91853 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a fastpath to Load GVN to special case when we have exactly one dominating
Chris Lattner [Mon, 21 Dec 2009 23:15:48 +0000 (23:15 +0000)]
Add a fastpath to Load GVN to special case when we have exactly one dominating
load to avoid even messing around with SSAUpdate at all.  In this case (which
is very common, we can just use the input value directly).

This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s,
which still isn't great, but substantially better and this is a simple speedup
that applies to lots of different cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91851 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore ordering plumbing. This time for GEP. I need to remember to assign
Bill Wendling [Mon, 21 Dec 2009 23:10:19 +0000 (23:10 +0000)]
More ordering plumbing. This time for GEP. I need to remember to assign
orderings to values returned by getValue().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91850 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorefactor some code out to a new helper method.
Chris Lattner [Mon, 21 Dec 2009 23:04:33 +0000 (23:04 +0000)]
refactor some code out to a new helper method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91849 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove indentation avoid a pointless conversion from weakvh to trackingvh,
Chris Lattner [Mon, 21 Dec 2009 22:43:03 +0000 (22:43 +0000)]
improve indentation avoid a pointless conversion from weakvh to trackingvh,
no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91848 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAnother incremental check-in for assigning ordering to SDNodes. This time for
Bill Wendling [Mon, 21 Dec 2009 22:42:14 +0000 (22:42 +0000)]
Another incremental check-in for assigning ordering to SDNodes. This time for
shuffle and insert vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91847 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAssign ordering to more instructions. Incremental check-in.
Bill Wendling [Mon, 21 Dec 2009 22:30:11 +0000 (22:30 +0000)]
Assign ordering to more instructions. Incremental check-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91846 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago- Add a bit more plumbing assigning an order to SDNodes.
Bill Wendling [Mon, 21 Dec 2009 21:59:52 +0000 (21:59 +0000)]
- Add a bit more plumbing assigning an order to SDNodes.
- Modify the "dump" method to emit the order of an SDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91845 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a bug in !subst where TableGen would go and resubstitute text it had
David Greene [Mon, 21 Dec 2009 21:21:34 +0000 (21:21 +0000)]
Fix a bug in !subst where TableGen would go and resubstitute text it had
just substituted.  This could cause infinite looping in certain
pathological cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91843 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove uber-gross hack. The define _snprintf to snprintf is invalid due to two reason...
Anton Korobeynikov [Mon, 21 Dec 2009 20:19:37 +0000 (20:19 +0000)]
Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91842 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMark FPW as allocable when frame address is taken.
Anton Korobeynikov [Mon, 21 Dec 2009 20:18:49 +0000 (20:18 +0000)]
Mark FPW as allocable when frame address is taken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91841 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFirst wave of plumbing for assigning an ordering to SDNodes. This takes care of
Bill Wendling [Mon, 21 Dec 2009 19:59:38 +0000 (19:59 +0000)]
First wave of plumbing for assigning an ordering to SDNodes. This takes care of
a lot of the branching instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91838 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete the instruction just before the function terminates for consistency sake.
Evan Cheng [Mon, 21 Dec 2009 19:53:39 +0000 (19:53 +0000)]
Delete the instruction just before the function terminates for consistency sake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91836 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPlace SDNodeOrdering.h in the directory it's used.
Bill Wendling [Mon, 21 Dec 2009 19:34:59 +0000 (19:34 +0000)]
Place SDNodeOrdering.h in the directory it's used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91834 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove special-case SROA optimization of variable indexes to one-element and
Bob Wilson [Mon, 21 Dec 2009 18:39:47 +0000 (18:39 +0000)]
Remove special-case SROA optimization of variable indexes to one-element and
two-element arrays.  After restructuring the SROA code, it was not safe to
do this without adding more checking.  It is not clear that this special-case
has really been useful, and removing this simplifies the code quite a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91828 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoXFAIL these tests on powerpc, under the assumption that no one cares. If you care...
Daniel Dunbar [Mon, 21 Dec 2009 17:31:59 +0000 (17:31 +0000)]
XFAIL these tests on powerpc, under the assumption that no one cares. If you care, feel free to fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91826 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix setting and default setting of code model for jit. Do this
Eric Christopher [Mon, 21 Dec 2009 08:15:29 +0000 (08:15 +0000)]
Fix setting and default setting of code model for jit. Do this
by allowing backends to override routines that will default
the JIT and Static code generation to an appropriate code model
for the architecture.

Should fix PR 5773.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91824 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoA couple minor README updates.
Eli Friedman [Mon, 21 Dec 2009 08:03:16 +0000 (08:03 +0000)]
A couple minor README updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91823 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove compatibility with SWIG, patch by James Knight!
Chris Lattner [Mon, 21 Dec 2009 07:52:40 +0000 (07:52 +0000)]
improve compatibility with SWIG, patch by James Knight!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91822 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert r89298, which was committed without a testcase. I think
Chris Lattner [Mon, 21 Dec 2009 07:45:57 +0000 (07:45 +0000)]
revert r89298, which was committed without a testcase.  I think
the underlying PHI node insertion issue in SSAUpdate is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91821 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix PR5837 by having SSAUpdate reuse phi nodes for the
Chris Lattner [Mon, 21 Dec 2009 07:16:11 +0000 (07:16 +0000)]
fix PR5837 by having SSAUpdate reuse phi nodes for the
'GetValueInMiddleOfBlock' case, instead of inserting
duplicates.

A similar fix is almost certainly needed by the machine-level
SSAUpdate implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91820 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a helper ctor.
Chris Lattner [Mon, 21 Dec 2009 07:15:15 +0000 (07:15 +0000)]
add a helper ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91819 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange StringRef::startswith and StringRef::endswith to versions which are a
Eli Friedman [Mon, 21 Dec 2009 06:49:24 +0000 (06:49 +0000)]
Change StringRef::startswith and StringRef::endswith to versions which are a
bit more verbose, but optimize to much shorter code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91817 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd check lines for min/max tests.
Chris Lattner [Mon, 21 Dec 2009 06:08:50 +0000 (06:08 +0000)]
add check lines for min/max tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91816 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreally convert this to filecheck.
Chris Lattner [Mon, 21 Dec 2009 06:06:10 +0000 (06:06 +0000)]
really convert this to filecheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91815 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agogive instcombine some helper functions for matching MIN and MAX, and
Chris Lattner [Mon, 21 Dec 2009 06:03:05 +0000 (06:03 +0000)]
give instcombine some helper functions for matching MIN and MAX, and
implement some optimizations for MIN(MIN()) and MAX(MAX()) and
MIN(MAX()) etc.  This substantially improves the code in PR5822 but
doesn't kick in much elsewhere.  2 max's were optimized in
pairlocalalign and one in smg2000.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91814 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofilecheckize
Chris Lattner [Mon, 21 Dec 2009 05:53:13 +0000 (05:53 +0000)]
filecheckize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91813 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoenhance x-(-A) -> x+A to preserve NUW/NSW.
Chris Lattner [Mon, 21 Dec 2009 04:04:05 +0000 (04:04 +0000)]
enhance x-(-A) -> x+A to preserve NUW/NSW.

Use the presence of NSW/NUW to fold "icmp (x+cst), x" to a constant in
cases where it would otherwise be undefined behavior.

Surprisingly (to me at least), this triggers hundreds of the times in
a few benchmarks: lencode, ldecode, and 466.h264ref seem to *really*
like this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91812 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOptimize all cases of "icmp (X+Cst), X" to something simpler. This triggers
Chris Lattner [Mon, 21 Dec 2009 03:19:28 +0000 (03:19 +0000)]
Optimize all cases of "icmp (X+Cst), X" to something simpler.  This triggers
a bunch in lencode, ldecod, spass, 176.gcc, 252.eon, among others.  It is
also the first part of PR5822

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91811 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoconvert to filecheck
Chris Lattner [Mon, 21 Dec 2009 03:11:05 +0000 (03:11 +0000)]
convert to filecheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91810 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed use of phi param in SlotIndex constructors.
Lang Hames [Sat, 19 Dec 2009 23:32:32 +0000 (23:32 +0000)]
Fixed use of phi param in SlotIndex constructors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91790 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix an overly conservative caching issue that caused memdep to
Chris Lattner [Sat, 19 Dec 2009 21:29:22 +0000 (21:29 +0000)]
fix an overly conservative caching issue that caused memdep to
cache a pointer as being unavailable due to phi trans in the
wrong place.  This would cause later queries to fail even when
they didn't involve phi trans.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91787 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: Update lib deps.
Daniel Dunbar [Sat, 19 Dec 2009 21:27:30 +0000 (21:27 +0000)]
CMake: Update lib deps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91786 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago.llx is no more.
Chris Lattner [Sat, 19 Dec 2009 20:56:53 +0000 (20:56 +0000)]
.llx is no more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91784 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix inconsistent use of tabs
Chris Lattner [Sat, 19 Dec 2009 20:44:43 +0000 (20:44 +0000)]
fix inconsistent use of tabs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91783 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove unused variable (noticed by clang++).
Daniel Dunbar [Sat, 19 Dec 2009 18:58:49 +0000 (18:58 +0000)]
Remove unused variable (noticed by clang++).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91780 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago#if 0 out X86 disassembler for now, it is breaking the build in multiple places.
Daniel Dunbar [Sat, 19 Dec 2009 17:11:53 +0000 (17:11 +0000)]
#if 0 out X86 disassembler for now, it is breaking the build in multiple places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91778 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEmit direction operand in binary insns that stores in memory.
Sanjiv Gupta [Sat, 19 Dec 2009 13:52:01 +0000 (13:52 +0000)]
Emit direction operand in binary insns that stores in memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91777 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdding a bunch of options to the mcc16 driver.
Sanjiv Gupta [Sat, 19 Dec 2009 13:13:29 +0000 (13:13 +0000)]
Adding a bunch of options to the mcc16 driver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91776 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename dprintf to dbgpritnf, in order to fix build with glibc (which already defines...
Nuno Lopes [Sat, 19 Dec 2009 12:07:00 +0000 (12:07 +0000)]
rename dprintf to dbgpritnf, in order to fix build with glibc (which already defines dprintf in stdio.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91775 91177308-0d34-0410-b5e6-96231b3b80d8