- Mar 16, 2004
-
-
Chris Lattner authored
llvm-svn: 12441
-
Chris Lattner authored
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040308/013095.html Basically, this patch only updated the immediate dominatees of the header node to tell them that the preheader also dominated them. In practice, ALL dominatees of the header node are also dominated by the preheader. This fixes: LoopSimplify/2004-03-15-IncorrectDomUpdate. and PR293 llvm-svn: 12434
-
- Mar 15, 2004
-
-
Chris Lattner authored
horrible hack. llvm-svn: 12423
-
Chris Lattner authored
llvm-svn: 12420
-
Chris Lattner authored
sin/cos/strlen calls and stuff. This implements: LICM/call_sink_pure_function.ll LICM/call_sink_const_function.ll llvm-svn: 12415
-
Chris Lattner authored
llvm-svn: 12406
-
Chris Lattner authored
Simplify the input/output finder. All elements of a basic block are instructions. Any used arguments are also inputs. An instruction can only be used by another instruction. llvm-svn: 12405
-
Chris Lattner authored
extracted, and a function that contained a single top-level loop never had the loop extracted, regardless of how much non-loop code there was. llvm-svn: 12403
-
Chris Lattner authored
* Don't insert a branch to the switch instruction after the call, just make it a single block. * Insert the new alloca instructions in the entry block of the original function instead of having them execute dynamically * Don't make the default edge of the switch instruction go back to the switch. The loop extractor shouldn't create new loops! * Give meaningful names to the alloca slots and the reload instructions * Some minor code simplifications llvm-svn: 12402
-
Chris Lattner authored
This also implements a two minor improvements: * Don't insert live-out stores IN the region, insert them on the code path that exits the region * If the region is exited to the same block from multiple paths, share the switch statement entry, live-out store code, and the basic block. llvm-svn: 12401
-
- Mar 14, 2004
-
-
Chris Lattner authored
a member of the class. While we're at it, turn the collection into a set instead of a vector to improve efficiency and make queries simpler. llvm-svn: 12400
-
Chris Lattner authored
the command line, and the single loop extractor, usable by bugpoint llvm-svn: 12390
-
Chris Lattner authored
llvm-svn: 12385
-
Chris Lattner authored
be non-empty! This fixes LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll llvm-svn: 12384
-
Chris Lattner authored
llvm-svn: 12382
-
Chris Lattner authored
Require 'simplified' loops, not just raw natural loops. This fixes CodeExtractor/2004-03-13-LoopExtractorCrash.ll llvm-svn: 12381
-
Chris Lattner authored
loop information won't see it, and we could have unreachable blocks pointing to the non-header node of blocks in a natural loop. This isn't tidy, so have the loopsimplify pass clean it up. llvm-svn: 12380
-
Chris Lattner authored
curly braceage llvm-svn: 12378
-
Chris Lattner authored
Make sure that the file interface header (IPO.h) is included first remove dead #incldue llvm-svn: 12375
-
Chris Lattner authored
llvm-svn: 12373
-
Chris Lattner authored
llvm-svn: 12372
-
Chris Lattner authored
llvm-svn: 12368
-
Chris Lattner authored
Fix InstCombine/2004-03-13-InstCombineInfLoop.ll which caused an infinite loop compiling (I think) povray. llvm-svn: 12365
-
Chris Lattner authored
* Be a lot more accurate about what the effects will be when inlining a call to a function when an argument is an alloca. * Dramatically reduce the penalty for inlining a call in a large function. This heuristic made it almost impossible to inline a function into a large function, no matter how small the callee is. llvm-svn: 12363
-
- Mar 13, 2004
-
-
Chris Lattner authored
On the testcase from GCC PR12440, which has a LOT of loops (1392 of which require preheaders to be inserted), this speeds up the loopsimplify pass from 1.931s to 0.1875s. The loop in question goes from 1.65s -> 0.0097s, which isn't bad. All of these times are a debug build. This adds a dependency on DominatorTree analysis that was not there before, but we always had dominatortree available anyway, because LICM requires both loop simplify and DT, so this doesn't add any extra analysis in practice. llvm-svn: 12362
-
Chris Lattner authored
llvm-svn: 12355
-
Chris Lattner authored
llvm-svn: 12353
-
- Mar 12, 2004
-
-
Chris Lattner authored
llvm-svn: 12319
-
Chris Lattner authored
llvm-svn: 12318
-
Chris Lattner authored
llvm-svn: 12317
-
- Mar 08, 2004
-
-
Chris Lattner authored
llvm-svn: 12225
-
Chris Lattner authored
llvm-svn: 12224
-
Chris Lattner authored
llvm-svn: 12221
-
Chris Lattner authored
This allows pointers to aggregate objects, whose elements are only read, to be promoted and passed in by element instead of by reference. This can enable a LOT of subsequent optimizations in the caller function. It's worth pointing out that this stuff happens a LOT of C++ programs, because objects in templates are generally passed around by reference. When these templates are instantiated on small aggregate or scalar types, however, it is more efficient to pass them in by value than by reference. This transformation triggers most on C++ codes (e.g. 334 times on eon), but does happen on C codes as well. For example, on mesa it triggers 72 times, and on gcc it triggers 35 times. this is amazingly good considering that we are using 'basicaa' so far. llvm-svn: 12202
-
- Mar 07, 2004
-
-
Chris Lattner authored
llvm-svn: 12200
-
Chris Lattner authored
llvm-svn: 12198
-
Chris Lattner authored
a zero value is the most likely way to cause further simplification, so we do it. llvm-svn: 12197
-
Chris Lattner authored
llvm-svn: 12195
-
Chris Lattner authored
variables. llvm-svn: 12193
-
- Mar 03, 2004
-
-
Chris Lattner authored
llvm-svn: 12086
-