1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

653 Commits

Author SHA1 Message Date
Chris Lattner
7301538f7e Remove dead ctor
llvm-svn: 34121
2007-02-10 04:38:34 +00:00
Chris Lattner
01a1b6aff1 ModuleContainsAllFunctionConstants is always true
llvm-svn: 34120
2007-02-10 04:36:10 +00:00
Chris Lattner
beafca02d1 only one client of getOrCreateSlot can pass a void typed value. Check type
there.

llvm-svn: 34119
2007-02-10 04:31:52 +00:00
Chris Lattner
2e462f53e4 inline hasNullValue, rename some variables, simplify some code.
llvm-svn: 34118
2007-02-10 04:29:03 +00:00
Chris Lattner
49365fa142 merge insertValue into its single caller, eliminate some redundant checks.
llvm-svn: 34117
2007-02-10 04:25:02 +00:00
Chris Lattner
fc3dd4e7a6 merge doInsertValue into insertValue
llvm-svn: 34116
2007-02-10 04:22:30 +00:00
Chris Lattner
ce0ce46355 insertvalue's second operand is always false
llvm-svn: 34115
2007-02-10 04:19:31 +00:00
Chris Lattner
639d8b9636 remove dead 'dontIgnore' flag for insertType
llvm-svn: 34114
2007-02-10 04:17:41 +00:00
Chris Lattner
7141ac8812 rename getSlot -> getSlotType and getOrCreateSlot ->getOrCreateTypeSlot
for types.

llvm-svn: 34113
2007-02-10 04:15:40 +00:00
Reid Spencer
b1e839a4d3 Use int32_t and uint32_t to hopefully help weak compilers (cygwin) not
generate errors about being unable to resolve overloaded type.

llvm-svn: 34103
2007-02-09 18:03:35 +00:00
Reid Spencer
6d293c2160 Make SlotCalculator::getPlane an inline function. It is used inside loops.
llvm-svn: 34091
2007-02-09 15:25:50 +00:00
Chris Lattner
672e5475d1 remove unneeded #includes
llvm-svn: 34086
2007-02-09 07:54:13 +00:00
Chris Lattner
096b7f662b remove dead code, the outputConstants function is now only called at module scope.
llvm-svn: 34085
2007-02-09 07:53:20 +00:00
Chris Lattner
5796c232a4 1. constants can never occur in the symbol table.
2. All function-level constants are now incorporated into the module-level
  constant pool, since the compaction table was removed.  Eliminate extra
  work to check for them.

This speeds up the bcwriter from 24.4s to 13.1s on 447.dealII and .73 -> .56s
on kc++ in a release build.

llvm-svn: 34084
2007-02-09 07:51:47 +00:00
Chris Lattner
3cac8eac4e move archive-specific stuff out of bcreader into archive library.
llvm-svn: 34022
2007-02-07 23:53:17 +00:00
Chris Lattner
1c17d65878 move an llvmc-specific function out of the bcreader into llvmc.
llvm-svn: 34021
2007-02-07 23:48:32 +00:00
Chris Lattner
c5f3b3b01b move AnalyzeBytecodeFile out of ReaderWrappers.cpp into Analyzer.cpp. Now
lli doesn't link in Analyzer.cpp.

llvm-svn: 34020
2007-02-07 23:46:55 +00:00
Chris Lattner
43d0b955a3 push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:

ModuleProvider *getBytecodeModuleProvider(
  const std::string &Filename,  ///< Name of file to be read
  BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
  std::string* ErrMsg = 0,      ///< Optional error message holder
  BytecodeHandler* H = 0        ///< Optional handler for reader events
);

This is ugly, but allows a client to say:

  getBytecodeModuleProvider("foo", 0);

If they do this, there is no dependency on the compression libraries, saving
codesize.

llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Chris Lattner
ad6f4d102f Move compressor out of the core Reader.cpp file.
llvm-svn: 34007
2007-02-07 19:49:01 +00:00
Chris Lattner
c363dcf19e remove dead ivars, thanks to Reid for noticing this!
llvm-svn: 33995
2007-02-07 07:19:19 +00:00
Chris Lattner
36c2f9ea6d remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
llvm-svn: 33994
2007-02-07 06:53:02 +00:00
Chris Lattner
e4fd0b7514 parse constantexpr arguments into a smallvector: 1.5% speedup reading 176.gcc
llvm-svn: 33980
2007-02-07 05:15:28 +00:00
Chris Lattner
cc1fbc16fa Eliminate std::vectors from the bcanalyzer interface.
llvm-svn: 33978
2007-02-07 05:08:39 +00:00
Reid Spencer
6af21b3029 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer
591bfa1e0b Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Chris Lattner
539d9c81fd eliminate a temporary vector while parsing gep's from bc files.
llvm-svn: 33710
2007-01-31 19:56:15 +00:00
Chris Lattner
b0a0d4f999 eliminate a temporary vector
llvm-svn: 33695
2007-01-31 04:43:46 +00:00
Reid Spencer
19af04a142 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Reid Spencer
00309bbef6 Bye, Bye Compaction Tables. The benefit compaction tables provides doesn't
outweight its computational costs. This patch removes all compaction
table handling from the bcreader and bcwriter. For the record, here's the
difference betweeen having and not having compaction tables for some tests:

Test             With       Without   Size Chg
Olden/mst       5,602         5,598      +0.1%
viterbi        18,026        17,795      +1.3%
obsequi       162,133       166,663      -2.8%
burg          224,090       228,148      -1.8%
kimwitu++   4,933,263     5,121,159      -3.8%
176.gcc     8,470,424     9,141,539      -7.3%

It seems that it is more beneficial to larger files, but even on the largest
test case we have (176.gcc) it only amounts ot an I/O saving of 7.3%.

llvm-svn: 33661
2007-01-30 19:36:46 +00:00
Reid Spencer
5cda62fa8a This file has been dead for a long time. Remove it.
llvm-svn: 33596
2007-01-28 08:04:14 +00:00
Reid Spencer
6770b7e879 For PR761:
Remove the Endianness and PointerSize fields from the ModuleHeader and
replace it with the DataLayout field.

llvm-svn: 33529
2007-01-26 08:10:24 +00:00
Reid Spencer
d331480e5b Back out last changes for dataLayout. Much more work is needed.
llvm-svn: 33347
2007-01-19 00:07:16 +00:00
Reid Spencer
de679f8779 For PR761:
Implement reading and writing of the Module's data layout string.

llvm-svn: 33346
2007-01-18 23:24:24 +00:00
Chris Lattner
c5e1611848 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)

llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Reid Spencer
305bc13c03 Make sure that GEP indices are only 32 or 64 bits. We're not ready for
indices with other bit sizes yet.

llvm-svn: 33167
2007-01-13 00:10:02 +00:00
Reid Spencer
1cc6fb36b2 Get rid of some useless distinction between bool and integer.
llvm-svn: 33166
2007-01-13 00:09:12 +00:00
Chris Lattner
5011520dda remove unneeded special case for bool
llvm-svn: 33156
2007-01-12 23:26:17 +00:00
Chris Lattner
996f22b99b Eliminate a log(n) lookup
llvm-svn: 33155
2007-01-12 23:23:08 +00:00
Anton Korobeynikov
548b9af9c2 * PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)

llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Reid Spencer
373d2bccea For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Reid Spencer
3d986f6487 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.

llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Chris Lattner
5786d6f58e remove support for old-style varargs upgrading
llvm-svn: 32979
2007-01-07 06:45:57 +00:00
Reid Spencer
cdaf88ff9d For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.

llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Reid Spencer
931386421e For PR950:
Update for signless integer types and parameter attribute implementation.
Of significant note:
  1. This changes the bytecode format yet again.
  2. There are 1/2 as many integer type planes (this is a good thing)
  3. GEP indices now use only 1 bit to identify their type which means
     more GEP instructions won't be relegated to format 0 (size win)
  4. Parameter attributes are implemented but currently being stored
     verbosely for each function type. Some other day this needs to be
     optimized for size.

llvm-svn: 32783
2006-12-31 05:44:24 +00:00
Chris Lattner
dfbfc21795 switch statistics over to not use static ctors.
llvm-svn: 32709
2006-12-19 23:16:47 +00:00
Bill Wendling
5b534cf128 This snuck in. Reverted.
llvm-svn: 32638
2006-12-17 11:11:10 +00:00
Bill Wendling
7f6a73eb5c Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.

llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Reid Spencer
40691d741a Remove an extraneous { at the end of a block.
llvm-svn: 32613
2006-12-15 21:46:37 +00:00