1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

39 Commits

Author SHA1 Message Date
Reid Spencer
327ae8b712 Use APInt conversion to string so the result is correct regardless of the
bit width of the ConstantInt being converted.

llvm-svn: 34810
2007-03-01 21:00:32 +00:00
Chris Lattner
ce2cc6e404 Eliminate use of ctors that take vectors.
llvm-svn: 34219
2007-02-13 02:10:56 +00:00
Chris Lattner
b73ffa20af stop using methods that take vectors.
llvm-svn: 34205
2007-02-12 22:56:41 +00:00
Chris Lattner
fc50a34437 simplify name juggling through the use of Value::takeName.
llvm-svn: 34175
2007-02-11 01:08:35 +00:00
Reid Spencer
8749d297f5 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.

llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Devang Patel
bf44036fbf Inherit CallGraphSCCPass directly from Pass.
llvm-svn: 33514
2007-01-26 00:47:38 +00:00
Reid Spencer
0fb7fa82d4 For PR950:
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int   -> Int32
4. [U]Long  -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
   and other methods related to signedness. In a few places this warranted
   identifying the signedness information from other sources.

llvm-svn: 32785
2006-12-31 05:48:39 +00:00
Chris Lattner
44723daefa Eliminate static ctors due to Statistic objects
llvm-svn: 32693
2006-12-19 22:09:18 +00:00
Chris Lattner
a531ce882e Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Bill Wendling
5c13d56f78 Replace #include <iostream> with llvm_* streams.
llvm-svn: 31924
2006-11-26 10:02:32 +00:00
Reid Spencer
4bafa71dc1 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.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Reid Spencer
d414793dbc 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.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Evan Cheng
816069dcbc Revert previous patch. Still breaking things.
llvm-svn: 30698
2006-10-03 07:26:07 +00:00
Owen Anderson
18284b15a8 Another attempt at making ArgPromotion smarter. This patch no longer breaks Burg.
llvm-svn: 30657
2006-09-28 23:02:22 +00:00
Chris Lattner
ce8928eed5 revert previous two patches. They cause miscompilation of MultiSource/Applications/Burg
llvm-svn: 30397
2006-09-15 17:24:45 +00:00
Owen Anderson
d55cc3f6d8 Revert my previous work on ArgumentPromotion. Further investigation has revealed these
changes to be incorrect.  They just weren't showing up in any of our current testcases.

llvm-svn: 30385
2006-09-15 05:22:51 +00:00
Owen Anderson
0ea394ab0a Make ArgumentPromotion handle recursive functions that pass pointers in their recursive calls.
llvm-svn: 30057
2006-09-02 21:19:44 +00:00
Chris Lattner
a39dcb5377 eliminate RegisterOpt. It does the same thing as RegisterPass.
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
2588f0eb8f Make iostream #inclusion explicit
llvm-svn: 25514
2006-01-22 23:32:06 +00:00
Chris Lattner
2d9c054f4e Preserve calling conventions when doing IPO
llvm-svn: 21798
2005-05-09 01:05:50 +00:00
Chris Lattner
3d4098b1e0 preserve the tail marker
llvm-svn: 21734
2005-05-06 06:46:58 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
4b688a1c70 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
2e24bcf264 Fix VS warnings.
llvm-svn: 19382
2005-01-08 19:45:31 +00:00
Chris Lattner
9b2f0f93e3 Remove debugging code
llvm-svn: 17719
2004-11-13 23:32:53 +00:00
Chris Lattner
9749bf21f8 Argument promotion transforms functions to unconditionally load their
argument pointers.  This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid.  Make sure to do the required checks.

This fixed ArgumentPromotion/control-flow.ll and the Burg program.

llvm-svn: 17718
2004-11-13 23:31:34 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
188b4e4983 Add comment
llvm-svn: 16400
2004-09-19 01:05:16 +00:00
Chris Lattner
223e9d38b5 Convert this pass to be a CallGraphSCCPass instead of a Pass, which eliminates
the worklist and makes it more efficient.  This does not change functionality
at all.

llvm-svn: 16390
2004-09-18 00:34:13 +00:00
Chris Lattner
228e66d208 Fix typo in comment
llvm-svn: 16384
2004-09-17 03:58:39 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
55d436cc07 bug 122:
- Excise dead CPR procesing.

llvm-svn: 14944
2004-07-18 00:23:51 +00:00
Chris Lattner
8723083f3b Make order of argument addition deterministic. In particular, the layout
of ConstantInt objects in memory used to determine which order arguments
were added in in some cases.

llvm-svn: 14276
2004-06-21 00:07:58 +00:00
Chris Lattner
fee8ce6131 Fairly substantial changes to update the alias analysis we are querying as
we make the transformation.  This allows us to use interprocedural alias
analyses successfully.

llvm-svn: 13691
2004-05-23 21:21:17 +00:00
Chris Lattner
933f605592 Implement ArgumentPromotion/aggregate-promote.ll
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
2004-03-08 01:04:36 +00:00
Chris Lattner
ebebe8f4a0 Implement: ArgumentPromotion/chained.ll
llvm-svn: 12200
2004-03-07 22:52:53 +00:00
Chris Lattner
8494ba277f Fix another minor bug, exposed by perlbmk
llvm-svn: 12198
2004-03-07 22:43:27 +00:00
Chris Lattner
45cf084497 Fix a minor bug and turn debug output into, well, debug output.
llvm-svn: 12195
2004-03-07 21:54:50 +00:00
Chris Lattner
4415950211 New LLVM pass: argument promotion. This version only handles simple scalar
variables.

llvm-svn: 12193
2004-03-07 21:29:54 +00:00