oota-llvm.git
17 years agoForgot to check for if iterator reached the end.
Evan Cheng [Mon, 4 Jun 2007 20:33:36 +0000 (20:33 +0000)]
Forgot to check for if iterator reached the end.

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

17 years agoMisuse of hasExternalLinkage(), should be checking isDeclaration().
Evan Cheng [Mon, 4 Jun 2007 18:54:57 +0000 (18:54 +0000)]
Misuse of hasExternalLinkage(), should be checking isDeclaration().

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

17 years agoMake phi_translate correct.
Owen Anderson [Mon, 4 Jun 2007 18:05:26 +0000 (18:05 +0000)]
Make phi_translate correct.

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

17 years agoAdd FIXMEs.
Devang Patel [Mon, 4 Jun 2007 17:38:00 +0000 (17:38 +0000)]
Add FIXMEs.

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

17 years agoRemove unused method.
Devang Patel [Mon, 4 Jun 2007 16:49:36 +0000 (16:49 +0000)]
Remove unused method.

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

17 years agos/DominatorTree::createNewNode/DominatorTree::addNewBlock/g
Devang Patel [Mon, 4 Jun 2007 16:43:25 +0000 (16:43 +0000)]
s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g

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

17 years agoAdd basic block level interface to change immediate dominator
Devang Patel [Mon, 4 Jun 2007 16:22:33 +0000 (16:22 +0000)]
Add basic block level interface to change immediate dominator
and create new node.

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

17 years agoPass the DAG to SDNode::dump to let it do more detailed dumps in some cases.
Dan Gohman [Mon, 4 Jun 2007 16:17:33 +0000 (16:17 +0000)]
Pass the DAG to SDNode::dump to let it do more detailed dumps in some cases.

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

17 years agoRemove the operator<< for MVT::ValueType in preparation for MVT::ValueType
Dan Gohman [Mon, 4 Jun 2007 16:11:03 +0000 (16:11 +0000)]
Remove the operator<< for MVT::ValueType in preparation for MVT::ValueType
being changed from an enum to an integer type, which can't have a custom
operator<< overload.

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

17 years agoResolve implicit alignment before computing the FoldingSet information so
Dan Gohman [Mon, 4 Jun 2007 15:49:41 +0000 (15:49 +0000)]
Resolve implicit alignment before computing the FoldingSet information so
that the CSE map always contains explicit alignment information. This allows
more loads to be CSE'd when there is a mix of explicit-alignment loads and
implicit-alignment loads.

Also, in SelectionDAG::FindModifiedNodeSlot, add the operands to the
FoldingSetNodeID before the load/store information instead of after, so
that it matches what is done elsewhere.

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

17 years agoFix LLVM build on NetBSD. Patch by Neil Booth.
Devang Patel [Mon, 4 Jun 2007 15:28:57 +0000 (15:28 +0000)]
Fix LLVM build on NetBSD. Patch by Neil Booth.

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

17 years agoLet IfConverter loose. Allow more aggressive subsumptions; reorder basic blocks to...
Evan Cheng [Mon, 4 Jun 2007 06:47:22 +0000 (06:47 +0000)]
Let IfConverter loose. Allow more aggressive subsumptions; reorder basic blocks to expose more ifcvt opportunities; code clean up and fixes.

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

17 years agoMove ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock general...
Evan Cheng [Mon, 4 Jun 2007 06:44:01 +0000 (06:44 +0000)]
Move ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock general facility.

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

17 years agos/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
Devang Patel [Mon, 4 Jun 2007 00:32:22 +0000 (00:32 +0000)]
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g

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

17 years agoDon't use the custom comparator where it's not necessary.
Owen Anderson [Sun, 3 Jun 2007 22:02:14 +0000 (22:02 +0000)]
Don't use the custom comparator where it's not necessary.

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

17 years agoAdd comments to fallsthrough cases. Also, this fixes PR1492
Anton Korobeynikov [Sun, 3 Jun 2007 19:20:49 +0000 (19:20 +0000)]
Add comments to fallsthrough cases. Also, this fixes PR1492

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

17 years agoCheck arguments & return types of main(). Abort in case of no match.
Anton Korobeynikov [Sun, 3 Jun 2007 19:17:35 +0000 (19:17 +0000)]
Check arguments & return types of main(). Abort in case of no match.

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

17 years agos/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
Devang Patel [Sun, 3 Jun 2007 06:26:14 +0000 (06:26 +0000)]
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g

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

17 years agoRemove an unused method.
Owen Anderson [Sun, 3 Jun 2007 05:58:25 +0000 (05:58 +0000)]
Remove an unused method.

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

17 years agoThere's no need to have an Expression class... Value works just as well! This simpli...
Owen Anderson [Sun, 3 Jun 2007 05:55:58 +0000 (05:55 +0000)]
There's no need to have an Expression class... Value works just as well!  This simplifies a lot of code.

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

17 years agoupdate this entry, now that Anton implemented shift/and lowering for
Chris Lattner [Sat, 2 Jun 2007 18:45:14 +0000 (18:45 +0000)]
update this entry, now that Anton implemented shift/and lowering for
switches.  There is one really easy isel thing here with tst we are not
getting.

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

17 years agoThe semantics of invoke require that we always jump to the unwind block
Duncan Sands [Sat, 2 Jun 2007 17:16:06 +0000 (17:16 +0000)]
The semantics of invoke require that we always jump to the unwind block
(landing pad) when an exception unwinds through the call.  This doesn't
quite match the way the dwarf unwinder works: by default it only jumps to
the landing pad if the catch or filter specification matches, and otherwise
it keeps on unwinding.  There are two ways of specifying to the unwinder
that it should "always" (more on why there are quotes here later) jump to
the landing pad: follow the specification by a 0 typeid, or follow it by
the typeid for the NULL typeinfo.  GCC does the first, and this patch makes
LLVM do the same as gcc.  However there is a problem: the unwinder performs
optimizations based on C++ semantics (it only expects destructors to be
run if the 0 typeid fires - known as "cleanups"), meaning it assumes that no
exceptions will be raised and that the raised exception will be reraised
at the end of the cleanup code.  So if someone writes their own LLVM code
using the exception intrinsics they will get a nasty surprise if they don't
follow these rules.  The other possibility of using the typeid corresponding
to NULL (catch-all) causes the unwinder to make no assumptions, so this is
probably what we should use in the long-run.  However since we are still
having trouble getting exception handling working properly, for the moment
it seems best to closely imitate GCC.

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

17 years agoIntegrate exception filter support and exception catch support. This
Duncan Sands [Sat, 2 Jun 2007 16:53:42 +0000 (16:53 +0000)]
Integrate exception filter support and exception catch support.  This
simplifies the code in DwarfWriter, allows for multiple filters and
makes it trivial to specify filters accompanied by cleanups or catch-all
specifications (see next patch).  What a deal!  Patch blessed by Anton.

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

17 years agoMake LowerCTPOP() support arbitrary bitwidth integer type.
Zhou Sheng [Sat, 2 Jun 2007 04:10:33 +0000 (04:10 +0000)]
Make LowerCTPOP() support arbitrary bitwidth integer type.

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

17 years agoFix CorrectExtraCFGEdges to allow for multiple LandingPad targets.
Dale Johannesen [Sat, 2 Jun 2007 00:08:15 +0000 (00:08 +0000)]
Fix CorrectExtraCFGEdges to allow for multiple LandingPad targets.

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

17 years agoFancier algorithm in tail-merge comment implemented, so remove comment.
Dale Johannesen [Fri, 1 Jun 2007 23:04:28 +0000 (23:04 +0000)]
Fancier algorithm in tail-merge comment implemented, so remove comment.

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

17 years agoImplement smarter algorithm for choosing which blocks to tail-merge.
Dale Johannesen [Fri, 1 Jun 2007 23:02:45 +0000 (23:02 +0000)]
Implement smarter algorithm for choosing which blocks to tail-merge.
See test/CodeGen/X86/test-pic-jtbl.ll for a case where it works well;
shaves another 10K off our favorite benchmark.  I was hesitant about
this because of compile speed, but seems to do OK on a bootstrap.

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

17 years agoFor PR1486:
Reid Spencer [Fri, 1 Jun 2007 22:23:29 +0000 (22:23 +0000)]
For PR1486:
Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth
to be set to 0 (illegal) producing a subsequent assert.

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

17 years agoInsert new instructions in AliasSet.
Devang Patel [Fri, 1 Jun 2007 22:15:31 +0000 (22:15 +0000)]
Insert new instructions in AliasSet.

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

17 years agoclean() needs to process things in topological order.
Owen Anderson [Fri, 1 Jun 2007 22:00:37 +0000 (22:00 +0000)]
clean() needs to process things in topological order.

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

17 years agoOpcode modifier s comes after condition code. e.g. addlts, not addslt.
Evan Cheng [Fri, 1 Jun 2007 20:51:29 +0000 (20:51 +0000)]
Opcode modifier s comes after condition code. e.g. addlts, not addslt.

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

17 years agoCorrectly mark early-exit on the false path.
Evan Cheng [Fri, 1 Jun 2007 20:29:21 +0000 (20:29 +0000)]
Correctly mark early-exit on the false path.

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

17 years agoFix Expression comparison, which in turn fixes a value numbering error.
Owen Anderson [Fri, 1 Jun 2007 17:34:47 +0000 (17:34 +0000)]
Fix Expression comparison, which in turn fixes a value numbering error.

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

17 years agoSet ARM ifcvt duplication limit to 3 for now.
Evan Cheng [Fri, 1 Jun 2007 08:28:59 +0000 (08:28 +0000)]
Set ARM ifcvt duplication limit to 3 for now.

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

17 years agoTarget specific ifcvt code duplication limit.
Evan Cheng [Fri, 1 Jun 2007 08:25:24 +0000 (08:25 +0000)]
Target specific ifcvt code duplication limit.

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

17 years agoSince TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passed
Duncan Sands [Fri, 1 Jun 2007 08:18:30 +0000 (08:18 +0000)]
Since TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passed
as a null i8 pointer not as a 0 i32.

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

17 years agoIfcvt triangle: don't ifcvt 'true' BB if it has other predecessors; don't merge ...
Evan Cheng [Fri, 1 Jun 2007 07:41:07 +0000 (07:41 +0000)]
Ifcvt triangle: don't ifcvt 'true' BB if it has other predecessors; don't merge 'false' BB if it has other predecessors.

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

17 years agoMake jumptable non-predicable for now.
Evan Cheng [Fri, 1 Jun 2007 00:56:15 +0000 (00:56 +0000)]
Make jumptable non-predicable for now.

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

17 years agoRemove a bogus check. Even terminators in a ifcvt need to be predicated. Unconditiona...
Evan Cheng [Fri, 1 Jun 2007 00:55:26 +0000 (00:55 +0000)]
Remove a bogus check. Even terminators in a ifcvt need to be predicated. Unconditional branches can usually be converted to conditional ones.

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

17 years agoAllow multiple ifcvt candidates to share children blocks; add some debugging code.
Evan Cheng [Fri, 1 Jun 2007 00:12:12 +0000 (00:12 +0000)]
Allow multiple ifcvt candidates to share children blocks; add some debugging code.

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

17 years agoAdd a topological sort function.
Owen Anderson [Thu, 31 May 2007 22:44:11 +0000 (22:44 +0000)]
Add a topological sort function.

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

17 years agoArrange for only 1 of multiple branches to landing pad to be kept.
Dale Johannesen [Thu, 31 May 2007 21:54:00 +0000 (21:54 +0000)]
Arrange for only 1 of multiple branches to landing pad to be kept.
Do not remove empty landing pads (EH table needs to be updated)

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

17 years agoFix a typo.
Evan Cheng [Thu, 31 May 2007 20:53:33 +0000 (20:53 +0000)]
Fix a typo.

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

17 years agoFix the asmprinter so that a globalvalue can specify an explicit alignment
Chris Lattner [Thu, 31 May 2007 18:57:45 +0000 (18:57 +0000)]
Fix the asmprinter so that a globalvalue can specify an explicit alignment
smaller than the preferred alignment, but so that the target can actually
specify a minimum alignment if needed.  This fixes some objc protocol
failures Devang tracked down.

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

17 years agoAdd a test for PR1424.
Lauro Ramos Venancio [Thu, 31 May 2007 18:36:07 +0000 (18:36 +0000)]
Add a test for PR1424.

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

17 years agoFix PR1424.
Lauro Ramos Venancio [Thu, 31 May 2007 18:27:58 +0000 (18:27 +0000)]
Fix PR1424.
When a function has FP, the register scavenging spill slot offset already
was calculated.

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

17 years agoAlphabetize Bruno's entry.
Bill Wendling [Thu, 31 May 2007 04:14:28 +0000 (04:14 +0000)]
Alphabetize Bruno's entry.

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

17 years agoNew contributor added!
Bruno Cardoso Lopes [Thu, 31 May 2007 03:25:10 +0000 (03:25 +0000)]
New contributor added!

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

17 years agoAttempt to fix up phi_translate.
Owen Anderson [Thu, 31 May 2007 00:42:15 +0000 (00:42 +0000)]
Attempt to fix up phi_translate.

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

17 years agoChange traversal order to bottom up in preparation for more aggressive if-conversion.
Evan Cheng [Wed, 30 May 2007 19:49:19 +0000 (19:49 +0000)]
Change traversal order to bottom up in preparation for more aggressive if-conversion.

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

17 years agoFix CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll, and PR1473.
Chris Lattner [Wed, 30 May 2007 16:30:06 +0000 (16:30 +0000)]
Fix CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll, and PR1473.

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

17 years agonew testcase for PR1473
Chris Lattner [Wed, 30 May 2007 16:29:20 +0000 (16:29 +0000)]
new testcase for PR1473

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

17 years agoFix typo.
Devang Patel [Wed, 30 May 2007 15:29:37 +0000 (15:29 +0000)]
Fix typo.

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

17 years agoTestcase for
Duncan Sands [Wed, 30 May 2007 10:16:19 +0000 (10:16 +0000)]
Testcase for
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070528/050047.html

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

17 years agoFix Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll and the second
Chris Lattner [Wed, 30 May 2007 06:11:23 +0000 (06:11 +0000)]
Fix Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll and the second
half of PR1421, by not decimating structs with holes that are the source and
destination of a memcpy.

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

17 years agoTestcase for PR1421
Chris Lattner [Wed, 30 May 2007 06:10:46 +0000 (06:10 +0000)]
Testcase for PR1421

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

17 years agonew testcase for PR1421
Chris Lattner [Wed, 30 May 2007 05:37:18 +0000 (05:37 +0000)]
new testcase for PR1421

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

17 years agoChanged per review comment.
Dale Johannesen [Wed, 30 May 2007 00:32:01 +0000 (00:32 +0000)]
Changed per review comment.

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

17 years agoMake stable_sort in tail merging actually be stable (it never was, but didn't
Dale Johannesen [Tue, 29 May 2007 23:47:50 +0000 (23:47 +0000)]
Make stable_sort in tail merging actually be stable (it never was, but didn't
matter until my last change).  Reenable tail merging by default.

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

17 years agoDon't merge in tail block of a diamond if it has more than one predecessors after...
Evan Cheng [Tue, 29 May 2007 23:37:20 +0000 (23:37 +0000)]
Don't merge in tail block of a diamond if it has more than one predecessors after if-conversion.

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

17 years agoPut GVN-PRE in all the right places.
Owen Anderson [Tue, 29 May 2007 23:36:32 +0000 (23:36 +0000)]
Put GVN-PRE in all the right places.

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

17 years agoFor VFP2 fldm, fstm instructions, the condition code is printed after the address...
Evan Cheng [Tue, 29 May 2007 23:34:19 +0000 (23:34 +0000)]
For VFP2 fldm, fstm instructions, the condition code is printed after the address mode and size specifier. e.g. fstmiaseq, not fstmeqias.

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

17 years agoFix a typo
Owen Anderson [Tue, 29 May 2007 23:34:14 +0000 (23:34 +0000)]
Fix a typo

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

17 years agoFor ldrb, strh, etc., the condition code is before the width specifier. e.g. streqh...
Evan Cheng [Tue, 29 May 2007 23:32:06 +0000 (23:32 +0000)]
For ldrb, strh, etc., the condition code is before the width specifier. e.g. streqh, not strheq.

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

17 years agoRe-fix a bug, where I was now being too aggressive.
Owen Anderson [Tue, 29 May 2007 23:26:30 +0000 (23:26 +0000)]
Re-fix a bug, where I was now being too aggressive.

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

17 years agoUse proper debugging facilities so other people don't have to look at my commented-out
Owen Anderson [Tue, 29 May 2007 23:15:21 +0000 (23:15 +0000)]
Use proper debugging facilities so other people don't have to look at my commented-out
debugging lines.

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

17 years agoComment debug code out that I accidentally uncommented last time.
Owen Anderson [Tue, 29 May 2007 22:43:03 +0000 (22:43 +0000)]
Comment debug code out that I accidentally uncommented last time.

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

17 years agoAdd a place where I missed using the maximal set. Note that using the maximal
Owen Anderson [Tue, 29 May 2007 22:35:41 +0000 (22:35 +0000)]
Add a place where I missed using the maximal set.  Note that using the maximal
set this way is _SLOW_.  Somewhere down the line, I'll look at speeding it up.

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

17 years agoIf there is an empty block between a source and its successor block, it still require...
Evan Cheng [Tue, 29 May 2007 22:31:16 +0000 (22:31 +0000)]
If there is an empty block between a source and its successor block, it still requires a unconditional branch.

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

17 years agoVery first part of a GVN-PRE implementation. It currently performs a bunch of analys...
Owen Anderson [Tue, 29 May 2007 21:53:49 +0000 (21:53 +0000)]
Very first part of a GVN-PRE implementation.  It currently performs a bunch of analysis, and nothing more.  It is also quite slow for the moment.  However,
it should give a sense of what's going on.

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

17 years agoAdd missing const qualifiers.
Evan Cheng [Tue, 29 May 2007 18:42:18 +0000 (18:42 +0000)]
Add missing const qualifiers.

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

17 years agoAdd missing const qualifiers.
Evan Cheng [Tue, 29 May 2007 18:35:22 +0000 (18:35 +0000)]
Add missing const qualifiers.

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

17 years agoImplementation of compilation callback in PPC ELF32
Nicolas Geoffray [Tue, 29 May 2007 16:33:18 +0000 (16:33 +0000)]
Implementation of compilation callback in PPC ELF32

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

17 years agomore fixes to C code.
Chris Lattner [Tue, 29 May 2007 15:43:56 +0000 (15:43 +0000)]
more fixes to C code.

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

17 years agoFixed some formatting.
Bill Wendling [Tue, 29 May 2007 09:42:13 +0000 (09:42 +0000)]
Fixed some formatting.

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

17 years agoAdded "llvmc" to the FAQ.
Bill Wendling [Tue, 29 May 2007 09:35:34 +0000 (09:35 +0000)]
Added "llvmc" to the FAQ.

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

17 years agoAdded "doc_class" div tags to code segments.
Bill Wendling [Tue, 29 May 2007 09:24:33 +0000 (09:24 +0000)]
Added "doc_class" div tags to code segments.

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

17 years agoFix for PR1452. Removed "define" keyword from the C code. Added "<div
Bill Wendling [Tue, 29 May 2007 09:04:49 +0000 (09:04 +0000)]
Fix for PR1452. Removed "define" keyword from the C code. Added "<div
class="doc_code">" to code examples.

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

17 years agoAdd a new LLVMBuilder class, which makes it simpler and more uniform to
Chris Lattner [Sun, 27 May 2007 15:09:34 +0000 (15:09 +0000)]
Add a new LLVMBuilder class, which makes it simpler and more uniform to
create large amounts of instructions by separating the insertion point
logic from the logic of what to create.

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

17 years agoCorrect the logic in LowerPartSet which cleared the bits from 0 to low-1.
Zhou Sheng [Sat, 26 May 2007 03:43:13 +0000 (03:43 +0000)]
Correct the logic in LowerPartSet which cleared the bits from 0 to low-1.

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

17 years agotighten up recursion depth again
Chris Lattner [Fri, 25 May 2007 02:19:06 +0000 (02:19 +0000)]
tighten up recursion depth again

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

17 years agoDisable Tail Merging for now.
Devang Patel [Fri, 25 May 2007 01:00:24 +0000 (01:00 +0000)]
Disable Tail  Merging for now.

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

17 years agoSilly boog.
Evan Cheng [Fri, 25 May 2007 00:59:01 +0000 (00:59 +0000)]
Silly boog.

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

17 years agoremove contradiction owen noticed
Chris Lattner [Thu, 24 May 2007 19:13:27 +0000 (19:13 +0000)]
remove contradiction owen noticed

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

17 years agoFix PR1446 by not scalarrepl'ing giant structures.
Chris Lattner [Thu, 24 May 2007 18:43:04 +0000 (18:43 +0000)]
Fix PR1446 by not scalarrepl'ing giant structures.

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

17 years agotestcase for PR1446
Chris Lattner [Thu, 24 May 2007 18:42:47 +0000 (18:42 +0000)]
testcase for PR1446

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

17 years agoBlocks that cond-br and uncond-br/fallthrough to same block should have
Dale Johannesen [Thu, 24 May 2007 18:31:55 +0000 (18:31 +0000)]
Blocks that cond-br and uncond-br/fallthrough to same block should have
only one successor.

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

17 years agoFix for PR1444: do not create two successors to the same block.
Dale Johannesen [Thu, 24 May 2007 17:39:32 +0000 (17:39 +0000)]
Fix for PR1444: do not create two successors to the same block.
Temporarily, this breaks CodeGen/Generic/2006-02-12-InsertLibraryCall.ll
by exposing an unrelated latent problem; working on that.

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

17 years agoCompute the correct word number.
Zhou Sheng [Thu, 24 May 2007 15:03:18 +0000 (15:03 +0000)]
Compute the correct word number.

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

17 years agoMinor comment cleanups.
Dan Gohman [Thu, 24 May 2007 14:36:04 +0000 (14:36 +0000)]
Minor comment cleanups.

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

17 years agoAdd explicit qualification for namespace MVT members.
Dan Gohman [Thu, 24 May 2007 14:33:05 +0000 (14:33 +0000)]
Add explicit qualification for namespace MVT members.

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

17 years agoAdd cases for v2f32.
Dan Gohman [Thu, 24 May 2007 14:29:12 +0000 (14:29 +0000)]
Add cases for v2f32.

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

17 years agoFix a typo that caused combiner to create mal-formed pre-indexed store where value...
Evan Cheng [Thu, 24 May 2007 02:35:39 +0000 (02:35 +0000)]
Fix a typo that caused combiner to create mal-formed pre-indexed store where value store is the same as the base pointer.

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

17 years agoAdd a new test case.
Evan Cheng [Thu, 24 May 2007 02:31:15 +0000 (02:31 +0000)]
Add a new test case.

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

17 years agotail merging shrinks this code a bit. Could do more in future.
Dale Johannesen [Wed, 23 May 2007 21:09:26 +0000 (21:09 +0000)]
tail merging shrinks this code a bit.  Could do more in future.

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

17 years agoTwo tail merging improvements:
Dale Johannesen [Wed, 23 May 2007 21:07:20 +0000 (21:07 +0000)]
Two tail merging improvements:
When considering blocks with more than 2 predecessors, merge the block with
the largest number of matching insns, rather than the first block found.
Considering that 1 matching insn is enough to show a win for candidates that
already end with a branch.

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

17 years agoAdd dump() routines for debugging assistance.
Devang Patel [Wed, 23 May 2007 19:55:36 +0000 (19:55 +0000)]
Add dump() routines for debugging assistance.

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

17 years agoMark all calls as "could throw", when exceptions are enabled. Emit necessary LP info...
Anton Korobeynikov [Wed, 23 May 2007 11:08:31 +0000 (11:08 +0000)]
Mark all calls as "could throw", when exceptions are enabled. Emit necessary LP info too. This fixes PR1439

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

17 years agoprevent exponential recursion in isNegatibleForFree
Chris Lattner [Wed, 23 May 2007 07:35:22 +0000 (07:35 +0000)]
prevent exponential recursion in isNegatibleForFree

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

17 years agoPreliminary iterative if-conversion support.
Evan Cheng [Wed, 23 May 2007 07:23:16 +0000 (07:23 +0000)]
Preliminary iterative if-conversion support.

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