Commit Graph

32798 Commits

Author SHA1 Message Date
Chris Lattner b08cbbd737 Disable the (A == (B-A)) -> 2*A == B xform when the sub has multiple uses (in
this case, the xform introduces an extra operation).  This compiles
PowerPC/compare-duplicate.ll into:

_test:
        subf r2, r3, r4
        cmplw cr0, r2, r3
        bne cr0, LBB1_2 ;F

instead of:

_test:
        slwi r2, r3, 1
        subf r3, r3, r4
        cmplw cr0, r4, r2
        bne cr0, LBB1_2 ;F

This is target independent of course.

llvm-svn: 37246
2007-05-19 00:43:44 +00:00
Chris Lattner bde968823a new testcase
llvm-svn: 37245
2007-05-19 00:41:40 +00:00
Reid Spencer b6af1aae35 Fix an assertion introduced by my last change to the toString method. We
can't use getZExtValue() to extract the low order bits for each digit.
Instead, we need to access the low order word directly.

llvm-svn: 37242
2007-05-19 00:29:55 +00:00
Dan Gohman c12dd5207d Apply this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070514/049845.html

llvm-svn: 37240
2007-05-18 23:21:46 +00:00
Chris Lattner 7ea2df6e2a add a note
llvm-svn: 37239
2007-05-18 20:18:14 +00:00
Dan Gohman 6164a1b279 Add a testcase for unrolling loops with unknown tripcounts.
llvm-svn: 37238
2007-05-18 19:59:23 +00:00
Evan Cheng 018cffbca4 Clean up.
llvm-svn: 37237
2007-05-18 19:32:08 +00:00
Evan Cheng faaf716540 Change to depth-first traversal.
llvm-svn: 37236
2007-05-18 19:26:33 +00:00
Dale Johannesen dafda82755 Document an inefficiency in tail merging.
llvm-svn: 37235
2007-05-18 18:46:40 +00:00
Dan Gohman eefa83e67b Use MVT::FIRST_VECTOR_VALUETYPE and MVT::LAST_VECTOR_VALUETYPE.
llvm-svn: 37234
2007-05-18 18:44:07 +00:00
Dan Gohman b539df3389 Qualify calls to getTypeForValueType with MVT:: too.
llvm-svn: 37233
2007-05-18 18:41:29 +00:00
Evan Cheng 2e82cefd24 Some restructuring in preparation for most aggressive if-conversion.
llvm-svn: 37231
2007-05-18 18:14:37 +00:00
Dan Gohman 1796f1f8e9 Qualify several calls to functions in the MVT namespace, for consistency.
llvm-svn: 37230
2007-05-18 17:52:13 +00:00
Evan Cheng f25d3a5d73 Watch out for blocks that end with a return.
llvm-svn: 37227
2007-05-18 17:06:53 +00:00
Duncan Sands 76256a069c Fix typo.
llvm-svn: 37224
2007-05-18 12:13:34 +00:00
Duncan Sands ea7a326468 Fix typo.
llvm-svn: 37223
2007-05-18 09:04:20 +00:00
Chris Lattner 3d1937591d better portability for intptr_t.
llvm-svn: 37221
2007-05-18 07:07:05 +00:00
Chris Lattner feadc1ebdc finished the first draft
llvm-svn: 37219
2007-05-18 06:38:51 +00:00
Chris Lattner 727c3740e4 crank out notes
llvm-svn: 37218
2007-05-18 06:33:02 +00:00
Reid Spencer ac1c2d93f1 Regenerate.
llvm-svn: 37207
2007-05-18 05:48:07 +00:00
Chris Lattner 6d84cdcfee validation fix
llvm-svn: 37206
2007-05-18 05:38:44 +00:00
Chris Lattner 5538349a7c validation fixes
llvm-svn: 37205
2007-05-18 05:36:14 +00:00
Chris Lattner 9eeada9470 Fix PR1434 and test/Linker/link-archive.ll, this is a regression from 1.9.
llvm-svn: 37204
2007-05-18 04:02:46 +00:00
Reid Spencer 7aed8fccfd Add a test case for PR1434
llvm-svn: 37203
2007-05-18 03:46:50 +00:00
Reid Spencer d266c18c0e Avoid an infinite loop when TestRunner.sh is run outside of the test dir.
llvm-svn: 37201
2007-05-18 02:06:03 +00:00
Evan Cheng 478b805956 If true / false blocks fallthrough before ifcvt, add unconditional branches to ifcvt'd block.
llvm-svn: 37200
2007-05-18 01:55:58 +00:00
Evan Cheng 4ae1840d21 Mark calls non-predicable for now. Need to ensure it's the last instruction in the if-converted block or make sure it preserve condition code.
llvm-svn: 37199
2007-05-18 01:53:54 +00:00
Dale Johannesen f8956178af Remove some unneeded branches. (spotted by Evan, thanks)
llvm-svn: 37198
2007-05-18 01:28:58 +00:00
Evan Cheng ea623560f8 Silence some compilation warnings.
llvm-svn: 37197
2007-05-18 01:19:57 +00:00
Chris Lattner e0c1df4919 tweak
llvm-svn: 37196
2007-05-18 00:44:29 +00:00
Evan Cheng 0f745da4fe Make use of target specific block size limits; bug fixes.
llvm-svn: 37195
2007-05-18 00:20:58 +00:00
Evan Cheng 6addd65914 Set ARM if-conversion block size threshold to 10 instructions for now.
llvm-svn: 37194
2007-05-18 00:19:34 +00:00
Evan Cheng e20dd92792 RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.
llvm-svn: 37193
2007-05-18 00:18:17 +00:00
Evan Cheng 99be49dd9b RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.
llvm-svn: 37192
2007-05-18 00:05:48 +00:00
Evan Cheng c0dc382fb7 Fix comment.
llvm-svn: 37191
2007-05-18 00:00:30 +00:00
Evan Cheng a92b2b38ff Move isSuccessor() offline, change it to use std::find.
llvm-svn: 37190
2007-05-17 23:58:53 +00:00
Reid Spencer 07aa66887c Fix a problem with building .y files when BISON is not present.
Merged from the release_20 branch.

llvm-svn: 37188
2007-05-17 22:51:35 +00:00
Devang Patel 2c30a37a5c Fix PR1431
Test case at Transformations/SCCP/2007-05-16-InvokeCrash.ll

llvm-svn: 37185
2007-05-17 22:10:15 +00:00
Devang Patel f9ed308aba New test.
llvm-svn: 37184
2007-05-17 22:05:20 +00:00
Chris Lattner 6fd9b5e816 validation fixes
llvm-svn: 37183
2007-05-17 22:03:43 +00:00
Chris Lattner 2f131fe30d llvm-gcc now supports almost all gcc extensions. The key missing one is
builtin_apply.

llvm-svn: 37182
2007-05-17 22:02:24 +00:00
Chris Lattner 8ce1ba466f add a section about API changes.
llvm-svn: 37181
2007-05-17 21:41:31 +00:00
Dale Johannesen 58698d2534 More effective breakdown of memcpy into repeated load/store. These are now
in the order lod;lod;lod;sto;sto;sto which means the load-store optimizer
has a better chance of producing ldm/stm.  Ideally you would get cooperation
from the RA as well but this is not there yet.

llvm-svn: 37179
2007-05-17 21:31:21 +00:00
Dan Gohman 99ec2d88fb Correct a name in a comment.
llvm-svn: 37178
2007-05-17 21:30:39 +00:00
Chris Lattner e1047b2cfe silence some "comparison between signed and unsigned integer expressions"
warnings

llvm-svn: 37177
2007-05-17 20:01:40 +00:00
Chris Lattner 70c2175ed2 minor tweak
llvm-svn: 37176
2007-05-17 19:58:57 +00:00
Reid Spencer 5c138133b7 Get rid of leading zeros in the output of toString.
llvm-svn: 37175
2007-05-17 19:23:02 +00:00
Evan Cheng 0465aca5d2 New test case.
llvm-svn: 37174
2007-05-17 18:49:50 +00:00
Evan Cheng afa1cb6da3 Fix a bogus check that prevented folding VECTOR_SHUFFLE to UNDEF; add an optimization to fold VECTOR_SHUFFLE to a zero vector.
llvm-svn: 37173
2007-05-17 18:45:50 +00:00
Evan Cheng 632c3f01ed Added missing patterns for UNPCKH* and PUNPCKH*.
llvm-svn: 37172
2007-05-17 18:44:37 +00:00
Dan Gohman 26b4ef76d9 Fix some sporadic segfaults that are triggered when SmallVector's heap
storage lands near the end of the available address space. In the expression
Begin+N > Capacity, the Begin+N was overflowing. Fix this by replacing it
by with an expression that doesn't involve computation of an address
beyond the end of allocated memory.

llvm-svn: 37171
2007-05-17 18:29:01 +00:00
Chris Lattner 7bee9ad4f7 add testcase for 128-bit add/sub
llvm-svn: 37170
2007-05-17 18:22:37 +00:00
Chris Lattner 0184f88deb disable MaskedValueIsZero, ComputeMaskedBits, and SimplifyDemandedBits for
i128 integers.  The 64-bit masks are not wide enough to represent the results.
These should be converted to APInt someday.

llvm-svn: 37169
2007-05-17 18:19:23 +00:00
Chris Lattner 2135bc08d6 add expand support for ADDC/SUBC/ADDE/SUBE so we can codegen 128-bit add/sub on 32-bit (or less) targets
llvm-svn: 37168
2007-05-17 18:15:41 +00:00
Reid Spencer 184a2c5a67 Regenerate.
llvm-svn: 37166
2007-05-17 18:11:03 +00:00
Reid Spencer ce90cbb5e1 Make Perl a required dependency and cause configure script to fail if it
is not found.

llvm-svn: 37164
2007-05-17 18:06:19 +00:00
Chris Lattner dade607f19 This is the correct fix for PR1427. This fixes mmx-shuffle.ll and doesn't
cause other regressions.

llvm-svn: 37160
2007-05-17 17:13:13 +00:00
Anton Korobeynikov 1ad4618715 Revert patch for PR1427. It breaks almost all vector tests.
llvm-svn: 37159
2007-05-17 07:50:14 +00:00
Chris Lattner 3e549e9d5f add support for 128-bit add/sub on ppc64
llvm-svn: 37158
2007-05-17 06:52:46 +00:00
Reid Spencer 07ae5465cd Print integer values as both decimal and hexadecimal for convenience
of verifying result values when debugging.

llvm-svn: 37156
2007-05-17 06:47:54 +00:00
Chris Lattner 13f4bf5c5e add support for 128-bit integer add/sub
llvm-svn: 37154
2007-05-17 06:35:11 +00:00
Reid Spencer fffdf10566 For lshr by 0 bits, just return *this as a short cut. This also prevents
undefined behavior when the width > 64 bits.

llvm-svn: 37153
2007-05-17 06:26:29 +00:00
Devang Patel 2648effb23 New test.
llvm-svn: 37151
2007-05-17 06:22:12 +00:00
Chris Lattner 6a5a46322f Fix PR1427 and test/CodeGen/X86/mmx-shuffle.ll
llvm-svn: 37141
2007-05-17 03:29:42 +00:00
Chris Lattner 5de4944f70 testcase for PR1427
llvm-svn: 37140
2007-05-17 03:29:17 +00:00
Evan Cheng 2db22024cf Remove. Not needed.
llvm-svn: 37139
2007-05-17 00:11:35 +00:00
Evan Cheng 733b4bd8ae Default implementation of TargetInstrInfo::getBlockSize().
llvm-svn: 37138
2007-05-16 23:53:44 +00:00
Evan Cheng 429178d727 Add target hook to specify block size limit for if-conversion.
llvm-svn: 37134
2007-05-16 23:45:53 +00:00
Tanya Lattner 6ee68ca990 Merged in both release announcement guts.
llvm-svn: 37131
2007-05-16 23:25:46 +00:00
Dale Johannesen 7a6c175e7a Don't fold bitconvert(load) for preinc/postdec loads. Likewise stores.
llvm-svn: 37130
2007-05-16 22:45:30 +00:00
Evan Cheng af71610429 isBlockPredicable() always ignore terminal instructions; add comments.
llvm-svn: 37126
2007-05-16 21:54:37 +00:00
Evan Cheng 1634e7186b ARM::tB is also predicable.
llvm-svn: 37125
2007-05-16 21:53:43 +00:00
Evan Cheng dcff2eb0e8 PredicateInstruction returns true if the operation was successful.
llvm-svn: 37124
2007-05-16 21:53:07 +00:00
Evan Cheng 973c3739b0 Add default implementation of PredicateInstruction().
llvm-svn: 37123
2007-05-16 21:20:37 +00:00
Evan Cheng 5ea933a009 Rename M_PREDICATED to M_PREDICABLE; Moved isPredicable() to MachineInstr.
llvm-svn: 37121
2007-05-16 20:56:08 +00:00
Evan Cheng 4423687831 Move if-conversion after all passes that may use register scavenger.
llvm-svn: 37120
2007-05-16 20:52:46 +00:00
Evan Cheng e2762c3d68 Removed isPredicable().
llvm-svn: 37119
2007-05-16 20:50:23 +00:00
Evan Cheng dcd6cdf896 Make ARM::B isPredicable; Make Bcc and MOVCC condition option a normal operand so they are not predicable.
llvm-svn: 37118
2007-05-16 20:50:01 +00:00
Evan Cheng cc33218607 Added isPredicable bit to class Instruction.
llvm-svn: 37117
2007-05-16 20:47:01 +00:00
Evan Cheng b99726d7a0 Rename M_PREDICATED to M_PREDICABLE; opcode can be specified isPredicable without having a PredicateOperand.
llvm-svn: 37116
2007-05-16 20:45:24 +00:00
Evan Cheng b862b46aac Rename M_PREDICATED to M_PREDICABLE; Move TargetInstrInfo::isPredicatable() to MachineInstr::isPredicable().
llvm-svn: 37115
2007-05-16 20:43:42 +00:00
Reid Spencer a93c981f66 Fix a bug in the "fromString" method where radix 2,8 and 16 values were
not being generated correctly because the shl operator does not mutate its
object but returns a new value. Also, make the distinction between radix
16 and the others more clear.

llvm-svn: 37111
2007-05-16 19:18:22 +00:00
Reid Spencer 138249b8ca Update for arbitrary precision integer types.
llvm-svn: 37109
2007-05-16 18:44:01 +00:00
Reid Spencer 99e813eee9 Fix PR1355: Only compute the SUBPATH and TESTDIR once.
llvm-svn: 37108
2007-05-16 17:56:56 +00:00
Devang Patel 95e2b7b59e Fix PR number.
llvm-svn: 37107
2007-05-16 16:51:31 +00:00
Devang Patel 7d6b9e057c New test for PR1417
llvm-svn: 37106
2007-05-16 16:50:32 +00:00
Reid Spencer 1925c537f2 Avoid a "loss of precision" error in gcc 4.1.3.
llvm-svn: 37105
2007-05-16 16:39:29 +00:00
Duncan Sands 59ae77486c Output exception call-sites in address order, as required by the unwinding
runtime.

llvm-svn: 37104
2007-05-16 12:12:23 +00:00
Evan Cheng 01a4227ed1 Conditional branch is not a barrier.
llvm-svn: 37103
2007-05-16 07:45:54 +00:00
Chris Lattner 48fb92f75d Use a ptr set instead of a linear search to unique TokenFactor operands.
This fixes PR1423

llvm-svn: 37102
2007-05-16 06:37:59 +00:00
Chris Lattner 1087473e51 testcase for maskmovq
llvm-svn: 37101
2007-05-16 06:14:10 +00:00
Chris Lattner 888653cdba implement the missing maskmovq mmx intrinsic that akor hit.
llvm-svn: 37100
2007-05-16 06:08:17 +00:00
Chris Lattner bf7366e908 add missing mmx intrinsic
llvm-svn: 37099
2007-05-16 06:03:49 +00:00
Evan Cheng c95f95b6da Fix comment.
llvm-svn: 37098
2007-05-16 05:14:06 +00:00
Evan Cheng 35fc2119b0 Devang points out that we need an assertion here.
llvm-svn: 37097
2007-05-16 05:11:10 +00:00
Evan Cheng c4f5ac8383 Fix comments.
llvm-svn: 37096
2007-05-16 05:09:34 +00:00
Reid Spencer 65ba7501fc Implement printing of instruction result values when debug info is turned
on. This helps to speed up the debugging time by showing computational
results as the program executes.

llvm-svn: 37095
2007-05-16 02:05:13 +00:00
Evan Cheng 288f133c71 Bug fix: should check ABI alignment, not pref. alignment.
llvm-svn: 37094
2007-05-16 02:04:50 +00:00
Evan Cheng ad3aac71ce Hooks for predication support.
llvm-svn: 37093
2007-05-16 02:01:49 +00:00
Evan Cheng f5e53a58db Initial commit of (very basic) if converter.
llvm-svn: 37092
2007-05-16 02:00:57 +00:00
Evan Cheng eb3176552e Add TargetInstrInfo predication hooks.
llvm-svn: 37091
2007-05-16 01:58:56 +00:00
Devang Patel 431b6a5d4a New test.
llvm-svn: 37090
2007-05-15 23:44:27 +00:00
Dale Johannesen 420a85d0cf Remove extra CFG edges before doing these passes; it makes them happier.
llvm-svn: 37089
2007-05-15 21:19:17 +00:00
Chris Lattner 9b7e57315e add PR number and testcase from the PR.
llvm-svn: 37088
2007-05-15 20:40:25 +00:00
Chris Lattner df341b48a3 new testcase
llvm-svn: 37087
2007-05-15 20:29:56 +00:00
Lauro Ramos Venancio 3f142cbca2 Fix an infinite recursion in GetNegatedExpression.
llvm-svn: 37086
2007-05-15 17:05:43 +00:00
Reid Spencer 13612b1491 Don't put test cases into regression test suite before the bug is fixed.
llvm-svn: 37085
2007-05-15 15:46:41 +00:00
Duncan Sands 750e8c5d4d The index into the actions table is a ULEB128 not a SLEB128.
llvm-svn: 37084
2007-05-15 13:54:14 +00:00
Nicolas Geoffray 77d99504cb Note on current implementation of ELF32/PPC ABI.
llvm-svn: 37083
2007-05-15 09:21:28 +00:00
Reid Spencer 1582c0548f Add a test case for PR1420
llvm-svn: 37082
2007-05-15 06:52:15 +00:00
Chris Lattner 66ad6fac2f selects can also reach here
llvm-svn: 37081
2007-05-15 06:42:04 +00:00
Chris Lattner a6f88ced8b implement the ModuleProvider::dematerializeFunction hook
llvm-svn: 37080
2007-05-15 06:29:44 +00:00
Reid Spencer daed139420 Un-brain-dead-ify the lowering of part set for the reverse case.
llvm-svn: 37071
2007-05-15 02:26:52 +00:00
Chris Lattner 2b5badc0e1 Fix CodeGen/PowerPC/2007-05-14-InlineAsmSelectCrash.ll, the other recent
patches are also needed.

llvm-svn: 37070
2007-05-15 01:36:44 +00:00
Chris Lattner c7596efdad Fix some subtle issues handling immediate values. This fixes
test/CodeGen/ARM/2007-05-14-InlineAsmCstCrash.ll

llvm-svn: 37069
2007-05-15 01:33:58 +00:00
Chris Lattner a7a37a107e new testcase that crashes llc
llvm-svn: 37068
2007-05-15 01:33:12 +00:00
Chris Lattner 0b7472da6f fix some subtle inline asm selection issues
llvm-svn: 37067
2007-05-15 01:31:05 +00:00
Evan Cheng 0f7cbe8370 Add PredicateOperand to all ARM instructions that have the condition field.
llvm-svn: 37066
2007-05-15 01:29:07 +00:00
Chris Lattner c8798d085c fix subtle bugs in inline asm operand selection
llvm-svn: 37065
2007-05-15 01:28:08 +00:00
Evan Cheng 4d728b0419 Added getNumExplicitOperands and findFirstPredOperand.
llvm-svn: 37064
2007-05-15 01:26:09 +00:00
Evan Cheng a32dee205f Added \!con(a,b) syntax to concatnate two dag fragments.
llvm-svn: 37063
2007-05-15 01:23:24 +00:00
Evan Cheng 785276fcda All operands that made up of the predicate operands are maked M_PREDICATE_OPERAND.
llvm-svn: 37062
2007-05-15 01:21:27 +00:00
Evan Cheng c0fb94596a Mark all (not just the first) predicate operand M_PREDICATE_OPERAND.
llvm-svn: 37061
2007-05-15 01:20:36 +00:00
Evan Cheng b0925c0e49 PredicateOperand related bug fix.
llvm-svn: 37060
2007-05-15 01:19:51 +00:00
Chris Lattner c5900bd25b testcase that crashes llc
llvm-svn: 37059
2007-05-15 01:13:42 +00:00
Dan Gohman eca3b67199 Correct a comment.
llvm-svn: 37058
2007-05-15 00:20:13 +00:00
Chris Lattner 234f96daa8 Fix Transforms/InstCombine/2007-05-14-Crash.ll
llvm-svn: 37057
2007-05-15 00:16:00 +00:00
Chris Lattner 120548e508 New testcase that crashes instcombine
llvm-svn: 37056
2007-05-15 00:15:49 +00:00
Lauro Ramos Venancio 1b8d46ab21 Fix previous patch. GOTOFF can be used only when the symbol has internal
linkage or hidden visibility.

llvm-svn: 37055
2007-05-14 23:20:21 +00:00
Chris Lattner e49c974a7c implement a simple fneg optimization/propagation thing. This compiles:
CodeGen/PowerPC/fneg.ll into:

_t4:
        fmul f0, f3, f4
        fmadd f1, f1, f2, f0
        blr

instead of:

_t4:
        fneg f0, f3
        fmul f0, f0, f4
        fmsub f1, f1, f2, f0
        blr

llvm-svn: 37054
2007-05-14 22:04:50 +00:00
Chris Lattner d1e6255141 new testcase
llvm-svn: 37053
2007-05-14 22:04:16 +00:00
Evan Cheng e1595b6859 Only worry about intervening kill if there are more than one live ranges in the interval.
llvm-svn: 37052
2007-05-14 21:23:51 +00:00
Evan Cheng 4c28ec187e Test for PR1406.
llvm-svn: 37051
2007-05-14 21:12:43 +00:00
Evan Cheng c690cba7d9 Fix for PR1406:
v1 =
r2 = move v1
   = op r2<kill>
...
r2 = move v1
   = op r2<kill>

Clear the first r2 kill if v1 and r2 are joined.

llvm-svn: 37050
2007-05-14 21:10:05 +00:00
Evan Cheng 03c64ec842 New test.
llvm-svn: 37048
2007-05-14 20:47:21 +00:00
Evan Cheng 5c7ce4561f Doh. .cpp -> .ll
llvm-svn: 37047
2007-05-14 20:43:28 +00:00
Evan Cheng fc2377d4ed When marking a register as being implicitly defined, make sure to clear its partial use info as well.
llvm-svn: 37046
2007-05-14 20:39:18 +00:00
Lauro Ramos Venancio d705f5d51d Optimize PIC implementation. GOTOFF can be used when the symbol is defined
and used in the same module.

llvm-svn: 37044
2007-05-14 18:46:23 +00:00
Lauro Ramos Venancio 3551928a2b Enable aliases on arm-linux.
llvm-svn: 37042
2007-05-14 18:32:56 +00:00
Evan Cheng bc5c15276b Remove duplicated line.
llvm-svn: 37040
2007-05-14 18:03:45 +00:00
Reid Spencer 9cdab38520 Reverse last patch .. premature. Depends on uncommitted CBE patch.
llvm-svn: 37039
2007-05-14 17:58:52 +00:00
Reid Spencer 9c6a4d64aa Update this test to match the (corrected) output from the CBE.
llvm-svn: 37038
2007-05-14 17:56:39 +00:00
Reid Spencer 764ae2a21b Give names to the final result values of the part_set computations. This
just aids in readability and debugability of the output. No functional change.

llvm-svn: 37037
2007-05-14 17:21:17 +00:00
Reid Spencer 146281ce1a The wrapping behavior of part_set is not desirable. Adjust the
documentation to describe the desired behavior.

llvm-svn: 37036
2007-05-14 16:50:20 +00:00
Reid Spencer 70845c05e4 Revise definition of part_select. The wrapping behavior is not useful so
in the reverse case the only difference is that the bits are returned in
reverse order.

llvm-svn: 37035
2007-05-14 16:14:57 +00:00
Dan Gohman 8d40e4d965 Correct a few comments.
llvm-svn: 37034
2007-05-14 14:31:17 +00:00
Dan Gohman 90d97ac1e6 Add passes -view-cfg and -view-cfg-only that are like -print-cfg and
-print-cfg-only except they use the ViewCFG function, which displays the
CFG rendered with graphviz with gv.

llvm-svn: 37033
2007-05-14 14:25:08 +00:00
Dan Gohman 86110bdf06 Use templates for the GraphType for DefaultDOTGraphTraits' members instead
of just using void*. This allows it to be used with graph adapters like
Inverse.

llvm-svn: 37032
2007-05-14 14:23:27 +00:00
Dan Gohman 619bfa47e3 Add a addRequiredTransitiveID member function, which is to
addRequiredTransitive as addRequiredID is to addRequired.

llvm-svn: 37031
2007-05-14 14:21:46 +00:00
Chris Lattner 97beb5147f Add a skeleton for future contents
llvm-svn: 37028
2007-05-14 06:56:09 +00:00
Chris Lattner ba12a9d1fb update comments
llvm-svn: 37027
2007-05-14 01:54:16 +00:00
Reid Spencer 98ed7db7ab Make the results for the rotate functions correct when rotateAmt == 0.
llvm-svn: 37026
2007-05-14 00:15:28 +00:00
Reid Spencer 4c50b52f63 Add some things needed by the llvm-gcc version supporting bit accurate integer
types:
1. Functions to compute div/rem at the same time.
2. Further assurance that an APInt with 0 bitwidth cannot be constructed.
3. Left and right rotate operations.
4. An exactLogBase2 function which requires an exact power of two or it
   returns -1.

llvm-svn: 37025
2007-05-13 23:44:59 +00:00
Chris Lattner 79c2c38ed5 add a link
llvm-svn: 37024
2007-05-13 23:38:44 +00:00
Chris Lattner 1904e45d0c Fix PR1413
llvm-svn: 37023
2007-05-13 22:19:27 +00:00
Chris Lattner 3b4ae44057 this crashes globalopt
llvm-svn: 37021
2007-05-13 21:28:25 +00:00
Chris Lattner cea37beb52 Fix Transforms/GlobalOpt/2007-05-13-Crash.ll
llvm-svn: 37020
2007-05-13 21:28:07 +00:00
Anton Korobeynikov 1ee0c8d563 Emit function debug frames in one atom. This will prevent us from generating incorrect assembler in case of both
debug information & exception information presented.

llvm-svn: 37019
2007-05-13 17:30:11 +00:00
Anton Korobeynikov bbaf55448b Emit multiple common EH frames for multiple (including blank) personality
functions. This partly fixes PR1414: now we're restricted only to one
personality function per eh frame, not per module. Further work on
"multiple personalities" topic needs representative example.

llvm-svn: 37018
2007-05-13 15:42:26 +00:00
Chris Lattner 8176a2f24e add initial description of llvm top-level stuff.
llvm-svn: 37017
2007-05-13 01:39:44 +00:00
Chris Lattner d72bb414b6 finish the description of the bitstream format.
llvm-svn: 37016
2007-05-13 00:59:52 +00:00
Anton Korobeynikov 13da17843c More DWARF-related things cleanup:
1. Fix PR1380
2. Apply Duncan's patch from PR1410
3. Insert workaround for "one personality function per module" as noted in PR1414
4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is
shown correctly, but arguments for function on top of stack are displayed incorrectly.

llvm-svn: 37015
2007-05-12 22:36:25 +00:00
Reid Spencer 81ee020f64 Fix shl to produce the correct result when the bitwidth is > 64 and the
shift amount is 0. Previously this code would do a lshr by the bit width
which can lead to incorrect results.

llvm-svn: 37010
2007-05-12 18:01:57 +00:00
Reid Spencer 5d22b630af Add a test case for shl of APInt integers > 64 bits by 0 shift amount.
llvm-svn: 37009
2007-05-12 17:59:55 +00:00
Reid Spencer bf283708f7 Get the size of auto arrays right, regardless of its changing size.
llvm-svn: 37006
2007-05-12 11:07:40 +00:00
Reid Spencer ece86af259 Fix a grammaro.
llvm-svn: 37005
2007-05-12 08:01:52 +00:00
Chris Lattner c0490b7c20 fix typo
llvm-svn: 37004
2007-05-12 07:50:14 +00:00
Chris Lattner 9ae5b57033 continued description
llvm-svn: 37003
2007-05-12 07:49:15 +00:00
Chris Lattner 73387daf33 add a bunch of content.
llvm-svn: 37002
2007-05-12 05:37:42 +00:00
Chris Lattner 22a641d43a first step
llvm-svn: 37001
2007-05-12 03:23:40 +00:00
Lauro Ramos Venancio 997a010c63 Add a known QEMU problem.
llvm-svn: 37000
2007-05-12 02:36:41 +00:00
Chris Lattner a26153143e allow partially materialized modules to be written out, which just strips out
the functions which haven't been read.

llvm-svn: 36999
2007-05-11 23:51:59 +00:00
Devang Patel 79a71ec3ad Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049516.html
llvm-svn: 36998
2007-05-11 23:14:43 +00:00
Devang Patel 1b9349d190 New test.
llvm-svn: 36997
2007-05-11 23:13:19 +00:00
Chris Lattner 1480e16596 significantly improve debug output of lsr
llvm-svn: 36996
2007-05-11 22:40:34 +00:00
Dan Gohman fead7979f7 Update comments to say "vector" instead of "packed".
llvm-svn: 36995
2007-05-11 21:43:24 +00:00
Dan Gohman b5650ebd6a Fix typos.
llvm-svn: 36994
2007-05-11 21:10:54 +00:00
Dan Gohman daff5ec052 Remove forward-declarations for classes that don't exist.
llvm-svn: 36993
2007-05-11 21:05:57 +00:00
Dan Gohman fbb784e6af Add explicit keywords to several constructors that now have one argument.
llvm-svn: 36992
2007-05-11 21:04:48 +00:00
Dan Gohman c272746f44 Simplify BranchInst::getSuccessor, avoiding a conditional operator.
llvm-svn: 36991
2007-05-11 20:59:29 +00:00
Dan Gohman 2980d9da45 This patch extends the LoopUnroll pass to be able to unroll loops
with unknown trip counts. This is left off by default, and a
command-line option enables it. It also begins to separate loop
unrolling into a utility routine; eventually it might be made usable
from other passes.

It currently works by inserting conditional branches between each
unrolled iteration, unless it proves that the trip count is a
multiple of a constant integer > 1, which it currently only does in
the rare case that the trip count expression is a Mul operator with
a ConstantInt operand. Eventually this information might be provided
by other sources, for example by a pass that peels/splits the loop
for this purpose.

llvm-svn: 36990
2007-05-11 20:53:41 +00:00
Chris Lattner 600db3eb96 fix regressions from my previous checking, including
Transforms/InstCombine/2006-12-08-ICmp-Combining.ll

llvm-svn: 36989
2007-05-11 16:58:45 +00:00
Anton Korobeynikov 67286b1266 Perform correct actions numbers/sizes computation
llvm-svn: 36988
2007-05-11 08:47:35 +00:00
Anton Korobeynikov 00d02442b0 Fix action No calculation in multiple-invoke-one-LP mode
llvm-svn: 36987
2007-05-11 08:23:57 +00:00
Reid Spencer c014687788 For PR1411:
Don't try to use {} bracketing when setting a variable in site.exp

llvm-svn: 36985
2007-05-11 06:47:16 +00:00
Chris Lattner fe2b44de9f fix Transforms/InstCombine/2007-05-10-icmp-or.ll
llvm-svn: 36984
2007-05-11 05:55:56 +00:00
Chris Lattner b6d85ad1e1 new testcase that crashes instcombine
llvm-svn: 36983
2007-05-11 05:55:38 +00:00
Devang Patel d385e3970f Drop ModuleID from comment.
llvm-svn: 36982
2007-05-11 00:45:58 +00:00
Chris Lattner 436370bac8 fix a memory leak
llvm-svn: 36981
2007-05-11 00:43:26 +00:00
Chris Lattner fd96905f12 Fix a bug where the bcreader could crash on .bc files that were an exact
multiple of the page size, due to a bug in MappedFile

llvm-svn: 36980
2007-05-11 00:00:27 +00:00
Dale Johannesen cc8f571bc8 Do not generate branches to entry block. This fixes several test suite
failures on PPC (can happen only when prologue code is null)

llvm-svn: 36979
2007-05-10 23:59:23 +00:00
Anton Korobeynikov ee02c7d2fb Ooops. Some debugging stuff :)
llvm-svn: 36978
2007-05-10 22:38:46 +00:00
Anton Korobeynikov 96142de3f0 Allow multiple invokes per landing pad. This (probably) fixes PR1410.
llvm-svn: 36977
2007-05-10 22:34:59 +00:00
Duncan Sands b43fe52136 Later computations assume we are aligned at this point.
llvm-svn: 36975
2007-05-10 18:40:24 +00:00
Anton Korobeynikov ed5dad4306 TypeIds are indexed by j, not i
llvm-svn: 36974
2007-05-10 15:10:34 +00:00
Anton Korobeynikov c52614ba88 These attributes are supported!
llvm-svn: 36973
2007-05-10 08:26:24 +00:00
Chris Lattner 3d82dcf1c4 gar. GCC 3.4.2 also miscompiles llvm at -O3. :(
llvm-svn: 36972
2007-05-10 06:42:21 +00:00
Chris Lattner 455563bb96 another version of gcc that miscompiles llvm.
llvm-svn: 36971
2007-05-10 05:37:14 +00:00
Dale Johannesen b42c11265c Another test for tail mergeing
llvm-svn: 36967
2007-05-10 01:04:28 +00:00
Dale Johannesen 6e16d09252 Make tail merging handle many more cases (all it can, I think).
llvm-svn: 36966
2007-05-10 01:01:49 +00:00
Chris Lattner 623c738fe9 add some notes
llvm-svn: 36965
2007-05-10 00:08:04 +00:00
Evan Cheng db214c77b4 Can't fold bit_convert into truncating store.
llvm-svn: 36963
2007-05-09 21:54:34 +00:00
Evan Cheng f325c2a65e Can't fold the bit_convert is the store is a truncating store.
llvm-svn: 36962
2007-05-09 21:49:47 +00:00
Anton Korobeynikov 192d09c2d9 Do not assert, when case range split metric is zero and JTs are not allowed: just emit binary tree in this case. This
fixes PR1403.

llvm-svn: 36959
2007-05-09 20:07:08 +00:00
Lauro Ramos Venancio bbe26581d9 Add two ARM known problems.
llvm-svn: 36958
2007-05-09 19:31:58 +00:00
Evan Cheng bf67a327c7 PR1399 test case.
llvm-svn: 36957
2007-05-09 19:20:37 +00:00
Duncan Sands dd75c1a255 Testcase for
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049387.html

llvm-svn: 36956
2007-05-09 08:41:26 +00:00
Devang Patel 9557247412 Fix PR1333
Testcases :
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049451.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049452.html

llvm-svn: 36955
2007-05-09 08:24:12 +00:00
Devang Patel 00a08d129e New test.
llvm-svn: 36954
2007-05-09 08:19:24 +00:00
Devang Patel 519f2997cc New test.
llvm-svn: 36953
2007-05-09 08:08:46 +00:00
Chris Lattner c97579318b arm no longer experimental, c++ eh support is?
llvm-svn: 36952
2007-05-09 06:23:58 +00:00
Chris Lattner 2d47f92f07 add a meta-blurb about the 2.0 release
llvm-svn: 36951
2007-05-09 05:27:05 +00:00
Chris Lattner 98a334980a strip the llvm 1.9 info out of the release notes
llvm-svn: 36950
2007-05-09 04:58:11 +00:00
Evan Cheng 9c031c0ddf Switch BCC, MOVCCr, etc. to PredicateOperand.
llvm-svn: 36948
2007-05-08 21:08:43 +00:00
Evan Cheng d194a8603d PredicateOperand can be used as a normal operand for isel.
llvm-svn: 36947
2007-05-08 21:06:08 +00:00
Evan Cheng 5162f584c7 If a PredicateOperand has an empty ExecuteAlways field, treat it as if a normal operand for isel.
llvm-svn: 36946
2007-05-08 21:04:07 +00:00
Chris Lattner 75d56499c6 add the & back. I'm not sure why bill removed it.
llvm-svn: 36945
2007-05-08 20:08:06 +00:00
Bill Wendling 31fd60ba0c Change names from RA to something unique to get rid of naming conflicts with
certain linkers...

llvm-svn: 36944
2007-05-08 19:02:46 +00:00
Evan Cheng 9e17872c1d Eliminate MarkVirtRegAliveInBlock recursion.
llvm-svn: 36943
2007-05-08 19:00:00 +00:00
Evan Cheng 6c6cea91fc Add MachineBasicBlock preds / succs reverse iterators.
llvm-svn: 36942
2007-05-08 18:55:03 +00:00
Devang Patel 95cd89f25b New test for PR1400
llvm-svn: 36941
2007-05-08 18:08:20 +00:00
Dale Johannesen 882a6019af testcase for CodeGenPrepare bug fixed yesterday
llvm-svn: 36940
2007-05-08 17:44:36 +00:00
Evan Cheng f50ba31ec6 R0 is a sub-register of X0, etc.
llvm-svn: 36939
2007-05-08 17:03:51 +00:00
Dan Gohman 2e1f804764 Fix various whitespace inconsistencies.
llvm-svn: 36936
2007-05-08 15:19:19 +00:00
Dan Gohman 49d08a57f5 Correct the comment for ApproximateLoopSize to reflect what it actually does.
llvm-svn: 36935
2007-05-08 15:14:19 +00:00
Bill Wendling 0c976b8762 Spare '&' in the RUN line.
llvm-svn: 36933
2007-05-08 07:49:07 +00:00
Devang Patel 91041718f7 New test.
llvm-svn: 36930
2007-05-08 06:10:12 +00:00
Chris Lattner aba457b30b update comments, no functionality change
llvm-svn: 36929
2007-05-08 05:38:32 +00:00
Chris Lattner 4c0a6d660e Make a preemptive bitcode format change to support PR1146. This lets us do
pr1146 in llvm 2.1 without ugly code to emulate old behavior.  This should
be merged into the 2.0 release branch.

llvm-svn: 36928
2007-05-08 05:38:01 +00:00
Tanya Lattner 2357362805 Bumping cvs version number
llvm-svn: 36922
2007-05-08 04:32:07 +00:00
Tanya Lattner dbe7487618 Bump version number in cvs
llvm-svn: 36920
2007-05-08 04:22:59 +00:00
Chris Lattner 4ef41c1054 move this out of Codegen/Generic, because it requires the ARM backend to be
linked into llc

llvm-svn: 36919
2007-05-08 02:19:56 +00:00
Chris Lattner d1f5ab0da8 move to CodeGen/ARM/2007-05-07-tailmerge-1.ll
llvm-svn: 36918
2007-05-08 02:13:52 +00:00
Dale Johannesen 86e1dcf530 Don't generate branch to entry block.
llvm-svn: 36917
2007-05-08 01:01:04 +00:00
Lauro Ramos Venancio 744350b131 Fix PR1390 in a better way.
llvm-svn: 36916
2007-05-07 23:15:16 +00:00
Evan Cheng ef409e2780 Fix tests.
llvm-svn: 36913
2007-05-07 21:50:07 +00:00
Evan Cheng 2d828d2e3c Add some tests for (conv (load x)) -> (load (conv*)x) xform.
llvm-svn: 36912
2007-05-07 21:49:35 +00:00
Evan Cheng 7cbd722dba Fix test case.
llvm-svn: 36911
2007-05-07 21:38:05 +00:00
Evan Cheng 562e45692e Forgot a check.
llvm-svn: 36910
2007-05-07 21:36:06 +00:00
Evan Cheng d37c23745f This is no longer needed after enabling the DAG combiner xform.
llvm-svn: 36909
2007-05-07 21:29:41 +00:00
Evan Cheng a4cf58a103 Enable a couple of xforms:
- (store (bitconvert v)) -> (store v) if resultant store does not require
higher alignment
- (bitconvert (load v)) -> (load (bitconvert*)v) if resultant load does not
require higher alignment

llvm-svn: 36908
2007-05-07 21:27:48 +00:00
Dale Johannesen 9a25b3afcd Handle some non-exit blocks in tail merging.
llvm-svn: 36907
2007-05-07 20:57:21 +00:00
Duncan Sands 671e8c4444 Parameter attributes on invoke calls were being lost due to the wrong
attribute index being used.  Fix proposed by Anton Korobeynikov, who
asked me to implement and commit it for him.  This is PR1398.

llvm-svn: 36906
2007-05-07 20:49:28 +00:00
Duncan Sands 7208cd6e4e Testcase for PR1398.
llvm-svn: 36905
2007-05-07 20:45:20 +00:00
Reid Spencer c32d55e17c Initialize variable to null so it has a value in the off chance that a
memory buffer couldn't be allocated.

llvm-svn: 36904
2007-05-07 18:50:07 +00:00
Evan Cheng 100984c727 Update.
llvm-svn: 36903
2007-05-07 17:58:13 +00:00
Jeff Cohen b6e144cffe Unbreak VC++ build.
llvm-svn: 36901
2007-05-07 15:21:46 +00:00
Chris Lattner 9e9a34c6bf use the new MemoryBuffer interfaces to simplify error reporting in clients.
llvm-svn: 36900
2007-05-06 23:45:49 +00:00
Chris Lattner 275757a05e Enhance MemoryBuffer to return error messages in strings if they occur.
llvm-svn: 36899
2007-05-06 23:32:36 +00:00
Chris Lattner 05be1d44da remove dead option
llvm-svn: 36898
2007-05-06 23:24:42 +00:00