Commit Graph

18894 Commits

Author SHA1 Message Date
Evan Cheng
c3a289c4b5 Rename M_PREDICATED to M_PREDICABLE; Moved isPredicable() to MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:56:08 +00:00
Evan Cheng
75604f81b7 Move if-conversion after all passes that may use register scavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37120 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:52:46 +00:00
Evan Cheng
b5f8eff566 Removed isPredicable().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37119 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:50:23 +00:00
Evan Cheng
5ada199246 Make ARM::B isPredicable; Make Bcc and MOVCC condition option a normal operand so they are not predicable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37118 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:50:01 +00:00
Evan Cheng
064d7cdd3c Added isPredicable bit to class Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37117 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:47:01 +00:00
Reid Spencer
6551dcdd8a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 19:18:22 +00:00
Reid Spencer
52811bdbf0 Avoid a "loss of precision" error in gcc 4.1.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 16:39:29 +00:00
Duncan Sands
53c3a333a4 Output exception call-sites in address order, as required by the unwinding
runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37104 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 12:12:23 +00:00
Evan Cheng
aeafca0a25 Conditional branch is not a barrier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37103 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 07:45:54 +00:00
Chris Lattner
c76d4410ab Use a ptr set instead of a linear search to unique TokenFactor operands.
This fixes PR1423


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37102 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 06:37:59 +00:00
Chris Lattner
738a6ec0ae implement the missing maskmovq mmx intrinsic that akor hit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37100 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 06:08:17 +00:00
Evan Cheng
2706f9771d Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37098 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 05:14:06 +00:00
Evan Cheng
c5d05ef357 Devang points out that we need an assertion here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37097 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 05:11:10 +00:00
Reid Spencer
951418b7e9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37095 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 02:05:13 +00:00
Evan Cheng
93003b8cf2 Bug fix: should check ABI alignment, not pref. alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 02:04:50 +00:00
Evan Cheng
9307292ae2 Hooks for predication support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37093 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 02:01:49 +00:00
Evan Cheng
4e654852f1 Initial commit of (very basic) if converter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37092 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 02:00:57 +00:00
Dale Johannesen
14ba0cc429 Remove extra CFG edges before doing these passes; it makes them happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37089 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 21:19:17 +00:00
Lauro Ramos Venancio
b5bb7ffa9c Fix an infinite recursion in GetNegatedExpression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37086 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 17:05:43 +00:00
Duncan Sands
49b5c27baa The index into the actions table is a ULEB128 not a SLEB128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37084 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 13:54:14 +00:00
Chris Lattner
ce3e2bff8b selects can also reach here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37081 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 06:42:04 +00:00
Chris Lattner
d67c632d96 implement the ModuleProvider::dematerializeFunction hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37080 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 06:29:44 +00:00
Reid Spencer
76c94b6169 Un-brain-dead-ify the lowering of part set for the reverse case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37071 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 02:26:52 +00:00
Chris Lattner
c90233b836 Fix some subtle issues handling immediate values. This fixes
test/CodeGen/ARM/2007-05-14-InlineAsmCstCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:33:58 +00:00
Chris Lattner
9f5d5783ec fix some subtle inline asm selection issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37067 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:31:05 +00:00
Evan Cheng
44bec52b1b Add PredicateOperand to all ARM instructions that have the condition field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:29:07 +00:00
Chris Lattner
709fd414e2 fix subtle bugs in inline asm operand selection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:28:08 +00:00
Evan Cheng
19e3f31f6a Added getNumExplicitOperands and findFirstPredOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 01:26:09 +00:00
Chris Lattner
6b6aef8efc Fix Transforms/InstCombine/2007-05-14-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37057 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-15 00:16:00 +00:00
Lauro Ramos Venancio
5d3d44a848 Fix previous patch. GOTOFF can be used only when the symbol has internal
linkage or hidden visibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37055 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 23:20:21 +00:00
Chris Lattner
2944652569 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37054 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 22:04:50 +00:00
Evan Cheng
8dfffd5a07 Only worry about intervening kill if there are more than one live ranges in the interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37052 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 21:23:51 +00:00
Evan Cheng
2f6cb2b14c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37050 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 21:10:05 +00:00
Evan Cheng
8b966d9fd0 When marking a register as being implicitly defined, make sure to clear its partial use info as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37046 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 20:39:18 +00:00
Lauro Ramos Venancio
930d161ba2 Optimize PIC implementation. GOTOFF can be used when the symbol is defined
and used in the same module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37044 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 18:46:23 +00:00
Lauro Ramos Venancio
69642f11ed Enable aliases on arm-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37042 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 18:32:56 +00:00
Reid Spencer
9bd57b6561 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37037 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 17:21:17 +00:00
Dan Gohman
d9efdb2012 Correct a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 14:31:17 +00:00
Dan Gohman
a196b993e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 14:25:08 +00:00
Reid Spencer
69944e85aa Make the results for the rotate functions correct when rotateAmt == 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 00:15:28 +00:00
Reid Spencer
19dc32a2d4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37025 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-13 23:44:59 +00:00
Chris Lattner
40c1b66d88 Fix PR1413
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37023 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-13 22:19:27 +00:00
Chris Lattner
79cfddf646 Fix Transforms/GlobalOpt/2007-05-13-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37020 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-13 21:28:07 +00:00
Anton Korobeynikov
185bc8905a Emit function debug frames in one atom. This will prevent us from generating incorrect assembler in case of both
debug information & exception information presented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37019 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-13 17:30:11 +00:00
Anton Korobeynikov
8c7c17354c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37018 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-13 15:42:26 +00:00
Anton Korobeynikov
0ff3ca4f92 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-12 22:36:25 +00:00
Reid Spencer
92c7283500 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-12 18:01:57 +00:00
Reid Spencer
5156f5b214 Get the size of auto arrays right, regardless of its changing size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37006 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-12 11:07:40 +00:00
Chris Lattner
384003d2c0 allow partially materialized modules to be written out, which just strips out
the functions which haven't been read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 23:51:59 +00:00
Devang Patel
1e4c23a2d1 Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049516.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 23:14:43 +00:00