Commit Graph

14772 Commits

Author SHA1 Message Date
Evan Cheng
07103d312a Darwin puts float and double literal constants into literal4 and literal8 sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28957 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 07:35:41 +00:00
Andrew Lenharth
cc131c4032 add some missing externals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28955 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 01:16:06 +00:00
Andrew Lenharth
b8e604c29a Catch more function pointer casting problems
Remove the Function pointer cast in these calls, converting it to
a cast of argument.
%tmp60 = tail call int cast (int (ulong)* %str to int (int)*)( int 10 )
%tmp60 = tail call int cast (int (ulong)* %str to int (int)*)( uint %tmp51 )


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28953 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 01:01:52 +00:00
Chris Lattner
356d8c2499 Handle alias sets that have been unified, and thus can have other references
to them.  This fixes a regression in my previous checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28951 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 23:56:13 +00:00
Chris Lattner
f299857496 Don't implement AliasSetTracker::remove in terms of deleteValue. deleteValue
causes the pointer to be removed from the underlying alias analysis
implementation as well.  This impl of remove is also significantly faster than
the old one.  This fixes:
Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28950 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 23:48:59 +00:00
Andrew Lenharth
7794bd3f94 this case isn't handled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28948 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 23:19:14 +00:00
Owen Anderson
bef8508737 Fix for 2006-06-27-DeadSwitchCase.ll
Be more careful when updating Phi nodes after eliminating dead switch cases.  Fix
proposed by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 22:26:09 +00:00
Rafael Espindola
49e4415587 handle the "mov reg1, reg2" case in isMoveInstr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 21:52:45 +00:00
Chris Lattner
cccef1c6ff Don't match 64-bit bitfield inserts into rlwimi's. todo add rldimi. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28944 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 21:08:52 +00:00
Chris Lattner
92044ce4e9 Fix Transforms/DeadArgElim/2006-06-27-struct-ret.ll. -deadargelim should not
remove the struct return argument of a csret function, even if it is obviously
dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28943 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 21:05:04 +00:00
Chris Lattner
6b76b96c69 Fix ppc64 jump tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28941 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:46:17 +00:00
Evan Cheng
4df24f2caf Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28938 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:34:14 +00:00
Chris Lattner
9f029a61e9 Print stubs for external globals right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28936 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:20:53 +00:00
Chris Lattner
f89437d049 Implement 64-bit select, bswap, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28935 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:14:52 +00:00
Chris Lattner
e4172be920 Add a pattern for i64 sra. Print 8-byte units with a space between the .quad
and the data


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:07:26 +00:00
Chris Lattner
7ffa9abdad Fix rewriting frame offsets with ixaddr instructions, which implicitly shift
the offset two bits to the left.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28933 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:55:49 +00:00
Chris Lattner
5f9faeaa78 PPC doesn't have bit converts to/from i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28932 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:40:08 +00:00
Chris Lattner
2e6b77d803 Add 64-bit MTCTR so that indirect calls work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:36:44 +00:00
Chris Lattner
1fd81107f3 Fix an incorrect store pattern. This fixes em3d.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28930 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:22:50 +00:00
Chris Lattner
563ecfbf82 Implement 64-bit undef, sub, shl/shr, srem/urem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28929 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:18:41 +00:00
Chris Lattner
7b0c58cd25 Use i32 for shift amounts instead of i64. This gets bisort working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28927 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 17:34:57 +00:00
Chris Lattner
00659b1781 Add zextload from i32 -> i64, with this, perimeter works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28926 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 17:30:08 +00:00
Reid Spencer
9d5b532de9 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 16:49:46 +00:00
Owen Anderson
f9b238e93d De-pessimize the handling of LCSSA Phi nodes in IndVarSimplify. Hopefully this
will make Shootout-C/nestedloop faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28924 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 02:17:08 +00:00
Chris Lattner
7e097e4633 Print darwin stub stuff correctly in 64-bit mode. With this, treeadd works in
ppc64 mode!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28923 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 01:02:25 +00:00
Chris Lattner
529c233498 Fix variable shadowing issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28922 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 00:10:13 +00:00
Chris Lattner
c08f902bb7 Implement a bunch of 64-bit cleanliness work. With this, treeadd builds (but
doesn't work right).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 00:04:13 +00:00
Chris Lattner
041e9d345f Rearrange compares, add ADDI8, add sext from 32-to-64 bit register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28920 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 23:53:10 +00:00
Chris Lattner
c91a4757b6 Improve PPC64 calling convention support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28919 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 22:48:35 +00:00
Chris Lattner
924c576e9f Remove two more definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28918 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 22:47:37 +00:00
Chris Lattner
7b4e478768 remove two unused instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 22:44:13 +00:00
Chris Lattner
959e321a1b Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 19:20:48 +00:00
Chris Lattner
3c80a51cfd random code cleanups, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28914 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 19:10:05 +00:00
Owen Anderson
2b67f07d2b Make LoopUnswitch able to unswitch loops with live-out values by taking advantage
of LCSSA.  This results several times the number of unswitchings occurring on
tests such and timberwolfmc, unix-tbl, and ldecod.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28912 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 07:44:36 +00:00
Evan Cheng
da08d2c39a Simplify X86CompilationCallback: always align to 16-byte boundary; don't save EAX/EDX if unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28910 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-24 08:36:10 +00:00
Jim Laskey
89d67faf30 Add and sort "sections" in debug lines. This always stepping through
code in sections other than ".text", including weak sections like ctors and
dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-23 12:51:53 +00:00
Evan Cheng
52b510b4c4 Added jump table address relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28908 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-23 01:02:37 +00:00
Evan Cheng
74cb064a35 Eliminate unneeded parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28907 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-22 00:02:55 +00:00
Evan Cheng
22f71315df variable_ops instructions such as call can have any number of operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28906 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 23:37:07 +00:00
Chris Lattner
51df6d5459 Add more anonymous namespaces to make it clear that these are private classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28901 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 18:13:36 +00:00
Chris Lattner
70aa33ee37 Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 16:53:47 +00:00
Chris Lattner
0ad19703ae fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28897 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 16:53:00 +00:00
Andrew Lenharth
df97cc67a6 Add memory operand and int regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28896 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 15:42:36 +00:00
Andrew Lenharth
1725599574 inline asm, at least for floats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28895 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 13:37:27 +00:00
Andrew Lenharth
d1aab35d1a fix argument problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28893 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 01:00:43 +00:00
Chris Lattner
ef95710583 Correct returns of 64-bit values, though they seemed to work before...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28892 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 00:34:03 +00:00
Chris Lattner
7f7b346e3d Make these predicates correct in 64-bit mode too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28890 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 23:21:20 +00:00
Chris Lattner
b410dc9977 Rename OR4 -> OR. Move some PPC64-specific stuff to the 64-bit file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28889 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 23:18:58 +00:00
Chris Lattner
96dc5e5f6d remove unused flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28888 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 23:15:07 +00:00
Chris Lattner
f2c5bca165 add some logical ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28887 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 23:11:59 +00:00
Chris Lattner
4b25b40486 remove some unused patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28886 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 23:11:36 +00:00
Chris Lattner
3ae5eef027 Add some more immediate patterns. This allows us to compile:
void test6() {
  Y = 0xABCD0123BCDE4567;
}

into:

_test6:
        lis r2, -21555
        lis r3, ha16(_Y)
        ori r2, r2, 291
        rldicr r2, r2, 32, 31
        oris r2, r2, 48350
        ori r2, r2, 17767
        std r2, lo16(_Y)(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28885 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 23:03:01 +00:00
Chris Lattner
eded521a17 Instead of li/xoris use li/oris. Note that this doesn't work if bit 15 is
set, so disable the pattern in that case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28884 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 22:38:59 +00:00
Chris Lattner
0ea70b219a Add some 64-bit logical ops.
Split imm16Shifted into a sext/zext form for 64-bit support.
Add some patterns for immediate formation.  For example, we now compile this:

static unsigned long long Y;
void test3() {
  Y = 0xF0F00F00;
}

into:

_test3:
        li r2, 3840
        lis r3, ha16(_Y)
        xoris r2, r2, 61680
        std r2, lo16(_Y)(r3)
        blr

GCC produces:

_test3:
        li r0,0
        lis r2,ha16(_Y)
        ori r0,r0,61680
        sldi r0,r0,16
        ori r0,r0,3840
        std r0,lo16(_Y)(r2)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28883 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 22:34:10 +00:00
Evan Cheng
e3db4daa16 __i386__, __i386, etc. are not defined for x86-64. Use __x86_64__.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28881 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 22:11:12 +00:00
Chris Lattner
dd58343857 64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28880 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 21:39:30 +00:00
Chris Lattner
f27bb6de10 Add some patterns for globals, so we can now compile this:
static unsigned long long X, Y;
void test1() {
  X = Y;
}

into:

_test1:
        lis r2, ha16(_Y)
        lis r3, ha16(_X)
        ld r2, lo16(_Y)(r2)
        std r2, lo16(_X)(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28879 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 21:23:06 +00:00
Jim Laskey
650f609734 Add support for function types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28874 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 19:41:06 +00:00
Chris Lattner
4e85e64007 Remove some now-unneeded casts from instruction patterns. With the casts
removed, tblgen produces identical output to with them in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28867 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:39:56 +00:00
Chris Lattner
047854f2b7 Add some patterns for ppc64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:38:36 +00:00
Chris Lattner
30da68acce Remove some ugly now-redundant casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28864 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:25:29 +00:00
Chris Lattner
a973993c0c Fix some mismatched type constraints
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28862 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 00:12:37 +00:00
Jim Laskey
d16f2a7326 References need to be section relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28861 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 19:49:42 +00:00
Evan Cheng
b21495043e Minor clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28860 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 19:25:30 +00:00
Andrew Lenharth
ab390d045a Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 18:23:36 +00:00
Jim Laskey
067ef412bb References need to be section relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28858 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 15:48:00 +00:00
Andrew Lenharth
3770500f88 Fix a bug, don't drop indirect call sites, especially if there is nothing known about them yet, and restore a simple version of a removed function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28857 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 15:42:47 +00:00
Jim Laskey
ca0dc56742 Handle versioning of compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28855 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 12:54:15 +00:00
Rafael Espindola
58421d7d08 initial implementation of ARMRegisterInfo::eliminateFrameIndex
fixes test/Regression/CodeGen/ARM/ret_arg5.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28854 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-18 00:08:07 +00:00
Chris Lattner
5cff2677a6 Constant fold sqrtf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28853 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 18:17:52 +00:00
Chris Lattner
eb83f4e6cd Fix IndVarsSimplify/2006-06-16-Indvar-LCSSA-Crash.ll, a case where a
"LCSSA" phi node causes indvars to break dominance properties.  This fixes
causes indvars to avoid inserting aggressive code in this case, instead
indvars should be fixed to be more aggressive in the face of lcssa phi's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 01:02:31 +00:00
Evan Cheng
357edf8a4f A new entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28848 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 00:45:49 +00:00
Chris Lattner
b1d26f6665 Implement the getPointerRegClass method, which is required for the ptr_rc
magic to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28847 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 00:01:04 +00:00
Jim Laskey
f06ef2cc16 Forgot operands were hard coded for compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 23:36:12 +00:00
Evan Cheng
54edc84000 Later models likely to have Yonah like attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 21:58:49 +00:00
Chris Lattner
a24b7618f8 Upgrade some load/store instructions to use the proper addressing mode stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 21:29:41 +00:00
Chris Lattner
66d7ebb777 In 64-bit mode, addr mode operands use G8RC instead of GPRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28840 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 21:29:03 +00:00
Chris Lattner
059ca0f5b7 fix some assumptions that pointers can only be 32-bits. With this, we can
now compile:

static unsigned long X;
void test1() {
  X = 0;
}

into:

_test1:
        lis r2, ha16(_X)
        li r3, 0
        stw r3, lo16(_X)(r2)
        blr

Totally amazing :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28839 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 21:01:35 +00:00
Chris Lattner
956f43c310 Split 64-bit instructions out into a separate .td file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28838 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 20:22:01 +00:00
Chris Lattner
8fa05dac39 Force 64-bit register availability in 64-bit mode. For real.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28837 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 20:05:06 +00:00
Chris Lattner
af89fa609b Remove the -darwin and -aix llc options, inferring darwinism and aixism from
the target triple & subtarget info.  woo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28835 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:50:48 +00:00
Evan Cheng
fb9d0dce97 Add missing casts. This fixed some regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:37:15 +00:00
Chris Lattner
426b782a92 Simplify TargetData ctor call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28832 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:24:38 +00:00
Chris Lattner
1790d44d0d Don't pass target name into TargetData anymore, it is never used or needed.
Remove explicit casts to std::string now that there is no overload resolution
issues in the TargetData ctors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28830 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:22:52 +00:00
Chris Lattner
acbc07aa22 Remove ctor with each piece specifyable (which causes overload ambiguities),
add a new init method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28828 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:11:26 +00:00
Chris Lattner
a827953c32 Only count instructions as code size, not constant pools and other per-function stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28827 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:09:26 +00:00
Chris Lattner
276f4b5235 Simplify interpreter construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28826 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:08:38 +00:00
Chris Lattner
7c1fb5f08c Document the subtarget features better, make sure that 64-bit mode, 64-bit
support, and 64-bit register use are all consistent with each other.

Add a new "IsPPC" feature, to distinguish ppc32 vs ppc64 targets, use this
to configure TargetData differently.  This not makes ppc64 blow up on lots
of stuff :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28825 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 17:50:12 +00:00
Chris Lattner
a7a5854f1c Rename some subtarget features. A CPU now can *have* 64-bit instructions,
can in 32-bit mode we can choose to optionally *use* 64-bit registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28824 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 17:34:12 +00:00
Andrew Lenharth
c269c5269a Add a error message to cbu to match bu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28819 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 14:43:36 +00:00
Andrew Lenharth
73a38a9071 move header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28818 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 14:33:53 +00:00
Jim Laskey
7089f45987 1. Revise vector debug support.
2. Update docs for vector debug support and new version control.

3. Simplify serialization of DebugDescInfo subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28816 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 13:14:03 +00:00
Evan Cheng
21abac2757 More libcall transformations:
printf("%s\n", str) -> puts(str)
printf("%c", c) -> putchar(c)
Also fixed fprintf(file, "%c", c) -> fputc(c, file)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28815 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 08:36:35 +00:00
Evan Cheng
952895243e Simplify fprintf(file, "%s", str) to fputs(str, file).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 04:52:30 +00:00
Chris Lattner
94de9a8951 First baby step towards ppc64 support. This adds a new -march=ppc64 backend
that is currently just like ppc32 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28813 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 01:37:27 +00:00
Chris Lattner
1127315562 Fix Regression/Linker/2006-06-15-GlobalVarAnment.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 01:24:04 +00:00
Reid Spencer
dc6830ff25 Only print the stack trace if it was requested. Previously, any call into
the Signals module that registered the handlers would cause the stack trace
to be generated. Now, you must explicitly call PrintStackTraceOnErrorSignal
in order for that to happen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28810 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 00:00:57 +00:00
Chris Lattner
44500e3d53 Teach the local allocator to know that live-in values (e.g. arguments) are
live at function entry.  This prevents it from using arg registers for other
purposes before the arguments are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28809 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 22:21:53 +00:00
Chris Lattner
8e173de059 Add a note that Nate noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28808 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 21:33:31 +00:00
Jim Laskey
f8a01a9661 1. Support standard dwarf format (was bootstrapping in Apple format.)
2. Add vector support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28807 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 20:51:43 +00:00
Jim Laskey
d5a932b92a Was pointed out that structure alignment and type alignment are not the same
thing.  Doubles still need to be special cased.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:37:14 +00:00
Chris Lattner
afe91a5f26 Implement Transforms/InstCombine/bswap.ll, turning common shift/and/or bswap
idioms into bswap intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28803 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:07:26 +00:00
Jim Laskey
35f8c208a9 Alignment of globals has not been quite right. Needed to drop the pointer type
to get the alignment of the element type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 13:10:58 +00:00
Evan Cheng
31f7be9fb7 Vector extract / insert index operand should have ptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:19:05 +00:00
Evan Cheng
a7dc4a59cb Type of extract_element index operand should be iPTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28797 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:18:06 +00:00
Evan Cheng
015188ffbc Type of vector extract / insert index operand should be iPTR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28796 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:14:54 +00:00
Evan Cheng
a844126c43 Consistency. EXTRACT_ELEMENT index operand should have ptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:11:54 +00:00
Evan Cheng
a9767f6218 Assert. Rather than silently stop printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:10:56 +00:00
Evan Cheng
8d3af5e7d0 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 07:22:16 +00:00
Evan Cheng
fae2994302 X86 call instructions can take variable number of operands. Parameters of
vector types are passed via XMM registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 22:24:55 +00:00
Chris Lattner
4b5a352f25 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 21:26:18 +00:00
Evan Cheng
b69d113201 Add argument registers to the end of call operand list (partial fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28783 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 18:17:40 +00:00
Jim Laskey
ed4e566dda Change versioning to per debug info descriptor (merged with tag.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 14:45:39 +00:00
Jim Laskey
014f98c7e5 Place dwarf headers at earliest possible point. Well behaved when skipping
functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 11:35:03 +00:00
Chris Lattner
f7a1212850 Fix Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll, a loop unswitch
bug exposed by the recent lcssa work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 04:46:17 +00:00
Owen Anderson
90245d4cbb When asked not to delete useless PHIs, really don't delete them, no matter how
redundant they are.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28777 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 04:43:14 +00:00
Chris Lattner
13a68e4257 Use the PotDoms map to memoize 'dominating value' lookup. With this patch,
LCSSA is still the slowest pass when gccas'ing 252.eon, but now it only takes
39s instead of 289s. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28776 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 01:13:57 +00:00
Owen Anderson
8b92d0cae1 Fix another instance where PHI nodes need special treatment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28774 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:50:09 +00:00
Owen Anderson
3cc86cc11f Update isLCSSAForm to handle PHI nodes specially for live-out detection. This
is the same as the recent patch to LCSSA.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28773 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:45:22 +00:00
Andrew Lenharth
c8aba85e1c I am sure I had commited this workaround before. Perhaps soon I should sort it all out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 20:34:47 +00:00
Owen Anderson
7be3f1e078 Fix a bug that was causing major slowdowns in povray. This was due to LCSSA
not handling PHI nodes correctly when determining if a value was live-out.

This patch reduces the number of detected live-out variables in the testcase
from 6565 to 485.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 19:37:18 +00:00
Andrew Lenharth
0e4dd01ffc It really helps to be returning to the correct place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28769 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 18:27:39 +00:00
Chris Lattner
c4fa603347 Port some bugfixes in shift handling from SimplifyDemandedBits over to
ComputeMaskedBits.  DemandedMasks and KnownZero/One masks should never have
bits set out of the range of the base datatype.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28768 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 16:52:37 +00:00
Jim Laskey
9bfa2dcff6 TargetLowering::ComputeMaskedBits was not clearing reciprocal bits on shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28765 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 13:08:58 +00:00
Evan Cheng
004fb92615 Cygwin support: use _alloca to allocate stack if > 4k. Patch by Anton Korobeynikov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28764 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 05:14:44 +00:00
Chris Lattner
e67304fb78 Gaar! Don't use r11 for CR save/restore, use R0. R11 can be register
allocated, thus live across the save/reload.  This fixes

llc-beta /MultiSource/Applications/spiff/spiff
llc-beta /MultiSource/Benchmarks/sim/sim:
llc-beta /MultiSource/Benchmarks/Ptrdist/bc/bc
llc-beta /MultiSource/Benchmarks/McCat/12-IOtest/iotest:
llc-beta /MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow
llc-beta /MultiSource/Benchmarks/Fhourstones-3.1/fhourstones3.1
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/rawdaudio
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/rawcaudio
llc-beta /MultiSource/Benchmarks/mediabench/g721/g721encode/encode
llc-beta /MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg

and probably others, with -regalloc=local.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 23:59:16 +00:00
Chris Lattner
b47e0897a0 Fix spilling and reloading of CR regs to reload the right values. This fixes
Olden/power (and probably others) with -regalloc=local.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 21:50:57 +00:00
Owen Anderson
6edf399bb4 Reapply my 6/9 changes. The bug Evan saw no longer occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28759 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 21:49:21 +00:00
Chris Lattner
7f2e1dd5d4 Fix an infinite loop on Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 20:18:01 +00:00
Chris Lattner
a3bb86dd6b Make sure to update the CFG correctly if a switch only has a default dest.
This fixes CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28755 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 18:25:29 +00:00
Andrew Lenharth
f2b806a1aa Let the alpha breakage begin. First Formals and RET. next Calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 18:09:24 +00:00
Andrew Lenharth
232c910b8a Start on my todo list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 16:07:18 +00:00
Rafael Espindola
337c4ad6e7 lower more then 4 formal arguments. The offset is currently hard coded.
implement SelectFrameIndex


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 12:28:08 +00:00
Owen Anderson
3d2aa47bd3 Fix for 2006-06-26-MultipleExitsSingleBlock.
If a single exit block has multiple predecessors within the loop, it will
appear in the exit blocks list more than once.  LCSSA needs to take that into
account so that it doesn't double process that exit block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 07:10:16 +00:00
Owen Anderson
c2cc15cf9d Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 19:22:28 +00:00
Evan Cheng
b9b2b309d3 Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28747 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 09:32:57 +00:00
Chris Lattner
31d1a2c51c Add a missing assertion that would have helped out Reid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28746 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-10 04:16:23 +00:00
Chris Lattner
cf00631719 Work around a nasty tblgen bug where it doesn't add operands for varargs
nodes correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-10 01:15:02 +00:00
Chris Lattner
4a45abf66e Fix a problem exposed by the local allocator. CALL instructions are not marked
as using incoming argument registers, so the local allocator would clobber them
between their set and use.  To fix this, we give the call instructions a variable
number of uses in the CALL MachineInstr itself, so live variables understands
the live ranges of these register arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28744 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-10 01:14:28 +00:00
Evan Cheng
2fafaf1b01 Don't pull in environ, not always safe. Global variables are bad anyway.
Use execve when explicit environment variables ptr is available. Otherwise
just use execv.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 20:43:11 +00:00
Owen Anderson
fcaf345c88 Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves
LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28739 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 18:40:32 +00:00
Owen Anderson
f25c19c6b5 Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 18:33:30 +00:00
Evan Cheng
e5e228df19 Comments to appease sabre.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 06:25:10 +00:00
Evan Cheng
b12223e284 Minor compilation speed improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 06:24:42 +00:00
Evan Cheng
86c75d3113 RewriteExpr, either the new PHI node of induction variable or the
post-increment value, should be first cast to the appropriated type (to the
type of the common expr). Otherwise, the rewrite of a use based on (common +
iv) may end up with an incorrect type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 00:12:42 +00:00
Owen Anderson
a452932171 Update some comments, and expose LCSSAID in preparation for having other passes
require LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 20:02:53 +00:00
Chris Lattner
0c48fd4610 Fix X86/inline-asm.ll:test2, a case where an input value was implicitly
truncated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 18:27:11 +00:00
Chris Lattner
cf752aa502 Fix Regression/CodeGen/X86/inline-asm.ll, a case where inline asm causes
implement extension of a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 18:22:48 +00:00
Reid Spencer
ab4d9b0446 Squelch a warning about signed/unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 18:08:43 +00:00
Chris Lattner
c0bad5706e Add support for "m" inline asm constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28728 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 18:03:49 +00:00
Chris Lattner
fd561cded3 Fix an assert-on-inline-inline-asm bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 18:00:47 +00:00
Reid Spencer
393830a33a For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 17:00:08 +00:00
Vladimir Prus
28962f353b Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 16:03:13 +00:00
Vladimir Prus
dd49dbfe44 New method BasicBlock::getFirstNonPHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 15:46:18 +00:00
Reid Spencer
32f5553c03 For PR787:
Provide new llvm::sys::Program facilities for converting the stdout and
stdin to binary mode. There is no standard way to do this and the available
mechanisms are platform specific. Adjust the bytecode reader and writer to
use these methods when their input is stdin or output is stdout. THis avoids
the problem with \n writing CRLF to a bytecode file on windows.

Patch Contributed by Michael Smith.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:18:34 +00:00
Reid Spencer
af303d53e6 For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:03:13 +00:00
Chris Lattner
3bdac5171b Add a virtual dtor to the InlineAsm class so that the principle method of
the class can be defined in InlineAsm.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:47:44 +00:00
Chris Lattner
101cefa14a Fix a bug where the types for inlineasm nodes were not properly entered into
the compaction table for a function.  This broke compilation of hexxagon
on darwin/x86 with recent changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28717 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:20:03 +00:00
Reid Spencer
4f1bd9e996 For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:00:26 +00:00
Reid Spencer
6296b3cac5 Fix a spello in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 21:24:10 +00:00
Reid Spencer
6df60a9eff For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:00:19 +00:00
Evan Cheng
e8bd0a332a Added X86FunctionInfo subclass of MachineFunction to record whether the
function that is being lowered is forced to use FP. Currently this is only
true for main() / Cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 23:30:24 +00:00
Chris Lattner
fc790168a2 Move toolrunner out of libsupport into the bugpoint tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:31:36 +00:00
Chris Lattner
18a4af2ba6 Fix a bug in a recent patch. This fixes UnitTests/Vector/Altivec/casts.c on
PPC/altivec


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28698 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:26:02 +00:00
Chris Lattner
475c55393a Now that PR633 is implemented, the CBE can know to emit _setjmp/_longjmp
when available.  This speeds up hexxagon from 18.61s to 16.61s with the CBE on
PPC Mac OS (for reference, LLC is 15.48s and GCC is 23.35s).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 21:45:47 +00:00
Chris Lattner
001db453f5 Add PowerPC intrinsics to support dcbz[l]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 21:29:23 +00:00
Owen Anderson
e9d93d5d70 Fix some formatting, and use inLoop() when appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 04:36:36 +00:00
Owen Anderson
92deacf2f7 Stop a memory leak, and update some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 04:28:30 +00:00
Reid Spencer
51ab5c8862 Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 00:00:42 +00:00
Rafael Espindola
4b02367d54 add R0 to liveout
expand "ret null" (implements test/Regression/CodeGen/ARM/ret_void.ll)
note that a Flag link is missing between the copy and the branch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28691 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 22:26:14 +00:00
Reid Spencer
fcadfbbdef For PR798:
Provide GraphViz support for MingW32. Patch provided by Anton Korobeynikov


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:26:06 +00:00
Reid Spencer
515b5b379f Make it possible to override the standard version printer. Not all tools
built with CommandLine.h will want the --version option to report that the
tool belongs to LLVM. To override simply pass a void func() to the
cl::SetVersionPrinter() function and that void func() will be called when
it is time to print the version information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:22:56 +00:00
Reid Spencer
3e0c154240 For PR798:
Add support for Graphviz. Patch contributed by Anton Korobeynikov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 15:44:46 +00:00
Evan Cheng
c21051ff96 A few new entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28683 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-04 09:08:00 +00:00
Evan Cheng
f8614db52e Be consistent with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-04 07:24:07 +00:00
Owen Anderson
c14c1d472a Some more clean-up, and squash an IDF-Phi related bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-04 00:55:19 +00:00
Andrew Lenharth
a5cc38bcbd ignore ordered/unordered for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28679 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-04 00:25:51 +00:00
Owen Anderson
9e1c1ddd4b Various clean-ups suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-04 00:02:23 +00:00
Owen Anderson
30019c88f4 Fix a bug in Phi-noded insertion. Also, update some comments to reflect what's
actually going on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-03 23:22:50 +00:00
Evan Cheng
3649b0efa5 Cygwin support. Patch by Anton Korobeynikov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 22:38:37 +00:00
Evan Cheng
aede9b9598 Use xor to clear a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 21:20:34 +00:00
Evan Cheng
94b1453278 Incorrect AT&T opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 21:09:10 +00:00
Chris Lattner
0c1262c9f9 Remove unneeded hook. Patch by Anton K. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 19:11:46 +00:00
Chris Lattner
d9477607dc Add mingw support, patch contributed by Anton
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:54:01 +00:00
Chris Lattner
191b0ba97e Force anything that #includes llvm/Transforms/Utils/UnifyFunctionExitNodes.h
to link in the implementation.  Thanks to Anton Korobeynikov for figuring out
what was going on here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:40:06 +00:00
Chris Lattner
57de7a4542 Fix build on systems with bad bison's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:20:28 +00:00
Chris Lattner
ecf626fedf Remove dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 20:02:28 +00:00
Chris Lattner
35033efd08 Make the "pruning cloner" smarter. As it propagates constants through the
code (while cloning) it often gets the branch/switch instructions.  Since it
knows that edges of the CFG are dead, it need not clone (or even look) at
the obviously dead blocks.  This should speed up the inliner substantially on
code where there are lots of inlinable calls to functions with constant
arguments.  On C++ code in particular, this kicks in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 19:19:23 +00:00
Chris Lattner
620fd68b10 Fix linking of inline asm objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 19:14:22 +00:00
Reid Spencer
48fdf91d0f Provide configuration support and usage for MINGW32 platform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28639 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 19:03:21 +00:00
Chris Lattner
870286aa33 Fix -pedantic warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:29:22 +00:00
Chris Lattner
26e6e109d5 Fix -pedantic warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28635 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:27:11 +00:00
Chris Lattner
080e25d884 Fix -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:17:46 +00:00
Chris Lattner
08a9a985dc Silence -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:17:06 +00:00
Chris Lattner
5180b29cb0 Silence a -pedantic warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28632 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:16:21 +00:00
Chris Lattner
078d1826d2 Silence -pedantic warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28630 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:13:10 +00:00
Chris Lattner
fea34a1f11 Silence some -pedantic warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:12:14 +00:00
Reid Spencer
192913e281 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:02:51 +00:00
Reid Spencer
177284ce89 Prevent the -pedantic option from causing Mac OS/X build problems:
LiveIntervalAnalysis.cpp:218: error: floating constant exceeds range of 'double'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 06:12:21 +00:00
Owen Anderson
ff99366919 Remove a FIXME that was fixed with my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 06:07:40 +00:00
Owen Anderson
2824da4738 More cleanups. Also, add a special case for updating PHI nodes, and
reimplement getValueDominatingFunction to walk the DominanceTree rather than
just searching blindly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28618 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 06:05:47 +00:00
Evan Cheng
2675534b7f Typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 05:53:27 +00:00
Reid Spencer
a2e05ea997 For PR786:
Don't warn about -pedantic errors. Add a note to the PR instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 05:49:51 +00:00
Reid Spencer
72f42bbc9b For PR786:
Turn -pedantic and -Wno-long-long compile flags on by default. In a few
places, avoid the warnings by removing these options in the local makefile.
One notable exception: lib/Target/CBackend/Writer.cpp. These warnings are
left on as a reminder to developers to clean them up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28614 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:55:21 +00:00
Reid Spencer
18c8b49e7d Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:30:27 +00:00
Evan Cheng
04b2562502 Remove a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28607 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 00:30:39 +00:00
Evan Cheng
cbe70e1c4b Rename ASM modifier trunc8, trunc16 to subreg8, subreg16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 22:34:26 +00:00
Reid Spencer
2bc320de0c Fix casting so there's no warning on Alpha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28605 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 22:26:11 +00:00
Evan Cheng
f91c10153c Sign extender
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28603 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 22:05:11 +00:00
Reid Spencer
6dc6665e29 Squelch this warning:
/bzlib.c:126: warning: string length `1056' is greater than the length `509' ISO
C89 compilers are required to support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28602 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 21:53:42 +00:00
Chris Lattner
13d4ab4009 Swap the order of operands created here. For +&|^, the order doesn't matter,
but for sub, it really does!  Fix fixes a miscompilation of fibheap_cut in
llvmgcc4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28600 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 21:14:00 +00:00
Owen Anderson
408a4061d8 Extract a huge loop into a helper method. Fix a few iterator-invalidation bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28599 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:55:06 +00:00
Evan Cheng
190717d3cf Rename instructions for consistency sake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28594 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 19:00:07 +00:00
Evan Cheng
4c6f2f9e92 commuteInstruction() does not always create a new MI!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28592 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 18:03:39 +00:00
Reid Spencer
0b2375edfe Make the getNamedFunction and getNamedGlobal methods be const. They don't
change the module in any way and we should enforce that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 16:40:28 +00:00
Evan Cheng
16eee25c66 Eliminate a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28585 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 07:13:03 +00:00
Evan Cheng
7b336a8746 visitVBinOp: Can't fold divide by zero!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28584 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 06:08:35 +00:00
Evan Cheng
9d09b89f39 Select vector_shuffle v1, undef <2, 3, ?, ?> to MOVHLPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28582 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 00:51:37 +00:00
Evan Cheng
8f692e2457 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28581 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 00:50:42 +00:00
Evan Cheng
5a47282149 A new entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28579 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 23:56:31 +00:00
Evan Cheng
b5e406afc3 MAXP{D|S} and MINP{D|S} are commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28578 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 23:47:30 +00:00
Evan Cheng
efeaed8fb4 Commute shufps / shufpd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28577 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 23:34:30 +00:00
Evan Cheng
a0eaf2d0c5 Somehow I lost a condition when I was shuffling some code around. Anyway,
only transform a shufps to pshufd when the first two operands are the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28575 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 22:13:36 +00:00
Evan Cheng
aa3c1410b4 Fix a build breaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28574 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:45:53 +00:00
Evan Cheng
51da42c28f Oops. PSHUFD is only available with SSE2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28573 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:30:59 +00:00
Chris Lattner
9e18ef5262 Add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28572 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:29:15 +00:00
Chris Lattner
7b05350906 Always reserve space for 8 spilled GPRs. GCC apparently assumes that this
space will be available, even if the callee isn't varargs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28571 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:21:04 +00:00
Evan Cheng
ccba76bb25 Allow shufps x, x, mask to be converted to pshufd x, mask to save a move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28565 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 20:26:50 +00:00
Evan Cheng
eaf1e31775 Remove bogus comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28564 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 20:24:48 +00:00
Reid Spencer
461bed2b75 Provide a simpler interface for getting a ConstantArray from a character
string. Instead of specifying the length, just specify whether the user
wants a terminating null or not. The default is "true" to retain the same
behavior as previously provided by this function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 18:15:07 +00:00
Evan Cheng
6b8e5a9318 Make sure the register pressure reduction schedulers work for non-uniform
latency targets, e.g. PPC32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28561 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 18:05:39 +00:00
Evan Cheng
19564e3d83 When a priority_queue is empty, the behavior of top() operator is
non-deterministic. Returns NULL when it's empty!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28560 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 18:04:34 +00:00
Rafael Espindola
85ede37ca9 Expand ret into "CopyToReg;BRIND"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28559 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 17:33:19 +00:00
Reid Spencer
dd0f8df161 Undo a patch that breaks llvm-as because the warning message is written to
stdout when the output of llvm-as is also written to stdout. We'll have to
fix tcl some other way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28557 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 16:34:59 +00:00
Reid Spencer
c02af8538b Write the WARNING message to cout instead of cerr. Writing to cerr causes
Tcl to claim that the program had an error and thus produces errors in
the dejagnu testing when its really just a warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28556 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 16:05:59 +00:00
Reid Spencer
8949477ae4 Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28552 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 08:23:18 +00:00
Evan Cheng
5a622f2e06 Add a note about integer multiplication by constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28551 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 07:37:37 +00:00
Evan Cheng
e6ad27e917 A addressing mode folding enhancement:
Fold c2 in (x << c1) | c2 where (c2 < c1)
e.g.
int test(int x) {
  return (x << 3) + 7;
}

This can be codegen'd as:
leal 7(,%eax,8), %eax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28550 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 06:59:36 +00:00
Evan Cheng
8c65fa564a Some new entries about truncate / anyext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28548 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 06:23:50 +00:00
Andrew Lenharth
40932272c7 move calltarget to dsa
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28546 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 23:39:48 +00:00
Andrew Lenharth
632cd52162 Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 22:58:38 +00:00
Vladimir Prus
cb29bd7fc9 Reset DEBUG_SYMBOL_TABLE back to 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28538 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 12:54:52 +00:00
Vladimir Prus
6ba568fabb Fix compile error when DEBUG_SYMBOL_TABLE is defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28537 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 12:45:15 +00:00
Reid Spencer
fd20c0ab00 Fix grammar in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28534 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:34:34 +00:00
Owen Anderson
00ea74c27e Add Use replacement. Assuming there is nothing horribly wrong with this, LCSSA
is now theoretically feature-complete.  It has not, however, been thoroughly
test, and is still considered experimental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 01:00:00 +00:00
Owen Anderson
bd82277cbb Major think-o. Iterate over all live out-of-loop values, and perform the
other calculations on each individually, rather than trying to delay it and do
them all at the end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28527 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-28 19:33:28 +00:00
Owen Anderson
2f21e07915 Make LCSSA insert proper Phi nodes throughout the rest of the CFG by computing
the iterated Dominance Frontier of the loop-closure Phi's.  This is the
second phase of the LCSSA pass.  The third phase (coming soon) will be to
update all uses of loop variables to use the loop-closure Phi's instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28524 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 18:47:11 +00:00
Chris Lattner
8d8d6530b1 Fix some regression from the inliner patch I committed last night. This fixes
ldecod, lencod, and SPASS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28523 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 17:28:13 +00:00
Chris Lattner
5b5bc3032f Switch the inliner over to using CloneAndPruneFunctionInto. This effectively
makes it so that it constant folds instructions on the fly.  This is good
for several reasons:

0. Many instructions are constant foldable after inlining, particularly if
   inlining a call with constant arguments.
1. Without this, the inliner has to allocate memory for all of the instructions
   that can be constant folded, then a subsequent pass has to delete them.  This
   gets the job done without this extra work.
2. This makes the inliner *pass* a bit more aggressive: in particular, it
   partially solves a phase order issue where the inliner would inline lots
   of code that folds away to nothing, but think that the resultant function
   is big because of this code that will be gone.  Now the code never exists.

This is the first part of a 2-step process.  The second part will be smart
enough to see when this implicit constant folding propagates a constant into
a branch or switch instruction, making CFG edges dead.

This implements Transforms/Inline/inline_constprop.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:28:04 +00:00
Chris Lattner
a5135ba0c9 Ignore generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28520 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:23:30 +00:00