- Oct 18, 2004
-
-
Chris Lattner authored
llvm-svn: 17110
-
Chris Lattner authored
occurs in the entry node of a function llvm-svn: 17109
-
Chris Lattner authored
particular, invoke ret values are only live in the normal dest of the invoke not in the unwind dest. llvm-svn: 17108
-
Chris Lattner authored
exercise that I'm not interested in tackling right now. Just punt and treat them like unwind's. This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll llvm-svn: 17106
-
Chris Lattner authored
If a function had no return instruction in it, and the result of the inlined call instruction was used, we would crash. llvm-svn: 17104
-
- Oct 17, 2004
-
-
Chris Lattner authored
other blocks. llvm-svn: 17099
-
Chris Lattner authored
unneccesary. This allows us to delete several hundred phi nodes of the form PHI(x,x,x,undef) from 253.perlbmk and probably other programs as well. This implements Mem2Reg/UndefValuesMerge.ll llvm-svn: 17098
-
Chris Lattner authored
to think that PHI[4, undef] == 4. llvm-svn: 17096
-
Chris Lattner authored
so prepare for this. llvm-svn: 17095
-
Chris Lattner authored
llvm-svn: 17069
-
- Oct 16, 2004
-
-
Chris Lattner authored
llvm-svn: 17067
-
Chris Lattner authored
ugly and giant constnat exprs in some programs. llvm-svn: 17066
-
Chris Lattner authored
llvm-svn: 17056
-
Chris Lattner authored
llvm-svn: 17047
-
Chris Lattner authored
llvm-svn: 17046
-
Chris Lattner authored
llvm-svn: 17045
-
Chris Lattner authored
ignore unreachable instructions llvm-svn: 17044
-
Chris Lattner authored
llvm-svn: 17043
-
Chris Lattner authored
that are initialized with undef. When promoting malloc to a global, start out initialized to undef llvm-svn: 17042
-
- Oct 14, 2004
-
-
Chris Lattner authored
weak functions. Thanks for finding this John! llvm-svn: 16997
-
Chris Lattner authored
nodes unless we KNOW that we are able to promote all of them. This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll llvm-svn: 16973
-
- Oct 13, 2004
-
-
Reid Spencer authored
llvm-svn: 16950
-
- Oct 12, 2004
-
-
Chris Lattner authored
llvm-svn: 16932
-
Chris Lattner authored
marker from one ilist into the middle of another basic block! llvm-svn: 16925
-
Chris Lattner authored
pointer recurrences into expressions from this: %P_addr.0.i.0 = phi sbyte* [ getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), %entry ], [ %inc.0.i, %no_exit.i ] %inc.0.i = getelementptr sbyte* %P_addr.0.i.0, int 1 ; <sbyte*> [#uses=2] into this: %inc.0.i = getelementptr sbyte* getelementptr ([8 x sbyte]* %.str_1, int 0, int 0), int %inc.0.i.rec Actually create something nice, like this: %inc.0.i = getelementptr [8 x sbyte]* %.str_1, int 0, int %inc.0.i.rec llvm-svn: 16924
-
- Oct 11, 2004
-
-
Chris Lattner authored
llvm-svn: 16918
-
Chris Lattner authored
First, it allows SRA of globals that have embedded arrays, implementing GlobalOpt/globalsra-partial.llx. This comes up infrequently, but does allow, for example, deleting several stores to dead parts of globals in dhrystone. Second, this implements GlobalOpt/malloc-promote-*.llx, which is the following nifty transformation: Basically if a global pointer is initialized with malloc, and we can tell that the program won't notice, we transform this: struct foo *FooPtr; ... FooPtr = malloc(sizeof(struct foo)); ... FooPtr->A FooPtr->B Into: struct foo FooPtrBody; ... FooPtrBody.A FooPtrBody.B This comes up occasionally, for example, the 'disp' global in 183.equake (where the xform speeds the CBE version of the program up from 56.16s to 52.40s (7%) on apoc), and the 'desired_accept', 'fixLRBT', 'macroArray', & 'key_queue' globals in 300.twolf (speeding it up from 22.29s to 21.55s (3.4%)). The nice thing about this xform is that it exposes the resulting global to global variable optimization and makes alias analysis easier in addition to eliminating a few loads. llvm-svn: 16916
-
Chris Lattner authored
still optimize away all of the indirect calls and loads, etc from it. This turns code like this: if (G != 0) G(); into if (G != 0) ActualCallee(); This triggers a couple of times in gcc and libstdc++. llvm-svn: 16901
-
Reid Spencer authored
llvm-svn: 16893
-
- Oct 10, 2004
-
-
Chris Lattner authored
llvm-svn: 16878
-
Chris Lattner authored
stored to, but are stored at variable indexes. This occurs at least in 176.gcc, but probably others, and we should handle it for completeness. llvm-svn: 16876
-
Chris Lattner authored
has a large number of users. Instead, just keep track of whether we're making changes as we do so. This patch has no functionlity changes. llvm-svn: 16874
-
- Oct 09, 2004
-
-
Chris Lattner authored
we know that all uses of the global will trap if the pointer contained is null. In this case, we forward substitute the stored value to any uses. This has the effect of devirtualizing trivial globals in trivial cases. For example, 164.gzip contains this: gzip.h:extern int (*read_buf) OF((char *buf, unsigned size)); bits.c: read_buf = file_read; deflate.c: lookahead = read_buf((char*)window, deflate.c: n = read_buf((char*)window+strstart+lookahead, more); Since read_buf has to point to file_read at every use, we just replace the calls through read_buf with a direct call to file_read. This occurs in several benchmarks, including 176.gcc and 164.gzip. Direct calls are good and stuff. llvm-svn: 16871
-
Chris Lattner authored
-debug-only! llvm-svn: 16868
-
Chris Lattner authored
llvm-svn: 16864
-
Chris Lattner authored
llvm-svn: 16863
-
Chris Lattner authored
llvm-svn: 16858
-
- Oct 08, 2004
-
-
Chris Lattner authored
* Do not lead dangling dead constants prevent optimization * Iterate global optimization while we're making progress. These changes allow us to be more aggressive, handling cases like GlobalOpt/iterate.llx without a problem (turning it into 'ret int 0'). llvm-svn: 16857
-
Chris Lattner authored
we know it is dead. llvm-svn: 16855
-
Chris Lattner authored
254.gap. llvm-svn: 16853
-