Commit Graph

66 Commits

Author SHA1 Message Date
Duncan Sands
1a2d667d6f Bill pointed out that system headers should be
included after local headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51187 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 09:30:00 +00:00
Duncan Sands
9c0d50ecae Use of UINT_MAX requires climits, at least when
compiling with gcc 4.3.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 11:22:50 +00:00
Dan Gohman
45b3197090 Split the loop unroll mechanism logic out into a utility function.
Patch by Matthijs Kooijman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51083 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-14 00:24:14 +00:00
Dan Gohman
844731a7f1 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 00:00:25 +00:00
Dan Gohman
4a3f6c8882 Make several variable declarations static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 01:53:16 +00:00
Nick Lewycky
280a6e607d Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-25 16:53:59 +00:00
Owen Anderson
6bc41e8a74 Revert r49614. As Dan pointed out, some of these aren't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:38:21 +00:00
Owen Anderson
386ea355e7 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:15:17 +00:00
Devang Patel
ac3844d3f9 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 23:05:52 +00:00
Devang Patel
b176038f98 Update heuritics that estimates cost of call instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48474 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-17 23:41:20 +00:00
Nick Lewycky
529de8a457 Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
and also update the cloning interface's major user, the loop optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09 05:24:34 +00:00
Anton Korobeynikov
ae9f3a3b7c Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:08:44 +00:00
Nick Lewycky
c837abee2f Be more careful modifying the use_list while also iterating through it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27 18:35:00 +00:00
Wojciech Matyjewicz
21a715a124 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45594 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04 20:02:18 +00:00
Chris Lattner
4ee451de36 Remove attribution from file headers, per discussion on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:36:04 +00:00
Owen Anderson
d735ee85db Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. This involves a small interface change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44348 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 03:43:35 +00:00
Devang Patel
5d01aa484f If a value is incoming from outside the loop then the value does not need remapping and the value is never tracked through LastValueMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 19:32:30 +00:00
Chris Lattner
684b22df79 wrap some long lines. Major offenders that are left include
gvn, gvnpre, dse, and predsimplify.  To see these, use:

  make check-line-length



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 16:53:43 +00:00
Dan Gohman
d9efdb2012 Correct a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 14:31:17 +00:00
Dan Gohman
c767844fc9 This patch extends the LoopUnroll pass to be able to unroll loops
with unknown trip counts. This is left off by default, and a
command-line option enables it. It also begins to separate loop
unrolling into a utility routine; eventually it might be made usable
from other passes.

It currently works by inserting conditional branches between each
unrolled iteration, unless it proves that the trip count is a
multiple of a constant integer > 1, which it currently only does in
the rare case that the trip count expression is a Mul operator with
a ConstantInt operand. Eventually this information might be provided
by other sources, for example by a pass that peels/splits the loop
for this purpose.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11 20:53:41 +00:00
Dan Gohman
1cc0096d55 Fix various whitespace inconsistencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36936 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 15:19:19 +00:00
Dan Gohman
f742c2363c Correct the comment for ApproximateLoopSize to reflect what it actually does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 15:14:19 +00:00
Chris Lattner
caccc996e2 Fix Transforms/LoopUnroll/2007-05-05-UnrollMiscomp.ll and PR1385.
If we have a LCSSA, only modify the input value if the inval was defined
by an instruction in the loop.  If defined by something before the loop,
it is still valid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36784 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 18:49:57 +00:00
Chris Lattner
a0c54f3ada make a temporary for *SI, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36782 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 18:36:36 +00:00
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Devang Patel
ac58516cdc Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047888.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 23:03:45 +00:00
Devang Patel
3f1a1e0366 Now LoopUnroll is a LoopPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34996 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 01:38:05 +00:00
Reid Spencer
4e69f48a0a Guard against huge loop trip counts in an APInt safe way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-02 23:31:34 +00:00
Reid Spencer
9133fe2895 Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:32:05 +00:00
Chris Lattner
5e665f5594 Switch inliner over to use DenseMap instead of std::map for ValueMap. This
speeds up the inliner 16%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 00:08:31 +00:00
Chris Lattner
79066fa6ac Adjust #includes to match movement of constant folding code from transformutils to libanalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33680 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 23:46:24 +00:00
Chris Lattner
0e5f499638 Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
converted, we lose a static initializer.  This also allows GCC to emit warnings
about unused statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:40:18 +00:00
Chris Lattner
ac0b6ae358 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 17:46:33 +00:00
Bill Wendling
b742703137 Removed #include <iostream> and replaced with llvm_* streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31923 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-26 09:46:52 +00:00
Reid Spencer
3ed469ccd7 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Owen Anderson
d648e140a5 Clean up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29950 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 06:10:56 +00:00
Owen Anderson
59312b19a6 Make LoopUnroll fold excessive BasicBlocks. This results in a significant speedup of
gccas on 252.eon


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29936 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 02:09:46 +00:00
Chris Lattner
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +00:00
Owen Anderson
203572552d Fix a crash related to updating Phi nodes in the original header block. This was
causing a crash in 175.vpr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29887 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 22:13:55 +00:00
Owen Anderson
3b53c4ee91 Implement unrolling of multiblock loops. This significantly improves the
utility of the LoopUnroll pass.

Also, add a testcase for multiblock-loop unrolling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 21:28:19 +00:00
Chris Lattner
ec3c411de8 Minor comment tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29226 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 19:06:16 +00:00
Owen Anderson
10d9d9f27c Add an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29199 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 05:48:45 +00:00
Owen Anderson
2698a08c23 Make LoopUnroll not die on LCSSA Phis. This makes lencod work again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29198 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 05:45:14 +00:00
Reid Spencer
6296b3cac5 Fix a spello in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 21:24:10 +00:00
Chris Lattner
dac58ad983 Make iostream #inclusion explicit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25514 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 23:32:06 +00:00
Jeff Cohen
9d80930e95 Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 21:38:35 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +00:00