oota-llvm.git
16 years agoTest case for noinline attribute.
Tanya Lattner [Wed, 6 Jun 2007 20:52:16 +0000 (20:52 +0000)]
Test case for noinline attribute.

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

16 years agosimplify this code and fix PR1493, now that llvm-gcc3 is dead.
Chris Lattner [Wed, 6 Jun 2007 20:51:41 +0000 (20:51 +0000)]
simplify this code and fix PR1493, now that llvm-gcc3 is dead.

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

16 years agoif internalize is disabled, don't run the pass at all!
Chris Lattner [Wed, 6 Jun 2007 20:51:14 +0000 (20:51 +0000)]
if internalize is disabled, don't run the pass at all!

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

16 years agoRevert changes for noinline.
Tanya Lattner [Wed, 6 Jun 2007 20:46:40 +0000 (20:46 +0000)]
Revert changes for noinline.

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

16 years agoAdd new dominator tree node into dominator tree node map.
Devang Patel [Wed, 6 Jun 2007 20:08:11 +0000 (20:08 +0000)]
Add new dominator tree node into dominator tree node map.

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

16 years agoupdate to match latest changes
Chris Lattner [Wed, 6 Jun 2007 18:28:13 +0000 (18:28 +0000)]
update to match latest changes

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

16 years agoAdd a test for PR1499.
Lauro Ramos Venancio [Wed, 6 Jun 2007 17:10:02 +0000 (17:10 +0000)]
Add a test for PR1499.

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

16 years agoFix PR1499.
Lauro Ramos Venancio [Wed, 6 Jun 2007 17:08:48 +0000 (17:08 +0000)]
Fix PR1499.

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

16 years agoQuick patch to fix the build, based on what it appears Evan meant to write.
Owen Anderson [Wed, 6 Jun 2007 16:22:00 +0000 (16:22 +0000)]
Quick patch to fix the build, based on what it appears Evan meant to write.

Evan, please check that this is in fact correct.

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

16 years agoFold the exception actions table harder: if two typeid lists start the
Duncan Sands [Wed, 6 Jun 2007 15:37:31 +0000 (15:37 +0000)]
Fold the exception actions table harder: if two typeid lists start the
same, only output one copy of the common part.

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

16 years agoOptimize this test. Firstly, only Instructions may use other Instructions.
Nick Lewycky [Wed, 6 Jun 2007 11:26:20 +0000 (11:26 +0000)]
Optimize this test. Firstly, only Instructions may use other Instructions.
Secondly, checking whether removal succeeded tells you whether it was in
the map to begin with.

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

16 years agoMark these instructions clobbersPred. They modify the condition code register.
Evan Cheng [Wed, 6 Jun 2007 10:17:05 +0000 (10:17 +0000)]
Mark these instructions clobbersPred. They modify the condition code register.

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

16 years agoLots of bug fixes.
Evan Cheng [Wed, 6 Jun 2007 10:16:17 +0000 (10:16 +0000)]
Lots of bug fixes.

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

16 years agoAdded clobbersPred.
Evan Cheng [Wed, 6 Jun 2007 10:15:28 +0000 (10:15 +0000)]
Added clobbersPred.

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

16 years agoAdd clobbersPred - instruction that clobbers condition code / register which are...
Evan Cheng [Wed, 6 Jun 2007 10:14:55 +0000 (10:14 +0000)]
Add clobbersPred - instruction that clobbers condition code / register which are used to predicate instructions.

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

16 years agoAdd a machine instruction flag indicating the instruction can clobber condition code...
Evan Cheng [Wed, 6 Jun 2007 10:13:55 +0000 (10:13 +0000)]
Add a machine instruction flag indicating the instruction can clobber condition code / register(s) used to predicate instructions.

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

16 years agoAdditional fix for PR1422: make sure the landing pad label is placed in the
Duncan Sands [Wed, 6 Jun 2007 10:05:18 +0000 (10:05 +0000)]
Additional fix for PR1422: make sure the landing pad label is placed in the
correct machine basic block - do not rely on the eh.exception intrinsic
being in the landing pad: the loop optimizers can move it out.

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

16 years ago"Simplified" testcase for PR1422.
Duncan Sands [Wed, 6 Jun 2007 09:59:53 +0000 (09:59 +0000)]
"Simplified" testcase for PR1422.

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

16 years agoInitial Mips support, here we go! =)
Bruno Cardoso Lopes [Wed, 6 Jun 2007 07:42:06 +0000 (07:42 +0000)]
Initial Mips support, here we go! =)
- Modifications from the last patch included
  (issues pointed by Evan Cheng are now fixed).
- Added more MipsI instructions.
- Added more patterns to match branch instructions.

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

16 years agoIgnore llvm.noinline
Tanya Lattner [Wed, 6 Jun 2007 05:53:50 +0000 (05:53 +0000)]
Ignore llvm.noinline

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

16 years agoFix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll
Nick Lewycky [Wed, 6 Jun 2007 04:12:20 +0000 (04:12 +0000)]
Fix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll

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

16 years agonew testcase for PR1487
Nick Lewycky [Wed, 6 Jun 2007 04:11:21 +0000 (04:11 +0000)]
new testcase for PR1487

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

16 years agoInform ScalarEvolutions that we're deleting Values.
Nick Lewycky [Wed, 6 Jun 2007 03:51:56 +0000 (03:51 +0000)]
Inform ScalarEvolutions that we're deleting Values.
This is the obviously correct part of the fix for PR1487.

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

16 years agoIf a unconditional branch is added to branch to the false path during ifcvt, the...
Evan Cheng [Wed, 6 Jun 2007 02:08:52 +0000 (02:08 +0000)]
If a unconditional branch is added to branch to the false path during ifcvt, the predicated block cannot be iteratively ifcvted.

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

16 years agoAdd simple full redundancy elimination.
Owen Anderson [Wed, 6 Jun 2007 01:27:49 +0000 (01:27 +0000)]
Add simple full redundancy elimination.

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

16 years agoFix PR1495 and CodeGen/X86/2007-06-05-LSR-Dominator.ll
Chris Lattner [Wed, 6 Jun 2007 01:23:55 +0000 (01:23 +0000)]
Fix PR1495 and CodeGen/X86/2007-06-05-LSR-Dominator.ll

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

16 years agoadd accessor
Chris Lattner [Wed, 6 Jun 2007 01:22:09 +0000 (01:22 +0000)]
add accessor

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

16 years agonew testcase for PR1495
Chris Lattner [Wed, 6 Jun 2007 01:21:46 +0000 (01:21 +0000)]
new testcase for PR1495

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

16 years agoMinor statistics counting bug.
Evan Cheng [Wed, 6 Jun 2007 01:12:44 +0000 (01:12 +0000)]
Minor statistics counting bug.

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

16 years agoBreak friendship.
Devang Patel [Wed, 6 Jun 2007 00:59:48 +0000 (00:59 +0000)]
Break friendship.

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

16 years agoFix a couple of typos and be smarter about order of blocks when ifcvt a diamond.
Evan Cheng [Wed, 6 Jun 2007 00:57:55 +0000 (00:57 +0000)]
Fix a couple of typos and be smarter about order of blocks when ifcvt a diamond.

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

16 years agoRename.
Devang Patel [Wed, 6 Jun 2007 00:49:02 +0000 (00:49 +0000)]
Rename.

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

16 years agoSimplify class hierarchy.
Devang Patel [Wed, 6 Jun 2007 00:46:36 +0000 (00:46 +0000)]
Simplify class hierarchy.

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

16 years agoAvoid non-trivial loop unswitching while optimizing for size.
Devang Patel [Wed, 6 Jun 2007 00:21:03 +0000 (00:21 +0000)]
Avoid non-trivial loop unswitching while optimizing for size.

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

16 years agoFix a user-reported error building with GCC 3.4.4 on Cygwin.
Chris Lattner [Tue, 5 Jun 2007 23:49:06 +0000 (23:49 +0000)]
Fix a user-reported error building with GCC 3.4.4 on Cygwin.

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

16 years agoFix diamond shape ifcvt bugs.
Evan Cheng [Tue, 5 Jun 2007 23:46:14 +0000 (23:46 +0000)]
Fix diamond shape ifcvt bugs.

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

16 years agoFix a misunderstanding of the algorithm. Really, we should be tracking values
Owen Anderson [Tue, 5 Jun 2007 23:46:12 +0000 (23:46 +0000)]
Fix a misunderstanding of the algorithm.  Really, we should be tracking values
and expression separately.  We can get around this, however, by only keeping
opaque values in TMP_GEN.

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

16 years agoDon't leak memory.
Owen Anderson [Tue, 5 Jun 2007 22:11:49 +0000 (22:11 +0000)]
Don't leak memory.

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

16 years agoReplaceUsesOfBlockWith() can modify the predecessors list.
Evan Cheng [Tue, 5 Jun 2007 22:03:53 +0000 (22:03 +0000)]
ReplaceUsesOfBlockWith() can modify the predecessors list.

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

16 years agoDo not ifcvt if either true / false path is a backedge. Not profitable in almost...
Evan Cheng [Tue, 5 Jun 2007 20:38:42 +0000 (20:38 +0000)]
Do not ifcvt if either true / false path is a backedge. Not profitable in almost all cases.

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

16 years agoFix PR 1497
Devang Patel [Tue, 5 Jun 2007 20:24:36 +0000 (20:24 +0000)]
Fix PR 1497
Use separate pass id for CFGOnlyPrinter.

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

16 years agoNew test.
Devang Patel [Tue, 5 Jun 2007 20:23:20 +0000 (20:23 +0000)]
New test.

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

16 years agoPrint predicate of the second instruction of the two-piece constant MI.
Evan Cheng [Tue, 5 Jun 2007 18:55:18 +0000 (18:55 +0000)]
Print predicate of the second instruction of the two-piece constant MI.

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

16 years agoFix a small bug, some 80 cols violations, and add some more debugging output.
Owen Anderson [Tue, 5 Jun 2007 17:31:23 +0000 (17:31 +0000)]
Fix a small bug, some 80 cols violations, and add some more debugging output.

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

16 years agoAllow insertelement, extractelement, and shufflevector to be hoisted/sunk
Dan Gohman [Tue, 5 Jun 2007 16:05:55 +0000 (16:05 +0000)]
Allow insertelement, extractelement, and shufflevector to be hoisted/sunk
by LICM.

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

16 years agoPIC label asm printing cosmetic changes.
Evan Cheng [Tue, 5 Jun 2007 07:36:38 +0000 (07:36 +0000)]
PIC label asm printing cosmetic changes.

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

16 years agoI had a senior moment.
Evan Cheng [Tue, 5 Jun 2007 07:05:25 +0000 (07:05 +0000)]
I had a senior moment.

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

16 years agoCommit first round work of PR1373. "noalias" is now fully supported in
Zhou Sheng [Tue, 5 Jun 2007 05:28:26 +0000 (05:28 +0000)]
Commit first round work of PR1373. "noalias" is now fully supported in
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.

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

16 years agoNew test.
Evan Cheng [Tue, 5 Jun 2007 01:45:08 +0000 (01:45 +0000)]
New test.

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

16 years agoIf the predicated block requires an early exit, end the block there and add a uncondi...
Evan Cheng [Tue, 5 Jun 2007 01:31:40 +0000 (01:31 +0000)]
If the predicated block requires an early exit, end the block there and add a unconditional branch to false block. AnalyzeBranch() does not understand early exits.

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

16 years agoFix some subtle bugs: bug during succeessor copying; incorrectly updating states...
Evan Cheng [Tue, 5 Jun 2007 00:07:37 +0000 (00:07 +0000)]
Fix some subtle bugs: bug during succeessor copying; incorrectly updating states of ifcvted blocks.

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

16 years agoPatches by Chuck Rose to unbreak V Studio builds.
Bill Wendling [Mon, 4 Jun 2007 23:52:59 +0000 (23:52 +0000)]
Patches by Chuck Rose to unbreak V Studio builds.

Thanks Chuck!

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

16 years agoTail merging wasn't working for predecessors of landing pads. PR 1496.
Dale Johannesen [Mon, 4 Jun 2007 23:52:54 +0000 (23:52 +0000)]
Tail merging wasn't working for predecessors of landing pads.  PR 1496.

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

16 years agos/ETNode::getChildren/ETNode::getETNodeChildren/g
Devang Patel [Mon, 4 Jun 2007 23:45:02 +0000 (23:45 +0000)]
s/ETNode::getChildren/ETNode::getETNodeChildren/g

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

16 years agoDon't use std::set_difference when the two sets are sorted differently. Compute
Owen Anderson [Mon, 4 Jun 2007 23:34:56 +0000 (23:34 +0000)]
Don't use std::set_difference when the two sets are sorted differently.  Compute
the difference manually instead.

This allows GVNPRE to produce correct analysis for the example in the GVNPRE
paper.

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

16 years agoFix a bunch of small bugs, and improve the debugging output significantly.
Owen Anderson [Mon, 4 Jun 2007 23:28:33 +0000 (23:28 +0000)]
Fix a bunch of small bugs, and improve the debugging output significantly.

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

16 years agoWhen rebuilding constant structs, make sure to honor the isPacked bit.
Chris Lattner [Mon, 4 Jun 2007 22:23:42 +0000 (22:23 +0000)]
When rebuilding constant structs, make sure to honor the isPacked bit.
This fixes PR1491 and GlobalOpt/2007-06-04-PackedStruct.ll

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

16 years agonew testcase for PR1491
Chris Lattner [Mon, 4 Jun 2007 22:23:17 +0000 (22:23 +0000)]
new testcase for PR1491

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

16 years agoGlobal ctors / dtors alignment shouldn't be hard-coded at 4. e.g. It could be 8 for...
Evan Cheng [Mon, 4 Jun 2007 20:39:18 +0000 (20:39 +0000)]
Global ctors / dtors alignment shouldn't be hard-coded at 4. e.g. It could be 8 for 64-bit targets.

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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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