Dan Gohman [Fri, 23 May 2008 22:47:52 +0000 (22:47 +0000)]
It turns out there are only 3 non-first-class type kinds left now, so
it's simpler for isFirstClassType to use a negative test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51511
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 22:27:01 +0000 (22:27 +0000)]
Remove a bogus svn:mime-type property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51510
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 21:53:15 +0000 (21:53 +0000)]
Update the description of first-class types to reflect that
structs and arrays are now first-class. And fix a sentance
fragment in the insertvalue description. Thanks to Chris
for pointing these out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51506
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 21:40:55 +0000 (21:40 +0000)]
Don't silently truncate array extents to 32 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51505
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 23 May 2008 21:33:27 +0000 (21:33 +0000)]
Add a missed CommonLinkage check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51503
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 23 May 2008 21:23:16 +0000 (21:23 +0000)]
Use movlps / movhps to modify low / high half of 16-byet memory location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51501
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 21:15:35 +0000 (21:15 +0000)]
Remove lingering references to .llx and .tr in the tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51500
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 21:05:58 +0000 (21:05 +0000)]
Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
use it instead of duplicating its functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51499
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 20:40:06 +0000 (20:40 +0000)]
Add #includes to make some dependencies explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51496
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 18:23:11 +0000 (18:23 +0000)]
Issue errors in several situations instead of aborting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51493
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 18:05:39 +0000 (18:05 +0000)]
Elaborate on the entry on integer vector multiplication by constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51491
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 23 May 2008 18:00:18 +0000 (18:00 +0000)]
Fix a duplicated pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51490
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 17:49:40 +0000 (17:49 +0000)]
Use PMULDQ for v2i64 multiplies when SSE4.1 is available. And add
load-folding table entries for PMULDQ and PMULLD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51489
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 23 May 2008 17:28:11 +0000 (17:28 +0000)]
New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51487
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 23 May 2008 17:19:02 +0000 (17:19 +0000)]
Rewrite a loop to avoid using iterators pointing to
elements that have been erased. Based on a patch
by Nicolas Capens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51485
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 17:11:55 +0000 (17:11 +0000)]
Fix the spelling of the va_arg keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51484
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 16:57:00 +0000 (16:57 +0000)]
Fix another isFirstClassType that now needs to be isSingleValueType.
This fixes recent CBE regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51483
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Fri, 23 May 2008 16:17:48 +0000 (16:17 +0000)]
Replace some weird usage of UserOp1 introduced in r49492 by a plain if.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51482
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Fri, 23 May 2008 11:45:18 +0000 (11:45 +0000)]
Restructure the testing documentation.
I've tried to make the distinction between the DejaGNU tests and the test-suite
more clear, added a small section about generating output from the test-suite,
removed some duplication and fixed some wordings. Most of the changes are text
movements, however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51480
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Fri, 23 May 2008 09:09:41 +0000 (09:09 +0000)]
Restucture a part of the SimplifyCFG pass and include a testcase.
The SimplifyCFG pass looks at basic blocks that contain only phi nodes,
followed by an unconditional branch. In a lot of cases, such a block (BB) can
be merged into their successor (Succ).
This merging is performed by TryToSimplifyUncondBranchFromEmptyBlock. It does
this by taking all phi nodes in the succesor block Succ and expanding them to
include the predecessors of BB. Furthermore, any phi nodes in BB are moved to
Succ and expanded to include the predecessors of Succ as well.
Before attempting this merge, CanPropagatePredecessorsForPHIs checks to see if
all phi nodes can be properly merged. All functional changes are made to
this function, only comments were updated in
TryToSimplifyUncondBranchFromEmptyBlock.
In the original code, CanPropagatePredecessorsForPHIs looks quite convoluted
and more like stack of checks added to handle different kinds of situations
than a comprehensive check. In particular the first check in the function did
some value checking for the case that BB and Succ have a common predecessor,
while the last check in the function simply rejected all cases where BB and
Succ have a common predecessor. The first check was still useful in the case
that BB did not contain any phi nodes at all, though, so it was not completely
useless.
Now, CanPropagatePredecessorsForPHIs is restructured to to look a lot more
similar to the code that actually performs the merge. Both functions now look
at the same phi nodes in about the same order. Any conflicts (phi nodes with
different values for the same source) that could arise from merging or moving
phi nodes are detected. If no conflicts are found, the merge can happen.
Apart from only restructuring the checks, two main changes in functionality
happened.
Firstly, the old code rejected blocks with common predecessors in most cases.
The new code performs some extra checks so common predecessors can be handled
in a lot of cases. Wherever common predecessors still pose problems, the
blocks are left untouched.
Secondly, the old code rejected the merge when values (phi nodes) from BB were
used in any other place than Succ. However, it does not seem that there is any
situation that would require this check. Even more, this can be proven.
Consider that BB is a block containing of a single phi node "%a" and a branch
to Succ. Now, since the definition of %a will dominate all of its uses, BB
will dominate all blocks that use %a. Furthermore, since the branch from BB to
Succ is unconditional, Succ will also dominate all uses of %a.
Now, assume that one predecessor of Succ is not dominated by BB (and thus not
dominated by Succ). Since at least one use of %a (but in reality all of them)
is reachable from Succ, you could end up at a use of %a without passing
through it's definition in BB (by coming from X through Succ). This is a
contradiction, meaning that our original assumption is wrong. Thus, all
predecessors of Succ must also be dominated by BB (and thus also by Succ).
This means that moving the phi node %a from BB to Succ does not pose any
problems when the two blocks are merged, and any use checks are not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51478
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Fri, 23 May 2008 07:57:02 +0000 (07:57 +0000)]
Indent fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51477
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 23 May 2008 04:54:45 +0000 (04:54 +0000)]
Constant integer vectors may also be negated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51476
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 23 May 2008 04:39:38 +0000 (04:39 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51475
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 23 May 2008 04:34:58 +0000 (04:34 +0000)]
Revert X + X --> X * 2 optz'n which pessimizes heavily on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 23 May 2008 04:29:53 +0000 (04:29 +0000)]
we compile multiply-by-constant into horrible code. Doesn't sse4 have some
instruction for doing this?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51473
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 23 May 2008 04:14:51 +0000 (04:14 +0000)]
Implement X + X for vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51472
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 23 May 2008 03:26:47 +0000 (03:26 +0000)]
Fix a recently added optimization to not crash on vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51471
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 02:28:01 +0000 (02:28 +0000)]
Generalize the new code in instcombine's ComputeNumSignBits for handling
and/or to handle more cases (such as this add-sitofp.ll testcase), and
port it to selectiondag's ComputeNumSignBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51469
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 01:55:30 +0000 (01:55 +0000)]
Make structs and arrays first-class types, and add assembly
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.
Note that this does not yet include CodeGen support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51468
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 01:52:21 +0000 (01:52 +0000)]
Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51467
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 23 May 2008 01:29:08 +0000 (01:29 +0000)]
Remove warnings about comparison between signed and unsigned expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51465
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 23 May 2008 01:01:31 +0000 (01:01 +0000)]
Allow for switch with no cases. Was causing fault
in gcc.dg/pr27531-1.c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51464
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 23 May 2008 00:37:07 +0000 (00:37 +0000)]
Bug: rcpps can only folds a load if the address is 16-byte aligned. Fixed many 'ps' load folding patterns in X86InstrSSE.td which are missing the proper alignment checks.
Also fixed some 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51462
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 00:36:11 +0000 (00:36 +0000)]
Add more IR support for the new extractvalue and insertvalue
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51461
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 00:34:04 +0000 (00:34 +0000)]
Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51460
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 00:17:26 +0000 (00:17 +0000)]
Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51459
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 23 May 2008 00:16:59 +0000 (00:16 +0000)]
Put const weak stuff in appropriate section on Darwin.
g++.dg/abi/key2.C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51458
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 23 May 2008 00:15:10 +0000 (00:15 +0000)]
Make LTO expect common and weak to be represented differently.
Reading .bc files from before that change will no longer work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51457
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 23 May 2008 00:12:03 +0000 (00:12 +0000)]
Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51456
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 22 May 2008 23:55:24 +0000 (23:55 +0000)]
X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51455
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 22 May 2008 23:43:22 +0000 (23:43 +0000)]
Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51452
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 22 May 2008 22:45:03 +0000 (22:45 +0000)]
Add a polygen grammar definition for LLVM assembly language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51449
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 22 May 2008 22:30:09 +0000 (22:30 +0000)]
Recognize the "default" keyword, which is documented in LangRef.html
and supported in the grammar, in the lexer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51448
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 22 May 2008 21:19:19 +0000 (21:19 +0000)]
Add a couple of test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51441
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 22 May 2008 21:16:33 +0000 (21:16 +0000)]
When rewriting defs and uses after spilling, don't set the weight of a
live interval to infinity if the instruction being rewritten is an
original remat def instruction. We were only checking against the clone
of the remat def which doesn't actually appear in the IR at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51440
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 22 May 2008 21:12:21 +0000 (21:12 +0000)]
Don't attempt to update SpillSlotToUsesMap for stack slots that aren't
generated by the spiller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51439
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 22 May 2008 19:24:54 +0000 (19:24 +0000)]
transform more loops to iterator form, detabify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51436
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 22 May 2008 18:56:56 +0000 (18:56 +0000)]
Add missing patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51435
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 22 May 2008 13:16:42 +0000 (13:16 +0000)]
Suppress warnings about missing placement delete. This should now be std-conformant even if compiled with exceptions on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51429
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 22 May 2008 06:43:33 +0000 (06:43 +0000)]
Rewrite operand loops to use iterators. This shrinks .o file (at gcc4.0.1 -O3 x86) substantially (>500 bytes). Reason still unknown.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51423
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 06:29:38 +0000 (06:29 +0000)]
fix an off-by-one error in my previous patch, don't treat the callee as a incoming arg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51422
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 06:19:37 +0000 (06:19 +0000)]
Add support for multiple-return values in inline asm. This should
get inline asm working as well as it did previously with the CBE
with the new MRV support for inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51420
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 04:46:38 +0000 (04:46 +0000)]
Fix PR2267, by allowing indirect outputs to be intermixed
with normal outputs. Testcase here:
test/CodeGen/X86/asm-indirect-mem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 04:45:22 +0000 (04:45 +0000)]
testcase for PR2267
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51408
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 03:23:06 +0000 (03:23 +0000)]
Free and vaarg are not really volatile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 03:22:42 +0000 (03:22 +0000)]
rewrite the validity checking for memory promotion to be simpler,
more aggressive, and more correct. Verify that we only attempt to
promote loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 03:06:14 +0000 (03:06 +0000)]
minor edits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51405
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 22 May 2008 00:53:38 +0000 (00:53 +0000)]
Use 'continue' to reduce nesting in this loop. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51399
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 21 May 2008 23:35:53 +0000 (23:35 +0000)]
Add a Type::isSingleValueType method. This will be used by code
that currently uses Type::isFirstClassType and depends on it
returning false for struct or array types.
This commit doesn't change the behavior of Type::isFirstClassType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51396
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 21 May 2008 22:34:12 +0000 (22:34 +0000)]
Fix PR2343. An *interesting* coalescer bug.
BB1:
vr1025 = copy vr1024
..
BB2:
vr1024 = op
= op vr1025
<loop eventually branch back to BB1>
Even though vr1025 is copied from vr1024, it's not safe to coalesced them since live range of vr1025 intersects the def of vr1024. This happens when vr1025 is assigned the value of the previous iteration of vr1024 in the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51394
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 21 May 2008 21:20:07 +0000 (21:20 +0000)]
Follow-up to the reverting of r51218. This puts the checks out-of-line. Because
they aren't in the header file, systems with a <string> header file that isn't
64-bit clean shouldn't warn if #including Path.h and specifying
-Wshorten-64-to-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51393
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 21 May 2008 18:57:33 +0000 (18:57 +0000)]
update a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51390
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 21 May 2008 18:30:15 +0000 (18:30 +0000)]
adapt to new API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51387
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 21 May 2008 18:20:21 +0000 (18:20 +0000)]
Rename -no-lazy to -disable-lazy-compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51386
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 21 May 2008 16:34:48 +0000 (16:34 +0000)]
Fix a couple issues with the JIT and multiple modules:
1. The "JITState" object creates a PassManager with the ModuleProvider that the
jit is created with. If the ModuleProvider is removed and deleted, the
PassManager is invalid.
2. The Global maps in the JIT were not invalidated with a ModuleProvider was
removed. This could lead to a case where the Module would be freed, and a
new Module with Globals at the same addresses could return invalid results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51384
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 21 May 2008 14:48:24 +0000 (14:48 +0000)]
resurrect lost tests by renaming them to not end with .tr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51375
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 21 May 2008 14:07:30 +0000 (14:07 +0000)]
suppress gcc3.4.6's <no value returned> warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51372
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 21 May 2008 00:54:12 +0000 (00:54 +0000)]
When LSR is replacing an instruction, call
ScalarEvolution::deleteValueFromRecords on it before doing the
replaceAllUsesWith, because ScalarEvolution looks at the instruction's
users to find SCEV references to the instruction's SCEV object in its
internal maps.
Move all of LSR's loop-related state clearing after processing the loop
and before cleaning up dead PHI nodes. This eliminates all of LSR's SCEV
references just before the calls to ScalarEvolution::deleteValueFromRecords
so that when ScalarEvolution drops its own SCEV references, the reference
counts will reach zero and the SCEVs will be deleted immediately.
These changes fix some compiler aborts involving ScalarEvolution holding
onto and reusing SCEV objects for instructions that have been deleted.
No regression test unfortunately; because the symptoms were due to
dangling pointers, reduced testcases ended up being fairly arbitrary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51359
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 20 May 2008 23:54:27 +0000 (23:54 +0000)]
Reverting r51218 because of breakage on PPC32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51358
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 20 May 2008 22:07:21 +0000 (22:07 +0000)]
Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51357
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 22:05:28 +0000 (22:05 +0000)]
Fix PR2346 by marking vaarg as volatile so that licm doesn't try to
hoist them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51356
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 21:19:36 +0000 (21:19 +0000)]
Oops, commit the version of this test that actually works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51351
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 21:01:12 +0000 (21:01 +0000)]
Port SelectionDAG's ComputeNumSignBits-using code to instcombine,
now that instcombine also has ComputeNumSignBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51350
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 20 May 2008 21:00:03 +0000 (21:00 +0000)]
sabre brings to my attention that the 'tr' suffix is also obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51349
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 20:59:51 +0000 (20:59 +0000)]
Port the fix for the select operator from instcombine's
ComputeNumSignBits to SelectionDAG's ComputeNumSignBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51348
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 20:56:33 +0000 (20:56 +0000)]
Code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51345
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 20:48:21 +0000 (20:48 +0000)]
Clarify that and/or/xor/sdiv etc all allow vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51335
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 20:06:53 +0000 (20:06 +0000)]
Clarify copyright transfer when you don't own the copyright of
the contributed code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51329
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Tue, 20 May 2008 19:52:04 +0000 (19:52 +0000)]
Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51328
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 May 2008 18:24:47 +0000 (18:24 +0000)]
movsd and movq do not require 16-byte alignment. This fixes vec_set-5.ll on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51327
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 17:27:57 +0000 (17:27 +0000)]
"The two generated files in the AsmParser.vcproj are pointing to the
wrong directory, this is the patch to fix it (also attached)."
Patch by 'OvermindDL1'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51323
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 20 May 2008 10:28:55 +0000 (10:28 +0000)]
Clarify the testing documentation a bit and solve two HTML validator warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51313
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 May 2008 08:13:21 +0000 (08:13 +0000)]
More local spiller complexity!
If local spiller optimization turns some instruction into an identity copy, it will be removed. If the output register happens to be dead (and source is obviously killed), transfer the kill / dead information to last use / def in the same MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51306
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 May 2008 08:10:37 +0000 (08:10 +0000)]
Don't spill dead def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51305
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 20 May 2008 07:26:45 +0000 (07:26 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51303
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 05:46:13 +0000 (05:46 +0000)]
Teach instcombine 4 new xforms:
(add (sext x), cst) --> (sext (add x, cst'))
(add (sext x), (sext y)) --> (sext (add int x, y))
(add double (sitofp x), fpcst) --> (sitofp (add int x, intcst))
(add double (sitofp x), (sitofp y)) --> (sitofp (add int x, y))
This generally reduces conversions. For example MiBench/telecomm-gsm
gets these simplifications:
HACK2: %tmp67.i142.i.i = sext i16 %tmp6.i141.i.i to i32 ; <i32> [#uses=1]
%tmp23.i139.i.i = sext i16 %tmp2.i138.i.i to i32 ; <i32> [#uses=1]
%tmp8.i143.i.i = add i32 %tmp67.i142.i.i, %tmp23.i139.i.i ; <i32> [#uses=3]
HACK2: %tmp67.i121.i.i = sext i16 %tmp6.i120.i.i to i32 ; <i32> [#uses=1]
%tmp23.i118.i.i = sext i16 %tmp2.i117.i.i to i32 ; <i32> [#uses=1]
%tmp8.i122.i.i = add i32 %tmp67.i121.i.i, %tmp23.i118.i.i ; <i32> [#uses=3]
HACK2: %tmp67.i.i190.i = sext i16 %tmp6.i.i189.i to i32 ; <i32> [#uses=1]
%tmp23.i.i187.i = sext i16 %tmp2.i.i186.i to i32 ; <i32> [#uses=1]
%tmp8.i.i191.i = add i32 %tmp67.i.i190.i, %tmp23.i.i187.i ; <i32> [#uses=3]
HACK2: %tmp67.i173.i.i.i = sext i16 %tmp6.i172.i.i.i to i32 ; <i32> [#uses=1]
%tmp23.i170.i.i.i = sext i16 %tmp2.i169.i.i.i to i32 ; <i32> [#uses=1]
%tmp8.i174.i.i.i = add i32 %tmp67.i173.i.i.i, %tmp23.i170.i.i.i ; <i32> [#uses=3]
HACK2: %tmp67.i152.i.i.i = sext i16 %tmp6.i151.i.i.i to i32 ; <i32> [#uses=1]
%tmp23.i149.i.i.i = sext i16 %tmp2.i148.i.i.i to i32 ; <i32> [#uses=1]
%tmp8.i153.i.i.i = add i32 %tmp67.i152.i.i.i, %tmp23.i149.i.i.i ; <i32> [#uses=3]
HACK2: %tmp67.i.i.i.i = sext i16 %tmp6.i.i.i.i to i32 ; <i32> [#uses=1]
%tmp23.i.i5.i.i = sext i16 %tmp2.i.i.i.i to i32 ; <i32> [#uses=1]
%tmp8.i.i7.i.i = add i32 %tmp67.i.i.i.i, %tmp23.i.i5.i.i ; <i32> [#uses=3]
This also fixes a bug in ComputeNumSignBits handling select and
makes it more aggressive with and/or.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51302
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 03:50:52 +0000 (03:50 +0000)]
fix two issues Neil noticed, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51296
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 20 May 2008 03:39:39 +0000 (03:39 +0000)]
Add a bool to isEdgeFeasible that tells it whether to treat unknown
value as undef or untracked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51295
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 03:20:09 +0000 (03:20 +0000)]
Fix ExecutionEngine's constant code to work properly when structs and arrays
will become first-class types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51293
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 03:01:48 +0000 (03:01 +0000)]
Refine the fix in r51169 to only apply when the operand val being
replaced is a PHI. This prevents it from inserting uses before defs
in the case that it isn't a PHI and it depends on other instructions
later in the block. This fixes the 447.dealII regression on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51292
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 20 May 2008 01:56:59 +0000 (01:56 +0000)]
runOnMachineFunction should set IsPIC because relocation model may have been changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51291
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 01:14:05 +0000 (01:14 +0000)]
Make AssociativeOpt static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51290
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 20 May 2008 00:54:39 +0000 (00:54 +0000)]
Run vortex-bug as x86-64, which is what the original bug was triggered on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51289
91177308-0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 20 May 2008 00:46:15 +0000 (00:46 +0000)]
Silence a warning about "*/" outside a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51287
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 19 May 2008 22:23:55 +0000 (22:23 +0000)]
Do not erase induction variable increment if it is used outside the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51280
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 19 May 2008 22:14:15 +0000 (22:14 +0000)]
Add a ComputeNumSignBits function for use by instcombine, based on the
code in SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51279
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 19 May 2008 21:38:18 +0000 (21:38 +0000)]
Handle quoted names when constructing $stub's,
$non_lazy_ptr's and $lazy_ptr's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 May 2008 21:17:23 +0000 (21:17 +0000)]
switch to Type::getFPMantissaWidth instead of reinventing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51275
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 May 2008 21:17:01 +0000 (21:17 +0000)]
add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51274
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 May 2008 20:27:56 +0000 (20:27 +0000)]
minor cleanups, teach instcombine that sitofp/uitofp cannot
produce a negative zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51272
91177308-0d34-0410-b5e6-
96231b3b80d8