Commit Graph

32708 Commits

Author SHA1 Message Date
Dale Johannesen
f23b8cf239 Use AXI3 not AXI2 for appropriate PIC PC-relative loads and stores. Cosmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37271 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-21 22:42:04 +00:00
Evan Cheng
a6b4f43eaa If-convert early exit blocks (returns, etc.); bug fixes, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37270 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-21 22:22:58 +00:00
Dale Johannesen
86d4069666 Add some patterns for PIC PC-relative loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37269 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-21 22:14:33 +00:00
Evan Cheng
5a18ebc70c BlockHasNoFallThrough() now returns true if block ends with a return instruction; AnalyzeBranch() should ignore predicated instructionsd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-21 18:56:31 +00:00
Duncan Sands
7bf7a446a5 Only emit one entry in the exception action table for each action, even if
it occurs for multiple landing pads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37267 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-21 18:50:28 +00:00
Evan Cheng
126f17a176 BlockHasNoFallThrough() now returns true if block ends with a return instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-21 18:44:17 +00:00
Bill Wendling
eaeeb6fbda Update
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37265 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-20 19:56:24 +00:00
Reid Spencer
a24f6dfc90 Get the order of the hext digits right!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37261 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 14:44:42 +00:00
Reid Spencer
922d0bcf8b Adjust how LLVM names are produced:
1. Always use % for local and @ for global.
2. Replace NameNeedsQuotes with QuoteNameIfNeeded so that any adjustments
   to the name can be done in one pass.
3. Implement generation of hex escapes so we don't get "wonky" characters
   in the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37260 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 07:25:21 +00:00
Reid Spencer
5f0d16dd62 Make sure we can round-trip an escaped value in a name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37259 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 07:22:24 +00:00
Reid Spencer
ed951ea4ec Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 07:22:10 +00:00
Reid Spencer
aa7c2f8c03 Make the %"..." syntax legal for local name. This just makes it symmetric
with global names which can already be @"..."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37257 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 07:21:26 +00:00
Chris Lattner
a2b18de4ba Fix Transforms/InstCombine/2007-05-18-CastFoldBug.ll, a bug that devastates
objc code due to the way the FE lowers objc message sends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37256 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 06:51:32 +00:00
Chris Lattner
74b9a814f6 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37255 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 06:50:37 +00:00
Reid Spencer
cc442cabf6 On Linux platforms and at optimization levels -O1 and above, llvm-gcc can
turn "putchar" calls into _IO_putc calls which is a lower-level interface.
This patch allows these calls to be executed by lli in interpreter mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37254 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 01:36:17 +00:00
Chris Lattner
8a282967ef add source
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37253 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 01:22:52 +00:00
Chris Lattner
fb3e1190fc Handle negative strides much more optimally. This compiles X86/lsr-negative-stride.ll
into:

_t:
        movl 8(%esp), %ecx
        movl 4(%esp), %eax
        cmpl %ecx, %eax
        je LBB1_3       #bb17
LBB1_1: #bb
        cmpl %ecx, %eax
        jg LBB1_4       #cond_true
LBB1_2: #cond_false
        subl %eax, %ecx
        cmpl %ecx, %eax
        jne LBB1_1      #bb
LBB1_3: #bb17
        ret
LBB1_4: #cond_true
        subl %ecx, %eax
        cmpl %ecx, %eax
        jne LBB1_1      #bb
        jmp LBB1_3      #bb17

instead of:

_t:
        subl $4, %esp
        movl %esi, (%esp)
        movl 12(%esp), %ecx
        movl 8(%esp), %eax
        cmpl %ecx, %eax
        je LBB1_4       #bb17
LBB1_1: #bb.outer
        movl %ecx, %edx
        negl %edx
LBB1_2: #bb
        cmpl %ecx, %eax
        jle LBB1_5      #cond_false
LBB1_3: #cond_true
        addl %edx, %eax
        cmpl %ecx, %eax
        jne LBB1_2      #bb
LBB1_4: #bb17
        movl (%esp), %esi
        addl $4, %esp
        ret
LBB1_5: #cond_false
        movl %ecx, %edx
        subl %eax, %edx
        movl %eax, %esi
        addl %esi, %esi
        cmpl %ecx, %esi
        je LBB1_4       #bb17
LBB1_6: #cond_false.bb.outer_crit_edge
        movl %edx, %ecx
        jmp LBB1_1      #bb.outer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37252 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 01:22:21 +00:00
Chris Lattner
b0e07dd19a new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37251 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 01:21:39 +00:00
Chris Lattner
7667c0bac3 same patch as the previous one, but the symmetric case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 00:46:51 +00:00
Chris Lattner
2ad913b342 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 00:43:44 +00:00
Chris Lattner
35fbae2b6d new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 00:41:40 +00:00
Reid Spencer
20a4c23bcc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37242 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-19 00:29:55 +00:00
Dan Gohman
f5135be3fc Apply this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070514/049845.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37240 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 23:21:46 +00:00
Chris Lattner
60c7a136f3 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37239 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 20:18:14 +00:00
Dan Gohman
2fa7ce2b87 Add a testcase for unrolling loops with unknown tripcounts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37238 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 19:59:23 +00:00
Evan Cheng
7f8ff8af1a Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37237 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 19:32:08 +00:00
Evan Cheng
36489bbbac Change to depth-first traversal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37236 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 19:26:33 +00:00
Dale Johannesen
a469b69dda Document an inefficiency in tail merging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37235 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 18:46:40 +00:00
Dan Gohman
fa0f77d9b7 Use MVT::FIRST_VECTOR_VALUETYPE and MVT::LAST_VECTOR_VALUETYPE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37234 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 18:44:07 +00:00
Dan Gohman
fcc4dd91e5 Qualify calls to getTypeForValueType with MVT:: too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37233 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 18:41:29 +00:00
Evan Cheng
cf6cc112d5 Some restructuring in preparation for most aggressive if-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37231 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 18:14:37 +00:00
Dan Gohman
b55757ec5f Qualify several calls to functions in the MVT namespace, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37230 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 17:52:13 +00:00
Evan Cheng
6092ca1556 Watch out for blocks that end with a return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37227 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 17:06:53 +00:00
Duncan Sands
7d841a4914 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37224 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 12:13:34 +00:00
Duncan Sands
32a8344cfa Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37223 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 09:04:20 +00:00
Chris Lattner
ef547ddcdd better portability for intptr_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 07:07:05 +00:00
Chris Lattner
46ccdbf93d finished the first draft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37219 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 06:38:51 +00:00
Chris Lattner
60893e5fe9 crank out notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37218 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 06:33:02 +00:00
Reid Spencer
7eea8ff06d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37207 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 05:48:07 +00:00
Chris Lattner
550211711a validation fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37206 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 05:38:44 +00:00
Chris Lattner
b5c87f6056 validation fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37205 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 05:36:14 +00:00
Chris Lattner
b348bb8125 Fix PR1434 and test/Linker/link-archive.ll, this is a regression from 1.9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37204 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 04:02:46 +00:00
Reid Spencer
e829e92edc Add a test case for PR1434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37203 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 03:46:50 +00:00
Reid Spencer
e01236a9bb Avoid an infinite loop when TestRunner.sh is run outside of the test dir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37201 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 02:06:03 +00:00
Evan Cheng
47d2502072 If true / false blocks fallthrough before ifcvt, add unconditional branches to ifcvt'd block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37200 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 01:55:58 +00:00
Evan Cheng
dcc50a4aee 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37199 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 01:53:54 +00:00
Dale Johannesen
1cf08c1d6d Remove some unneeded branches. (spotted by Evan, thanks)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 01:28:58 +00:00
Evan Cheng
e5e7ce458a Silence some compilation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 01:19:57 +00:00
Chris Lattner
b4b0ce7c29 tweak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37196 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 00:44:29 +00:00
Evan Cheng
86cbfea33b Make use of target specific block size limits; bug fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37195 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 00:20:58 +00:00