Mikhail Glushenkov [Tue, 1 Dec 2009 09:47:11 +0000 (09:47 +0000)]
Add relocation model options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90222
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 1 Dec 2009 09:19:09 +0000 (09:19 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90221
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Tue, 1 Dec 2009 08:43:33 +0000 (08:43 +0000)]
Fix copy paste bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Dec 2009 07:33:32 +0000 (07:33 +0000)]
fix 255.vortex again, third time's the charm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90217
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Dec 2009 07:30:01 +0000 (07:30 +0000)]
minimize this a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90216
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 1 Dec 2009 06:51:30 +0000 (06:51 +0000)]
Forward -save-temps to llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Dec 2009 06:22:10 +0000 (06:22 +0000)]
merge 2009-11-29-ReverseMap.ll into crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90212
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Dec 2009 06:04:43 +0000 (06:04 +0000)]
fix PR5640 by tracking whether a block is the header of a loop more
precisely, which prevents us from infinitely peeling the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90211
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 1 Dec 2009 05:59:55 +0000 (05:59 +0000)]
Support -[weak_]framework and -F in llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90210
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 1 Dec 2009 03:18:26 +0000 (03:18 +0000)]
Remove the gcc builtins from the intrinsics, we'll lower them
explicitly so we can check arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90199
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 1 Dec 2009 03:03:00 +0000 (03:03 +0000)]
Use CFG connectedness as a secondary sort key when deciding the order of copy coalescing.
This means that well connected blocks are copy coalesced before the less connected blocks. Connected blocks are more difficult to
coalesce because intervals are more complicated, so handling them first gives a greater chance of success.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90194
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 1 Dec 2009 02:26:01 +0000 (02:26 +0000)]
Add a soft link so that in an apple style build we can find libLTO.dylib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90189
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 1 Dec 2009 02:21:51 +0000 (02:21 +0000)]
Add two CMake flags LLVM_ENABLE_PEDANTIC and LLVM_ENABLE_WERROR,
PEDANTIC defaults to ON and WERROR default to off.
Also add MSVC warnings. To disable warnings add the flags
LLVM_ENABLE_WARNINGS (default on).
Patch by Tobias Grosser!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90188
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 1 Dec 2009 01:56:27 +0000 (01:56 +0000)]
fix PR5649 by making fib use the JIT instead of the interpreter, patch by Perry Lorier!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90186
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 1 Dec 2009 01:38:10 +0000 (01:38 +0000)]
Add a comment about A[i+(j+1)].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90185
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 1 Dec 2009 00:59:58 +0000 (00:59 +0000)]
Remove some validation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90184
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 1 Dec 2009 00:53:11 +0000 (00:53 +0000)]
Some formatting and spelling fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90182
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 1 Dec 2009 00:45:56 +0000 (00:45 +0000)]
Devang pointed out that this code should use DIScope instead of
DICompileUnit. This code now prints debug filenames successfully.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90181
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 1 Dec 2009 00:44:45 +0000 (00:44 +0000)]
Fix PR5614: parts of a physical register def may be killed the rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90180
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 1 Dec 2009 00:13:06 +0000 (00:13 +0000)]
Test case for r90175.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90176
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 1 Dec 2009 00:02:02 +0000 (00:02 +0000)]
For VMOV (immediate), make some of the encoding bits (cmode and op) unspecified.
For VMOVv*i[16,32], op bit is don't care, and some cmode bits vary depending on
the immediate values.
Ref: Table A7-15 Modified immediate values for Advanced SIMD instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90173
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Nov 2009 23:56:56 +0000 (23:56 +0000)]
If pointer type has a name then do not ignore the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90172
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Mon, 30 Nov 2009 23:50:14 +0000 (23:50 +0000)]
* CMakeLists.txt: Adds warnings flags for g++. Fixes PR 5647.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90170
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Mon, 30 Nov 2009 23:48:51 +0000 (23:48 +0000)]
* cmake/modules/LLVMLibDeps.cmake: Updated library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90169
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Nov 2009 23:33:53 +0000 (23:33 +0000)]
Minor whitespace fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90166
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Nov 2009 23:33:37 +0000 (23:33 +0000)]
Fix a minor inconsistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90165
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Nov 2009 23:30:43 +0000 (23:30 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90164
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Nov 2009 22:55:54 +0000 (22:55 +0000)]
New virtual registers created for spill intervals should inherit allocation hints from the original register.
This helps us avoid silly copies when rematting values that are copied to a physical register:
leaq _.str44(%rip), %rcx
movq %rcx, %rsi
call _strcmp
becomes:
leaq _.str44(%rip), %rsi
call _strcmp
The coalescer will not touch the movq because that would tie down the physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90163
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Nov 2009 22:23:29 +0000 (22:23 +0000)]
Debug info is disabled on PPC Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90160
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 30 Nov 2009 18:56:45 +0000 (18:56 +0000)]
Reprioritize tests for tail duplication to be aggressive about indirect
branches even when optimizing for code size. Unless we find evidence to the
contrary in the future, the special treatment for indirect branches does not
have a significant effect on code size, and performance still matters with -Os.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90147
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 30 Nov 2009 18:35:03 +0000 (18:35 +0000)]
Remove isProfitableToDuplicateIndirectBranch target hook. It is profitable
for all the processors where I have tried it, and even when it might not help
performance, the cost is quite low. The opportunities for duplicating
indirect branches are limited by other factors so code size does not change
much due to tail duplicating indirect branches aggressively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90144
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 30 Nov 2009 17:47:19 +0000 (17:47 +0000)]
Fix some more ARM unified syntax warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90141
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Nov 2009 15:52:29 +0000 (15:52 +0000)]
Fix odd declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90138
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 13:34:51 +0000 (13:34 +0000)]
Fix last DOTGraphTraits problems in CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90136
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 13:14:13 +0000 (13:14 +0000)]
Remove forgotten ShortNames in Trie and CompilationGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90135
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 12:38:47 +0000 (12:38 +0000)]
Remove ShortNames from getNodeLabel in DOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90134
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 12:38:13 +0000 (12:38 +0000)]
Instantiate DefaultDOTGraphTraits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90133
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 12:37:39 +0000 (12:37 +0000)]
Do not point edge heads to source labels
If no destination label is available, just point to the node itself
instead of pointing to some source label. Source and destination labels are
not related in any way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90132
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 12:24:40 +0000 (12:24 +0000)]
Only print edgeSourceLabels if they are not empty
Graphviz can layout the graphs better if a node does not contain source
ports. Therefore only print the ports if the source ports are useful,
that means are not labeled with the empty string "".
This patch also simplifies graphs without any edgeSourceLabels e.g. the
dominance trees.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90131
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 12:06:37 +0000 (12:06 +0000)]
Small PostDominatorTree improvements
* Do not SEGFAULT if tree entryNode() is NULL
* Print function names in dotty printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90130
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 30 Nov 2009 11:55:24 +0000 (11:55 +0000)]
Remove ":" after BB name in -view-cfg-only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90129
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Nov 2009 08:03:53 +0000 (08:03 +0000)]
First pass at llvm.objectsize documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90116
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 30 Nov 2009 07:05:51 +0000 (07:05 +0000)]
Revert r90107, fixing test/Transforms/GVN/2009-11-29-ReverseMap.ll and the
llvm-gcc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90113
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 30 Nov 2009 07:02:18 +0000 (07:02 +0000)]
Add a testcase for the current llvm-gcc build failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90112
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 30 Nov 2009 04:23:17 +0000 (04:23 +0000)]
Remove the 'simple jit' tutorial as it wasn't really being maintained and its
material is covered by the Kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90111
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Mon, 30 Nov 2009 02:42:27 +0000 (02:42 +0000)]
Add test case for r90108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90109
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Mon, 30 Nov 2009 02:42:02 +0000 (02:42 +0000)]
Added support to allow clients to custom widen. For X86, custom widen vectors for
divide/remainder since these operations can trap by unroll them and adding undefs
for the resulting vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90108
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Nov 2009 02:26:29 +0000 (02:26 +0000)]
reapply r90093 with an addition of keeping the forward
and reverse nonlocal memdep maps in synch, this should
fix 255.vortex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90107
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 30 Nov 2009 02:23:57 +0000 (02:23 +0000)]
Fix this test on 64-bit systems which seem to use i64 for gep indices sometimes
while 32-bit gcc uses i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90106
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 30 Nov 2009 00:38:56 +0000 (00:38 +0000)]
Commit r90099 made LLVM simplify one of these constant expressions a little
more. Update the syntax we're checking for and filecheckize it too.
This will fix the selfhost buildbots but will 'break' the others (sigh) because
they're still linked against older LLVM which is emitting less optimized IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90104
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 29 Nov 2009 21:40:55 +0000 (21:40 +0000)]
Teach ConstantFolding to do a better job when folding gep(bitcast).
This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90099
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 21:17:48 +0000 (21:17 +0000)]
Revert r90089 for now, it's breaking selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 21:14:59 +0000 (21:14 +0000)]
revert this patch for now, it causes failures of:
LLVM::Transforms/GVN/2009-02-17-LoadPRECrash.ll
LLVM::Transforms/GVN/2009-06-17-InvalidPRE.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 21:09:36 +0000 (21:09 +0000)]
Fix a really nasty caching bug I introduced in memdep. An entry
was being added to the Result vector, but not being put in the
cache. This means that if the cache was reused wholesale for a
later query that it would be missing this entry and we'd do an
incorrect load elimination.
Unfortunately, it's not really possible to write a useful
testcase for this, but this unbreaks 255.vortex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90093
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 20:29:30 +0000 (20:29 +0000)]
Fix two FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90089
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 29 Nov 2009 18:10:39 +0000 (18:10 +0000)]
Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90085
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Nov 2009 17:42:58 +0000 (17:42 +0000)]
Remove dead returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90083
91177308-0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sun, 29 Nov 2009 17:19:48 +0000 (17:19 +0000)]
This patch ensures that Path::GetMainExecutable is able to handle the
case where realpath() fails. When this occurs we segfault trying to
create a std::string from a NULL pointer.
Fixes PR5635.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90082
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 29 Nov 2009 08:30:24 +0000 (08:30 +0000)]
Fix FileCheck crash when fuzzy scanning starting at the end of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 02:57:29 +0000 (02:57 +0000)]
add testcases for the foo_with_overflow op xforms added recently and
fix bugs exposed by the tests. Testcases from Alastair Lynn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 02:44:33 +0000 (02:44 +0000)]
mark all the 'foo with overflow' intrinsics as readnone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90055
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 02:19:52 +0000 (02:19 +0000)]
update and consolidate the load pre notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90050
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 01:28:58 +0000 (01:28 +0000)]
add PR#
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 01:15:43 +0000 (01:15 +0000)]
Add a testcase for:
void test(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j] = G[j] + G[j+1] + G[j-1];
}
which we now compile to one load in the loop:
LBB1_2: ## %bb
movsd 16(%rsi,%rax,8), %xmm2
incq %rdx
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movapd %xmm2, %xmm1
movsd %xmm0, 8(%rsi,%rax,8)
incq %rax
cmpq %rcx, %rax
jne LBB1_2
instead of:
LBB1_2: ## %bb
movsd 8(%rsi,%rax,8), %xmm0
addsd 16(%rsi,%rax,8), %xmm0
addsd (%rsi,%rax,8), %xmm0
movsd %xmm0, 8(%rsi,%rax,8)
incq %rax
cmpq %rcx, %rax
jne LBB1_2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 01:04:40 +0000 (01:04 +0000)]
add a testcase for
void test9(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90047
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Nov 2009 00:51:17 +0000 (00:51 +0000)]
Implement PR5634.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90046
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 28 Nov 2009 21:27:49 +0000 (21:27 +0000)]
Teach memdep to look for memory use intrinsics during dependency queries. Fixes
PR5574.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90045
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Nov 2009 16:08:18 +0000 (16:08 +0000)]
reenable load address insertion in load pre. This allows us to
handle cases like this:
void test(int N, double* G) {
long j;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
where G[1] isn't live into the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Nov 2009 15:39:14 +0000 (15:39 +0000)]
Enhance InsertPHITranslatedPointer to be able to return a list of newly
inserted instructions. No functionality change until someone starts using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90039
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Nov 2009 15:12:41 +0000 (15:12 +0000)]
implement a FIXME: limit the depth that DecomposeGEPExpression goes the same
way that getUnderlyingObject does it.
This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!'
assertion on sqlite3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90038
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Nov 2009 14:54:10 +0000 (14:54 +0000)]
enable code to handle un-phi-translatable cases more aggressively:
if we don't have an address expression available in a predecessor,
then model this as the value being clobbered at the end of the pred
block instead of being modeled as a complete phi translation failure.
This is important for PRE of loads because we want to see that the
load is available in all but this predecessor, and complete phi
translation failure results in not getting any information about
predecessors.
This doesn't do anything until I renable code insertion since PRE
now sees that it is available in all but one predecessors, but can't
insert the addressing in the predecessor that is missing it to
eliminate the redundancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90037
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 22:50:07 +0000 (22:50 +0000)]
disable value insertion for now, I need to figure out how
to inform GVN about the newly inserted values. This fixes
PR5631.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90022
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 22:05:15 +0000 (22:05 +0000)]
Rework InsertPHITranslatedPointer to handle the recursive case, this
fixes PR5630 and sets the stage for the next phase of goodness (testcase
pending).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90019
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 20:25:30 +0000 (20:25 +0000)]
recursively phi translate bitcast operands too, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90016
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 27 Nov 2009 19:57:53 +0000 (19:57 +0000)]
Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias Grosser
for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90015
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 19:56:00 +0000 (19:56 +0000)]
I accidentally implemented this :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90014
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 19:11:31 +0000 (19:11 +0000)]
add support for recursive phi translation and phi
translation of add with immediate. This allows us
to optimize this function:
void test(int N, double* G) {
long j;
G[1] = 1;
for (j = 1; j < N - 1; j++)
G[j+1] = G[j] + G[j+1];
}
to only do one load every iteration of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90013
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 18:08:30 +0000 (18:08 +0000)]
add two simple test cases we now optimize (to one load in the loop each) and one we don't (corresponding to the fixme I added yesterday).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90012
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 17:42:22 +0000 (17:42 +0000)]
factor some logic out of instcombine into a new SimplifyAddInst method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90011
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 17:12:30 +0000 (17:12 +0000)]
add a deadargelim note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90009
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 16:53:57 +0000 (16:53 +0000)]
This testcase is actually only partially redundant, and requires
the FIXME I added yesterday to be implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90008
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 16:37:41 +0000 (16:37 +0000)]
fix PR5436 by making the 'simple' case of SRoA not promote out of range
array indexes. The "complex" case of SRoA still handles them, and correctly.
This fixes a weirdness where we'd correctly avoid transforming A[0][42] if
the 42 was too large, but we'd only do it if it was one gep, not two separate
ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90007
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 16:31:59 +0000 (16:31 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90006
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Nov 2009 16:04:14 +0000 (16:04 +0000)]
While this test is testing a problem in the generic part of codegen,
the problem only shows for msp430 and pic16 which is why it specifies
them using -march. But it is wrong to put such tests in CodeGen/Generic,
since not everyone builds these targets. Put a copy of the test in each
of the target test directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90005
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Nov 2009 13:38:03 +0000 (13:38 +0000)]
Vector types are no longer required to have a power-of-two length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90004
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Nov 2009 12:33:22 +0000 (12:33 +0000)]
These code generator limitations have been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90003
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 08:40:14 +0000 (08:40 +0000)]
add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90002
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 08:37:22 +0000 (08:37 +0000)]
reduce nesting, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90001
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 08:32:52 +0000 (08:32 +0000)]
limit the recursion depth of GetLinearExpression. This
fixes a crash analyzing consumer-lame, which had an "%X = add %X, 1"
in unreachable code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90000
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 08:25:10 +0000 (08:25 +0000)]
teach GVN's load PRE to insert computations of the address in predecessors
where it is not available. It's unclear how to get this inserted
computation into GVN's scalar availability sets, Owen, help? :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89997
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 06:42:42 +0000 (06:42 +0000)]
add some tests for memdep phi translation + PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89996
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 06:36:28 +0000 (06:36 +0000)]
this test is failing, and is expected to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 06:33:09 +0000 (06:33 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89994
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 06:31:55 +0000 (06:31 +0000)]
rename test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89993
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 06:31:14 +0000 (06:31 +0000)]
Fix phi translation in load PRE to agree with the phi
translation done by memdep, and reenable gep translation
again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89992
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 05:53:01 +0000 (05:53 +0000)]
redisable this, my bootstrap worked because it wasn't an optimized build, whoops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89991
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 05:19:56 +0000 (05:19 +0000)]
try again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89990
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 01:52:22 +0000 (01:52 +0000)]
this is causing buildbot failures, disable for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89985
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 00:35:04 +0000 (00:35 +0000)]
this (and probably several others) are now done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89982
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 27 Nov 2009 00:34:38 +0000 (00:34 +0000)]
teach phi translation of GEPs to simplify geps like 'gep x, 0'.
This allows us to compile the example from PR5313 into:
LBB1_2: ## %bb
incl %ecx
movb %al, (%rsi)
movslq %ecx, %rax
movb (%rdi,%rax), %al
testb %al, %al
jne LBB1_2
instead of:
LBB1_2: ## %bb
movslq %eax, %rcx
incl %eax
movb (%rdi,%rcx), %cl
movb %cl, (%rsi)
movslq %eax, %rcx
cmpb $0, (%rdi,%rcx)
jne LBB1_2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89981
91177308-0d34-0410-b5e6-
96231b3b80d8