Commit Graph

14772 Commits

Author SHA1 Message Date
Evan Cheng
42f75a926a Fix a typo that causes 2006-07-07-ComputeMaskedBits.ll to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29072 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:37:21 +00:00
Chris Lattner
7cd580f0b7 Fix PR820 and Transforms/GlobalOpt/2006-07-07-InlineAsmCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29071 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:37:01 +00:00
Chris Lattner
b14c342bd5 no need to do a stat then an lstat. lstat will tell us if normal files don't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29068 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 21:21:06 +00:00
Reid Spencer
8d8a7ffe58 Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 20:56:50 +00:00
Reid Spencer
3039b99697 Remove EH use from the Archive library and adjust its users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 19:09:14 +00:00
Chris Lattner
c67dc457ce Move << method out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29062 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 18:11:32 +00:00
Chris Lattner
bed22d8902 Change AllocateRWX/DeallocateRWX to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29058 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:32:37 +00:00
Chris Lattner
c1780d2a0a Change AllocateRWX/DeallocateRWX do not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29057 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:31:41 +00:00
Chris Lattner
61ae8201a7 Fix this impl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:26:47 +00:00
Chris Lattner
5c72a3ae10 Adapt to new interface function materialization interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29051 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:18:09 +00:00
Chris Lattner
17aa9d3f53 LoadLibraryPermanently no longer throws an exception, so this code doesn't have
to catch it.  Other minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:14:04 +00:00
Chris Lattner
cc2fa54dfa Add a helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29049 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:13:10 +00:00
Chris Lattner
adcbce0ad4 Change LoadLibraryPermanently to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:12:36 +00:00
Chris Lattner
bbf34398a0 This patch (written by Reid) changes compressor to never throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:00:12 +00:00
Chris Lattner
e9c701fd86 This uses EH info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29044 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 16:46:43 +00:00
Chris Lattner
7c339b8ca2 These libs use EH info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 16:44:31 +00:00
Evan Cheng
206ee9d86c X86 target specific DAG combine: turn build_vector (load x), (load x+4),
(load x+8), (load x+12), <0, 1, 2, 3> to a single 128-bit load (aligned and
unaligned).

e.g.

__m128 test(float a, float b, float c, float d) {
  return _mm_set_ps(d, c, b, a);
}

_test:
        movups 4(%esp), %xmm0
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29042 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 08:33:52 +00:00
Chris Lattner
94aa7f3ba8 Fix a bug in my previous patch which broke building llvm/runtime when using llvm-gcc3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 06:06:06 +00:00
Chris Lattner
a98a81e92a This uses EH extensively
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 00:47:29 +00:00
Chris Lattner
148f440635 Modify the SlowOperationInformer interface to not throw exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29028 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 22:34:06 +00:00
Chris Lattner
0300f3e712 Change the ModuleProvider interface to not throw exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 21:35:01 +00:00
Chris Lattner
3fc2f4e83f Print LLVM version info like this:
Low Level Virtual Machine (http://llvm.org/):
  llvm version 1.8cvs
  DEBUG build with assertions.

instead of like this:

Low Level Virtual Machine (llvm) 1.8cvs (see http://llvm.org/) ASSERTIONS ENABLED

Also, add a place for vendor version info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29020 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:33:03 +00:00
Chris Lattner
05ac92ca7d Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:02:27 +00:00
Chris Lattner
90ac1c0775 Undisable ppc64 jit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 17:10:42 +00:00
Evan Cheng
152ed05353 Added option -code-model to set code model (only used in 64-bit) mode. Valid
values include small, kernel, medium, large, and default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 01:53:36 +00:00
Evan Cheng
60c07e1aea Reorg. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28999 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-05 22:17:51 +00:00
Evan Cheng
507b0aa062 Fix JIT on non MacOS X i386 systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28992 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-05 07:09:13 +00:00
Andrew Lenharth
441a57041d These are already implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-03 18:00:29 +00:00
Andrew Lenharth
78c252c93d 0 offsets for memory operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28989 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-03 17:57:34 +00:00
Evan Cheng
322812e603 Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28987 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 23:57:05 +00:00
Evan Cheng
775ff18257 Should just use xorps to clear XMM registers for all data types. pxor is also one byte longer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28984 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 18:04:54 +00:00
Evan Cheng
be33dd95d8 Let X86CompilationCallback pass previous frame and return address to X86CompilationCallback2. Remove alloca hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28982 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 01:48:36 +00:00
Evan Cheng
09c545790d Add shift and rotate by 1 instructions / patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28980 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:36:51 +00:00
Evan Cheng
a8e83ec8c3 Always use xorps to clear XMM registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28979 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:34:23 +00:00
Evan Cheng
d3f6981174 Move .literal4 and .literal8 support into AsmPrinter.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:33:06 +00:00
Evan Cheng
2d2cec1e9e Add support to print 4-, 8-, and 16- byte constant literals in special
sections. e.g. On Darwin that would be .literal4 and .literal8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:26:09 +00:00
Chris Lattner
2c79de8018 Hide x86 symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 23:27:49 +00:00
Chris Lattner
9525528a7d Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28975 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 23:17:24 +00:00
Chris Lattner
9ef7e06cce Use hidden visibility to reduce codesize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28974 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 22:57:00 +00:00
Chris Lattner
f8c68f694c Shave another 27K off libllvmgcc.dylib with visibility hidden
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28973 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 22:17:39 +00:00
Chris Lattner
f4b546110c Shrink libllvmgcc.dylib by another 23K
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 22:08:15 +00:00
Chris Lattner
2a41a98fb7 shrink libllvmgcc.dylib another 25K
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 22:00:36 +00:00
Chris Lattner
360e8200ec Mark these two classes as hidden, shrinking libllbmgcc.dylib by 25K
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 21:58:30 +00:00
Chris Lattner
f190d38055 Use hidden visibility to reduce the sizes of some .o files. This chops 60K off a release llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28969 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 21:38:54 +00:00
Chris Lattner
883a52de66 Fix CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28965 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 18:29:47 +00:00
Evan Cheng
33c36f306a Doh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28963 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 17:56:43 +00:00
Owen Anderson
372994be25 Switch to a very conservative heuristic for determining when loop-unswitching
will be profitable.  This is mainly to remove some cases where excessive
unswitching would result in long compile times and/or huge generated code.

Once someone comes up with a better heuristic that avoids these cases, this
should be switched out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28962 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 17:47:50 +00:00
Chris Lattner
d228018396 Fix Transforms/InstCombine/2006-06-28-infloop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28961 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 17:34:50 +00:00
Chris Lattner
daa2bf9a19 Don't unswitch really large loops even if they are mostly filled with empty
blocks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28959 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 16:38:55 +00:00
Evan Cheng
ee12e8f28d Oops. Need to keep CP index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28958 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 07:55:24 +00:00
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