Commit Graph

25379 Commits

Author SHA1 Message Date
Chris Lattner 996795b0dd Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K

llvm-svn: 28975
2006-06-28 23:17:24 +00:00
Chris Lattner d6cba04607 Use hidden visibility to reduce codesize
llvm-svn: 28974
2006-06-28 22:57:00 +00:00
Chris Lattner e097e6f7c7 Shave another 27K off libllvmgcc.dylib with visibility hidden
llvm-svn: 28973
2006-06-28 22:17:39 +00:00
Chris Lattner 4a4c7fe7fa Shrink libllvmgcc.dylib by another 23K
llvm-svn: 28972
2006-06-28 22:08:15 +00:00
Chris Lattner 2f8c2d8ef2 shrink libllvmgcc.dylib another 25K
llvm-svn: 28971
2006-06-28 22:00:36 +00:00
Chris Lattner 54a34cd20b Mark these two classes as hidden, shrinking libllbmgcc.dylib by 25K
llvm-svn: 28970
2006-06-28 21:58:30 +00:00
Chris Lattner 02157b0627 Use hidden visibility to reduce the sizes of some .o files. This chops 60K off a release llvm-dis.
llvm-svn: 28969
2006-06-28 21:38:54 +00:00
Chris Lattner 9fbcf35407 Add support for hidden visibility
llvm-svn: 28968
2006-06-28 21:38:04 +00:00
Andrew Lenharth c327932ac1 not really XFailing these, as only incompleteness is wrong in the graph
llvm-svn: 28967
2006-06-28 20:14:30 +00:00
Andrew Lenharth 48b2b0c444 change I flag on test
llvm-svn: 28966
2006-06-28 20:07:36 +00:00
Chris Lattner 710b3d5ea1 Fix CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll
llvm-svn: 28965
2006-06-28 18:29:47 +00:00
Chris Lattner 924963b604 Testcase that crashes the ppc backend.
llvm-svn: 28964
2006-06-28 18:29:33 +00:00
Evan Cheng 87813744ba Doh.
llvm-svn: 28963
2006-06-28 17:56:43 +00:00
Owen Anderson 18e816f356 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.

llvm-svn: 28962
2006-06-28 17:47:50 +00:00
Chris Lattner 3fda386965 Fix Transforms/InstCombine/2006-06-28-infloop.ll
llvm-svn: 28961
2006-06-28 17:34:50 +00:00
Chris Lattner 4c6f86816e Infinite loop in instcombine that nate hit.
llvm-svn: 28960
2006-06-28 17:34:28 +00:00
Chris Lattner 0a2e11260e Don't unswitch really large loops even if they are mostly filled with empty
blocks.

llvm-svn: 28959
2006-06-28 16:38:55 +00:00
Evan Cheng 0687b04455 Oops. Need to keep CP index.
llvm-svn: 28958
2006-06-28 07:55:24 +00:00
Evan Cheng 7f88856d95 Darwin puts float and double literal constants into literal4 and literal8 sections.
llvm-svn: 28957
2006-06-28 07:35:41 +00:00
Andrew Lenharth 5b10cfcc39 add some missing externals
llvm-svn: 28955
2006-06-28 01:16:06 +00:00
Andrew Lenharth ebfa24ee9a 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 )

llvm-svn: 28953
2006-06-28 01:01:52 +00:00
Evan Cheng 307b9c93cf Allow EmitConstantPool to be redefined by derived classes.
llvm-svn: 28952
2006-06-28 00:52:32 +00:00
Chris Lattner 90213c6c18 Handle alias sets that have been unified, and thus can have other references
to them.  This fixes a regression in my previous checkin.

llvm-svn: 28951
2006-06-27 23:56:13 +00:00
Chris Lattner f4e0653b3a 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

llvm-svn: 28950
2006-06-27 23:48:59 +00:00
Chris Lattner 5f49a00b9f New testcase, reduced by nate, which crashes DSE
llvm-svn: 28949
2006-06-27 23:47:39 +00:00
Andrew Lenharth a53a22e5fe this case isn't handled
llvm-svn: 28948
2006-06-27 23:19:14 +00:00
Owen Anderson bb3ae5eb8f Fix for 2006-06-27-DeadSwitchCase.ll
Be more careful when updating Phi nodes after eliminating dead switch cases.  Fix
proposed by Chris.

llvm-svn: 28947
2006-06-27 22:26:09 +00:00
Owen Anderson c3b1a220a7 Testcase that Nate found where LoopUnswitch chokes on eliminating a dead case
from a switch instruction.

llvm-svn: 28946
2006-06-27 22:24:59 +00:00
Rafael Espindola f6f5aff038 handle the "mov reg1, reg2" case in isMoveInstr
llvm-svn: 28945
2006-06-27 21:52:45 +00:00
Chris Lattner ca9c488528 Don't match 64-bit bitfield inserts into rlwimi's. todo add rldimi. :)
llvm-svn: 28944
2006-06-27 21:08:52 +00:00
Chris Lattner c4998a0138 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.

llvm-svn: 28943
2006-06-27 21:05:04 +00:00
Chris Lattner 66e9513625 testcase that crashes dead arg elim.
llvm-svn: 28942
2006-06-27 20:58:41 +00:00
Chris Lattner f882c54505 Fix ppc64 jump tables
llvm-svn: 28941
2006-06-27 20:46:17 +00:00
Chris Lattner cc21fa7b41 Pass -Xlinker flags to gcc when it builds the shared object.
llvm-svn: 28939
2006-06-27 20:35:36 +00:00
Evan Cheng 2aed9ebded Remove dead code.
llvm-svn: 28938
2006-06-27 20:34:14 +00:00
Evan Cheng 6d1f93d500 Fix -extraflags
llvm-svn: 28937
2006-06-27 20:30:28 +00:00
Chris Lattner 82ab3e21b1 Print stubs for external globals right.
llvm-svn: 28936
2006-06-27 20:20:53 +00:00
Chris Lattner 8aed3cc46b Implement 64-bit select, bswap, etc.
llvm-svn: 28935
2006-06-27 20:14:52 +00:00
Chris Lattner a2af3f47ea Add a pattern for i64 sra. Print 8-byte units with a space between the .quad
and the data

llvm-svn: 28934
2006-06-27 20:07:26 +00:00
Chris Lattner db9a95b775 Fix rewriting frame offsets with ixaddr instructions, which implicitly shift
the offset two bits to the left.

llvm-svn: 28933
2006-06-27 18:55:49 +00:00
Chris Lattner a07410c95b PPC doesn't have bit converts to/from i64
llvm-svn: 28932
2006-06-27 18:40:08 +00:00
Chris Lattner 3b5873456e Add 64-bit MTCTR so that indirect calls work.
llvm-svn: 28931
2006-06-27 18:36:44 +00:00
Chris Lattner e27d51e0d8 Fix an incorrect store pattern. This fixes em3d.
llvm-svn: 28930
2006-06-27 18:22:50 +00:00
Chris Lattner d48ce27532 Implement 64-bit undef, sub, shl/shr, srem/urem
llvm-svn: 28929
2006-06-27 18:18:41 +00:00
Devang Patel 039215b020 Fix cut-n-pasto in comments.
llvm-svn: 28928
2006-06-27 18:07:29 +00:00
Chris Lattner cb5a84f446 Use i32 for shift amounts instead of i64. This gets bisort working.
llvm-svn: 28927
2006-06-27 17:34:57 +00:00
Chris Lattner f7fd88356a Add zextload from i32 -> i64, with this, perimeter works.
llvm-svn: 28926
2006-06-27 17:30:08 +00:00
Reid Spencer ee7eaa25cf 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!

llvm-svn: 28925
2006-06-27 16:49:46 +00:00
Owen Anderson b659bb4196 De-pessimize the handling of LCSSA Phi nodes in IndVarSimplify. Hopefully this
will make Shootout-C/nestedloop faster.

llvm-svn: 28924
2006-06-27 02:17:08 +00:00
Chris Lattner 1df0839067 Print darwin stub stuff correctly in 64-bit mode. With this, treeadd works in
ppc64 mode!

llvm-svn: 28923
2006-06-27 01:02:25 +00:00
Chris Lattner 9a40cca40f Fix variable shadowing issue
llvm-svn: 28922
2006-06-27 00:10:13 +00:00
Chris Lattner 97b3da1519 Implement a bunch of 64-bit cleanliness work. With this, treeadd builds (but
doesn't work right).

llvm-svn: 28921
2006-06-27 00:04:13 +00:00
Chris Lattner 7ecbd301b1 Rearrange compares, add ADDI8, add sext from 32-to-64 bit register
llvm-svn: 28920
2006-06-26 23:53:10 +00:00
Chris Lattner ec78cade34 Improve PPC64 calling convention support
llvm-svn: 28919
2006-06-26 22:48:35 +00:00
Chris Lattner b6a65f4661 Remove two more definitions
llvm-svn: 28918
2006-06-26 22:47:37 +00:00
Chris Lattner 86e6046515 remove two unused instructions.
llvm-svn: 28917
2006-06-26 22:44:13 +00:00
Chris Lattner e7d4e56961 Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night.

llvm-svn: 28916
2006-06-26 19:20:48 +00:00
Chris Lattner b06021a0f7 Add a new method.
llvm-svn: 28915
2006-06-26 19:20:25 +00:00
Chris Lattner 49771a0462 random code cleanups, no functionality change
llvm-svn: 28914
2006-06-26 19:10:05 +00:00
Owen Anderson f52351e50f 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.

llvm-svn: 28912
2006-06-26 07:44:36 +00:00
Evan Cheng 38c5aee959 Simplify X86CompilationCallback: always align to 16-byte boundary; don't save EAX/EDX if unnecessary.
llvm-svn: 28910
2006-06-24 08:36:10 +00:00
Jim Laskey a7b2bd5997 Add and sort "sections" in debug lines. This always stepping through
code in sections other than ".text", including weak sections like ctors and
dtors.

llvm-svn: 28909
2006-06-23 12:51:53 +00:00
Evan Cheng 6a34939af6 Added jump table address relocation.
llvm-svn: 28908
2006-06-23 01:02:37 +00:00
Evan Cheng 0c9b90aba3 Eliminate unneeded parameter.
llvm-svn: 28907
2006-06-22 00:02:55 +00:00
Evan Cheng fc1b27dad1 variable_ops instructions such as call can have any number of operands.
llvm-svn: 28906
2006-06-21 23:37:07 +00:00
Reid Spencer bb6e26492e Whoops, missed a couple more C-style casts.
llvm-svn: 28905
2006-06-21 22:19:00 +00:00
Reid Spencer 81a0d25811 Use C++ style casts instead of C-style casts to shut up compiler warnings
when compiling with -pedantic. Passes regression tests on Linux.

llvm-svn: 28904
2006-06-21 21:54:54 +00:00
Chris Lattner 161a84ebeb Add targets for generating .s file in addition to .o files.
llvm-svn: 28903
2006-06-21 21:01:20 +00:00
Chris Lattner 085c7153da Factor a bunch of rules together, no functionality change.
llvm-svn: 28902
2006-06-21 20:58:03 +00:00
Chris Lattner 6a871e1b64 Add more anonymous namespaces to make it clear that these are private classes
llvm-svn: 28901
2006-06-21 18:13:36 +00:00
Chris Lattner 41c173c68a Remove unneeded libs
llvm-svn: 28900
2006-06-21 17:26:13 +00:00
Reid Spencer c95970be9d For PR811:
Don't both with the "C" and "cc" extensions as they aren't common and they
the "C" extension conflicts with the "c" extension on operating systems
that have case insensitive file names.

llvm-svn: 28899
2006-06-21 17:21:39 +00:00
Chris Lattner 1c12a881fb 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.

llvm-svn: 28898
2006-06-21 16:53:47 +00:00
Chris Lattner 7aa4590f67 fix typo
llvm-svn: 28897
2006-06-21 16:53:00 +00:00
Andrew Lenharth 680ac12e53 Add memory operand and int regs
llvm-svn: 28896
2006-06-21 15:42:36 +00:00
Andrew Lenharth b0316eada6 inline asm, at least for floats
llvm-svn: 28895
2006-06-21 13:37:27 +00:00
Jim Laskey e7235645a2 fix typos
llvm-svn: 28894
2006-06-21 11:08:10 +00:00
Andrew Lenharth 336313ce3d fix argument problem
llvm-svn: 28893
2006-06-21 01:00:43 +00:00
Chris Lattner dc38e6f322 Correct returns of 64-bit values, though they seemed to work before...
llvm-svn: 28892
2006-06-21 00:34:03 +00:00
Evan Cheng cb8cc7bdef Fix non-64-bit clean code.
llvm-svn: 28891
2006-06-21 00:29:14 +00:00
Chris Lattner 1f1b096142 Make these predicates correct in 64-bit mode too.
llvm-svn: 28890
2006-06-20 23:21:20 +00:00
Chris Lattner 52a956da52 Rename OR4 -> OR. Move some PPC64-specific stuff to the 64-bit file
llvm-svn: 28889
2006-06-20 23:18:58 +00:00
Chris Lattner 5705d4d519 remove unused flag
llvm-svn: 28888
2006-06-20 23:15:07 +00:00
Chris Lattner 9d65f3507e add some logical ops
llvm-svn: 28887
2006-06-20 23:11:59 +00:00
Chris Lattner 7a856a6d88 remove some unused patterns
llvm-svn: 28886
2006-06-20 23:11:36 +00:00
Chris Lattner d881f8257b 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

llvm-svn: 28885
2006-06-20 23:03:01 +00:00
Chris Lattner 9834ad2fc6 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.

llvm-svn: 28884
2006-06-20 22:38:59 +00:00
Chris Lattner 7e742e46ac 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

llvm-svn: 28883
2006-06-20 22:34:10 +00:00
Evan Cheng a7bd00b451 Added --with-extra-options=opts to specify additional options to build LLVM and run tests.
llvm-svn: 28882
2006-06-20 22:16:32 +00:00
Evan Cheng 164a221b65 __i386__, __i386, etc. are not defined for x86-64. Use __x86_64__.
llvm-svn: 28881
2006-06-20 22:11:12 +00:00
Chris Lattner d6e160d14d 64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis.
llvm-svn: 28880
2006-06-20 21:39:30 +00:00
Chris Lattner 2d4e8f7e86 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

llvm-svn: 28879
2006-06-20 21:23:06 +00:00
Jim Laskey 4810c26d04 add subroutine types
llvm-svn: 28878
2006-06-20 21:13:20 +00:00
Chris Lattner 9fa620ed77 remove quotes for better consistency
llvm-svn: 28877
2006-06-20 20:56:03 +00:00
Chris Lattner 4c65c0e7d2 more significant moving of stuff around.
llvm-svn: 28876
2006-06-20 20:54:47 +00:00
Chris Lattner bb1e75c52d Fix broken links, remove author information, add brief summary.
llvm-svn: 28875
2006-06-20 20:47:38 +00:00
Jim Laskey 0a9e837b6f Add support for function types.
llvm-svn: 28874
2006-06-20 19:41:06 +00:00
Evan Cheng 9e7e4b5d85 Allow LLVM to be built with extra options.
llvm-svn: 28873
2006-06-20 18:50:48 +00:00
Evan Cheng 28d96e0bb8 Rename EXTRA_FLAGS to EXTRA_OPTIONS.
llvm-svn: 28872
2006-06-20 18:49:13 +00:00
John Criswell ac8b8c57ae Added LLVM publications describing the LLVM compiler infrastructure.
llvm-svn: 28871
2006-06-20 18:21:31 +00:00