Commit Graph

18878 Commits

Author SHA1 Message Date
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
Chris Lattner
7d8ed8a941 significantly improve debug output of lsr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36996 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 22:40:34 +00:00
Dan Gohman
86296cca63 Update comments to say "vector" instead of "packed".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 21:43:24 +00:00
Dan Gohman
23d9d27c26 Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 21:10:54 +00:00
Dan Gohman
c767844fc9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 20:53:41 +00:00
Chris Lattner
3aea1bdca5 fix regressions from my previous checking, including
Transforms/InstCombine/2006-12-08-ICmp-Combining.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36989 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 16:58:45 +00:00
Anton Korobeynikov
22d5c37f32 Perform correct actions numbers/sizes computation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 08:47:35 +00:00
Anton Korobeynikov
29c9cafe46 Fix action No calculation in multiple-invoke-one-LP mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 08:23:57 +00:00
Chris Lattner
8885887b9c fix Transforms/InstCombine/2007-05-10-icmp-or.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36984 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 05:55:56 +00:00
Chris Lattner
a24b04e9e5 fix a memory leak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 00:43:26 +00:00
Chris Lattner
39253260b9 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36980 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 00:00:27 +00:00
Dale Johannesen
54f4a6780a Do not generate branches to entry block. This fixes several test suite
failures on PPC (can happen only when prologue code is null)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36979 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 23:59:23 +00:00
Anton Korobeynikov
432a7faf03 Ooops. Some debugging stuff :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 22:38:46 +00:00
Anton Korobeynikov
eeb37e0b80 Allow multiple invokes per landing pad. This (probably) fixes PR1410.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36977 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 22:34:59 +00:00
Duncan Sands
c1fe16610a Later computations assume we are aligned at this point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36975 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 18:40:24 +00:00
Anton Korobeynikov
e25514d0a5 TypeIds are indexed by j, not i
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36974 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 15:10:34 +00:00
Dale Johannesen
76b38fcabe Make tail merging handle many more cases (all it can, I think).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 01:01:49 +00:00