- Aug 31, 2009
-
-
Chris Lattner authored
argpromotion and structretpromote. Basically, when replacing a function, they used the 'changeFunction' api which changes the entry in the function map (and steals/reuses the callgraph node). This has some interesting effects: first, the problem is that it doesn't update the "callee" edges in any callees of the function in the call graph. Second, this covers for a major problem in all the CGSCC pass stuff, which is that it is completely broken when functions are deleted if they *don't* reuse a CGN. (there is a cute little fixme about this though :). This patch changes the protocol that CGSCC passes must obey: now the CGSCC pass manager copies the SCC and preincrements its iterator to avoid passes invalidating it. This allows CGSCC passes to mutate the current SCC. However multiple passes may be run on that SCC, so if passes do this, they are now required to *update* the SCC to be current when they return. Other less interesting parts of this patch are that it makes passes update the CG more directly, eliminates changeFunction, and requires clients of replaceCallSite to specify the new callee CGN if they are changing it. llvm-svn: 80527
-
- Aug 28, 2009
-
-
Chris Lattner authored
llvm-svn: 80334
-
- Aug 27, 2009
-
-
Chris Lattner authored
calls into a function and if the calls bring in arrays, try to merge them together to reduce stack size. For example, in the testcase we'd previously end up with 4 allocas, now we end up with 2 allocas. As described in the comments, this is not really the ideal solution to this problem, but it is surprisingly effective. For example, on 176.gcc, we end up eliminating 67 arrays at "gccas" time and another 24 at "llvm-ld" time. One piece of concern that I didn't look into: at -O0 -g with forced inlining this will almost certainly result in worse debug info. I think this is acceptable though given that this is a case of "debugging optimized code", and we don't want debug info to prevent the optimizer from doing things anyway. llvm-svn: 80215
-
Chris Lattner authored
llvm-svn: 80204
-
Chris Lattner authored
and other code cleanups. No functionality change. llvm-svn: 80199
-
- Aug 25, 2009
-
-
Dale Johannesen authored
the command line. This gives llvm-gcc developers a way to control inlining (documented as "not intended for end users"). llvm-svn: 79966
-
- Jul 31, 2009
-
-
Bill Wendling authored
- One formatting change. No intended functionality change. llvm-svn: 77717
-
- Jul 25, 2009
-
-
Daniel Dunbar authored
- Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
-
- Jul 24, 2009
-
-
Dan Gohman authored
instead of getAnalysis<TargetData>(). llvm-svn: 76982
-
- Jul 18, 2009
-
-
Eli Friedman authored
llvm-svn: 76284
-
- May 23, 2009
-
-
Torok Edwin authored
and it wasn't generating calls through @PLT for these functions. hasLocalLinkage() is now false for available_externally, I attempted to fix the inliner and dce to handle available_externally properly. It passed make check. llvm-svn: 72328
-
- Mar 24, 2009
-
-
Dale Johannesen authored
llvm-svn: 67578
-
- Mar 19, 2009
-
-
Dale Johannesen authored
the inliner; prevents nondeterministic behavior when the same address is reallocated. Don't build call graph nodes for debug intrinsic calls; they're useless, and there were typically a lot of them. llvm-svn: 67311
-
- Jan 15, 2009
-
-
Rafael Espindola authored
llvm-svn: 62279
-
- Jan 12, 2009
-
-
Dale Johannesen authored
back to 200; 400 seems to be too high, loses more than it gains. llvm-svn: 62107
-
Dale Johannesen authored
compensation for turning off gcc's inliner. This gets us closer to the amount of inlining we were getting before. It is not a win on everything, of course, but seems to gain overall. llvm-svn: 62058
-
- Jan 09, 2009
-
-
Dale Johannesen authored
llvm-svn: 61969
-
- Nov 21, 2008
-
-
Bill Wendling authored
llvm-svn: 59758
-
Bill Wendling authored
inlining function, then increase the stack protection level on the inlining function. llvm-svn: 59757
-
- Nov 05, 2008
-
-
Devang Patel authored
llvm-svn: 58744
-
- Oct 30, 2008
-
-
Daniel Dunbar authored
function. - This explicitly models the costs for functions which should "always" or "never" be inlined. This fixes bugs where such costs were not previously respected. llvm-svn: 58450
-
- Oct 29, 2008
-
-
Daniel Dunbar authored
- No functionality change. llvm-svn: 58355
-
- Sep 27, 2008
-
-
Devang Patel authored
llvm-svn: 56716
-
- Sep 25, 2008
-
-
Devang Patel authored
s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
-
- Sep 24, 2008
-
-
Devang Patel authored
llvm-svn: 56527
-
Devang Patel authored
Do not check isDeclaration() in hasNote(). It is clients' responsibility. llvm-svn: 56524
-
Devang Patel authored
Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
-
- Sep 23, 2008
-
-
Devang Patel authored
llvm-svn: 56477
-
- Sep 05, 2008
-
-
Duncan Sands authored
edges one by one by hand. llvm-svn: 55836
-
- Sep 04, 2008
-
-
Dan Gohman authored
llvm-svn: 55779
-
Devang Patel authored
llvm-svn: 55745
-
- Sep 03, 2008
-
-
Devang Patel authored
llvm-svn: 55712
-
Devang Patel authored
llvm-svn: 55708
-
Devang Patel authored
llvm-svn: 55676
-
Devang Patel authored
llvm-svn: 55673
-
- May 13, 2008
-
-
Dan Gohman authored
several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
-
- May 06, 2008
-
-
Dan Gohman authored
llvm-svn: 50696
-
- Apr 02, 2008
-
-
Evan Cheng authored
2. Do not use # of basic blocks as part of the cost computation since it doesn't really figure into function size. 3. More aggressively inline function with vector code. llvm-svn: 49061
-
- Mar 24, 2008
-
-
Evan Cheng authored
Increasing the inline limit from (overly conservative) 200 to 300. Given each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it). Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining. llvm-svn: 48725
-
- Mar 01, 2008
-
-
Chris Lattner authored
itself sometimes negative. llvm-svn: 47786
-