Commit Graph

9484 Commits

Author SHA1 Message Date
Chris Lattner
841957ebaf Don't crash if computing a mapping to a node with zero size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20595 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:40:24 +00:00
Chris Lattner
b0f92e3ed3 rename method, add counterpart
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20593 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 00:58:16 +00:00
Andrew Lenharth
ca3d59b1dc FP 0.0 setcc optimization, and generate short branch sequence for setcc(FP) rather than stack usage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20589 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-14 19:23:45 +00:00
Chris Lattner
b2b17bb65b add a method to compute a commonly used mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20588 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-14 19:22:47 +00:00
Chris Lattner
e2bc7b2517 regardless of whether or not the client things we should mark globals incomplete,
ALWAYS mark them incomplete if they are external!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20586 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:36:01 +00:00
Chris Lattner
270cf5025e Make sure to remove incomplete markers before we add to them! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20585 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:32:26 +00:00
Chris Lattner
b5ecd2e378 The incoming arguments to main (the argv list) are not complete!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20584 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:22:10 +00:00
Chris Lattner
a66e353cf9 After finishing BU analysis, move all global variables from the globals
graph into main and mark them complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20583 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:15:06 +00:00
Chris Lattner
adfd5f14b4 ADd support for printing eqgraphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20582 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:51:24 +00:00
Chris Lattner
2787e03d0e Replace linear search with logrithmic one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20580 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:05:05 +00:00
Chris Lattner
e7ea48cb61 add a StructLayout::getElementContainingOffset method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20579 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:04:41 +00:00
Andrew Lenharth
84e2dc2d5d Should fix mesa
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20577 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 00:43:20 +00:00
Chris Lattner
a4319e5826 make sure to mark nodes returned from functions as incomplete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20576 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 14:58:28 +00:00
Chris Lattner
b25959a632 remove this from the PA namespace, leaving it in the llvm ns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20574 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 12:08:52 +00:00
Chris Lattner
7aed7179bd Move this from the pool allocator project to here, where it logically belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20570 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 11:51:30 +00:00
Andrew Lenharth
e87f6c31d2 remove a pseudo instruction and improve inline constant generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20563 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-11 17:48:05 +00:00
Chris Lattner
e97568c3c4 I didn't mean to check this in. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20555 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:59:51 +00:00
Chris Lattner
ee639f1760 Fix a bug where we would incorrectly do a sign ext instead of a zero ext
because we were checking the wrong thing.  Thanks to andrew for pointing
this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20554 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:55:51 +00:00
Andrew Lenharth
572668aa38 yay for camel_cvs diff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20552 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:15:09 +00:00
Andrew Lenharth
3dc15f3022 some typoes and .bss isn't liked, at all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20542 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 19:02:02 +00:00
Chris Lattner
f768bba43f Allow the live interval analysis pass to be a bit more aggressive about
numbering values in live ranges for physical registers.

The alpha backend currently generates code that looks like this:

  vreg = preg
...
  preg = vreg
  use preg
...
  preg = vreg
  use preg

etc.  Because vreg contains the value of preg coming in, each of the
copies back into preg contain that initial value as well.

In the case of the Alpha, this allows this testcase:

void "foo"(int %blah) {
        store int 5, int *%MyVar
        store int 12, int* %MyVar2
        ret void
}

to compile to:

foo:
        ldgp $29, 0($27)
        ldiq $0,5
        stl $0,MyVar
        ldiq $0,12
        stl $0,MyVar2
        ret $31,($26),1

instead of:

foo:
        ldgp $29, 0($27)
        bis $29,$29,$0
        ldiq $1,5
        bis $0,$0,$29
        stl $1,MyVar
        ldiq $1,12
        bis $0,$0,$29
        stl $1,MyVar2
        ret $31,($26),1

This does not seem to have any noticable effect on X86 code.

This fixes PR535.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20536 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 23:05:19 +00:00
Andrew Lenharth
059c3ef70b minor correction for Register that isn't used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20535 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 20:48:23 +00:00
Chris Lattner
14723c264d constant fold FP_ROUND_INREG, ZERO_EXTEND_INREG, and SIGN_EXTEND_INREG
This allows the alpha backend to compile:

bool %test(uint %P) {
        %c = seteq uint %P, 0
        ret bool %c
}

into:

test:
        ldgp $29, 0($27)
        ZAP $16,240,$0
        CMPEQ $0,0,$0
        AND $0,1,$0
        ret $31,($26),1

instead of:

test:
        ldgp $29, 0($27)
        ZAP $16,240,$0
        ldiq $1,0
        ZAP $1,240,$1
        CMPEQ $0,$1,$0
        AND $0,1,$0
        ret $31,($26),1

... and fixes PR534.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 18:37:12 +00:00
Chris Lattner
76da61621c correct the computation of the isAbstract bit for types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20533 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 17:34:27 +00:00
Chris Lattner
50bc9ef507 Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation
that Alkis found with Java, thanks Alkis!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20531 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 16:29:52 +00:00
Reid Spencer
9dbf1e5bb8 Fix a typo in an assertion comment.
Patch contributed by Vladimir Merzliakov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20529 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 15:19:41 +00:00
Chris Lattner
bac5b46396 Export two methods for getting -X and A-B.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20527 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 05:34:41 +00:00
Chris Lattner
1c81f1390d get bugpoint working on ia64, by building .so's with -fpic. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20525 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 03:31:02 +00:00
Chris Lattner
411eba0eaf Fix a crash handling 'undef bool', fixing an llc crash on 186.crafty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 22:53:09 +00:00
Reid Spencer
d632f4977e Patch to make assembly output compatible with mingw compilation (identical
to cygwin)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 17:02:05 +00:00
Chris Lattner
dbf69f1992 Make sure to remove all dead type names from the symbol table, not just
struct types.  This fixes Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll,
a crash on Java output that Alkis reported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20519 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 16:19:59 +00:00
Misha Brukman
23ba0c5cf3 Single characters should be printed out as chars, not strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20515 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 00:26:08 +00:00
Chris Lattner
001d16aa9c Fix an apparent ambiguity compiling on PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20507 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-07 02:59:36 +00:00
Chris Lattner
2f62fdc9a7 fix a bug where we thought arguments were constants :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20506 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 22:52:29 +00:00
Chris Lattner
3f93197098 Fix Regression/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll,
hopefully not breaking too many other things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20505 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 22:36:12 +00:00
Chris Lattner
2f9b19b4c9 implement Transforms/LoopStrengthReduce/invariant_value_first_arg.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 22:06:22 +00:00
Chris Lattner
2461dff070 minor simplifications of the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20497 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 21:58:22 +00:00
Chris Lattner
fee3411379 trivial simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20494 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 21:35:38 +00:00
Chris Lattner
decc86db0c Fix a bug where we could corrupt a parent loop's header info if we unrolled
a nested loop.  This fixes Transforms/LoopUnroll/2005-03-06-BadLoopInfoUpdate.ll
and PR532


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20493 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 20:57:32 +00:00
Chris Lattner
f1b4d1dee6 rename insertEntry to insert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:55:40 +00:00
Chris Lattner
e4c872a8fa Merge SymbolTable::removeEntry into SymbolTable::remove, its only caller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:51:09 +00:00
Chris Lattner
c27aa8ddb2 Delete the really inefficient method: void remove(const Type* Typ);
Speed up the symbol stripping code by avoiding a linear search of the
type table.

Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20481 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:46:41 +00:00
Chris Lattner
82aa566795 Make this MUCH faster by avoiding a linear search in the symbol table code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20479 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:42:36 +00:00
Chris Lattner
a98cbe57ea Remove some really gross and hard to understand code now that
InternallyInconsistent is always false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20477 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:21:40 +00:00
Chris Lattner
ee4da939b0 Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20476 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:13:42 +00:00
Chris Lattner
921c565888 remove these methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:37:47 +00:00
Chris Lattner
af4a9bb2ba simplify and speed up some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20472 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:32:00 +00:00
Chris Lattner
b15fde2b78 simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20471 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:28:23 +00:00
Chris Lattner
04cb800c32 This fixes PR531, a crash when running the CBE on a bytecode file.
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).

The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one.  This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.

This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20469 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:14:28 +00:00
Jeff Cohen
e43dd1b8e7 Reformat comments to fix 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20467 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 22:45:40 +00:00