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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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