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

705 Commits

Author SHA1 Message Date
Chris Lattner
3cceed4230 fix a memory leak
llvm-svn: 36396
2007-04-24 17:20:52 +00:00
Christopher Lamb
041ee2a78d PR400 phase 1 implementation feedback.
llvm-svn: 36354
2007-04-22 22:22:02 +00:00
Christopher Lamb
5606cd66e2 PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
llvm-svn: 36349
2007-04-22 19:24:39 +00:00
Reid Spencer
4721577334 For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Reid Spencer
81070d52da Revert Christopher Lamb's load/store alignment changes.
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Christopher Lamb
b56b6a7ad7 add support for alignment attributes on load/store instructions
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Reid Spencer
67ab398ba3 Make long line fit in 80 cols.
llvm-svn: 36183
2007-04-16 23:32:28 +00:00
Lauro Ramos Venancio
a76c2806de Implement the "thread_local" keyword.
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Chris Lattner
d186d37694 Fix a bug where calling materializeModule could corrupt the module, reading
multiple copies of the function into the Function*.

llvm-svn: 35831
2007-04-09 20:28:40 +00:00
Reid Spencer
b43eb600c2 For PR1146:
Use ParamAttrsList for writing parameter attributes. Since they are sparse
now, we also write them sparsely (saves a few bytes). Unfortunately, this
is a bytecode file format change.

llvm-svn: 35811
2007-04-09 06:14:31 +00:00
Chris Lattner
b3c4c64197 Fix a bug that caused alignment information to occasionally get stripped off
of an allocation instruction when writing to bytecode.

llvm-svn: 35796
2007-04-09 03:37:36 +00:00
Reid Spencer
aedaf87e5e No functional change, this is just easier to read and debug.
llvm-svn: 35782
2007-04-08 23:58:41 +00:00
Reid Spencer
fb17dbb809 Avoid a useless temporary constrution.
llvm-svn: 35747
2007-04-07 19:51:45 +00:00
Reid Spencer
845c291c87 Fix another PathWithStatus issue.
llvm-svn: 35744
2007-04-07 19:45:30 +00:00
Reid Spencer
6df393cf38 For PR1302:
Adjust useage of sys::Path::FileType for new enumerator names.

llvm-svn: 35651
2007-04-04 06:31:04 +00:00
Reid Spencer
4269ae1274 For PR789:
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.

llvm-svn: 35476
2007-03-29 19:05:44 +00:00
Chris Lattner
3a52e7b06d the bytecode reader supports dematerializeFunction
llvm-svn: 35475
2007-03-29 18:58:08 +00:00
Reid Spencer
50b83584c4 For PR789:
Updates for change in interface of getFileStatus method of sys::Path class.

llvm-svn: 35458
2007-03-29 16:48:16 +00:00
Reid Spencer
d7c97384ac Use a simpler constructor for ConstantInt.
llvm-svn: 34803
2007-03-01 20:25:31 +00:00
Reid Spencer
f8e59cd357 Implement reading of arbitrary precision integers.
llvm-svn: 34718
2007-02-28 02:25:48 +00:00
Reid Spencer
4beda9543b Implement writing of arbitrary precision integers.
llvm-svn: 34717
2007-02-28 02:25:20 +00:00
Reid Spencer
e7ff3305d6 For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
fc2686da00 From Dan Gohman:
While preparing http://llvm.org/PR1198 I noticed several asserts
protecting unprepared code from i128 types that weren't actually failing
when they should because they were written as assert("foo") instead of
something like assert(0 && "foo"). This patch fixes all the cases that a
quick grep found.

llvm-svn: 34267
2007-02-14 06:20:04 +00:00
Chris Lattner
2f015c1ccf Use a SmallVector to reduce heap traffic. This speeds up bcreader 10%
llvm-svn: 34231
2007-02-13 07:28:20 +00:00
Chris Lattner
d7f09146b8 now that we can pass ranges into CallInst ctors, eliminate vector heap traffic
llvm-svn: 34229
2007-02-13 06:30:42 +00:00
Chris Lattner
f2d767bbd7 stop passing vector into ctors
llvm-svn: 34218
2007-02-13 01:53:54 +00:00
Chris Lattner
70af9b98ec avoid creating a temporary string when reading the symbol table for a
module.  This speeds up the bcreader 11%.

llvm-svn: 34198
2007-02-12 18:53:43 +00:00
Chris Lattner
5a58a65c10 Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
as its main datastructure.  There are many improvements yet to be made, but
this speeds up opt --std-compile-opts on 447.dealII by 7.3%.

llvm-svn: 34193
2007-02-12 05:18:08 +00:00
Reid Spencer
52b0535551 Undo the last patch. It slowed down bcwriter by 1.8% but only sped up
the bc reader by 0.8%. Deemed "not worth it"

llvm-svn: 34169
2007-02-11 00:03:39 +00:00
Reid Spencer
66bb33845e Compaction tables don't exist any more.
llvm-svn: 34148
2007-02-10 14:07:56 +00:00
Reid Spencer
d5427f5249 For PR1194:
The bcreader counts on "primitive" types being inserted before they are
referenced in other types. With recent changes to the bcwriter, this fact
became exposed since IntegerType is no longer "primitive". We can no longer
count on all IntegerTypes being inserted early. This patch modifies
getOrCreateTypeSlot to insert any sub-type that can't possibly recurse
before we create the slot for the type. This has the benefit of reducing
the number of OpaqueType objects the reader needs to deal with.

llvm-svn: 34147
2007-02-10 14:04:08 +00:00
Reid Spencer
42791fc876 Fix a comment.
llvm-svn: 34146
2007-02-10 11:59:10 +00:00
Chris Lattner
02141c9762 Change the table datastructure to be a vector<smallvector>, instead of
vector<vector> to avoid allocations.  This speeds up bcwriting of 447.dealII
from 0.8276 to 0.7637s (8.4%).

This concludes this round of proding the bcwriter into submission.  Final
speedup from 24.4s to 0.7637s (32x).

llvm-svn: 34142
2007-02-10 07:42:59 +00:00
Chris Lattner
6301eb8919 Make BytecodeWriter::outputValueSymbolTable *significantly* less abusive
of memory, through a combination of DenseMap and SmallVector.  This speeds
up bcwriter on 447.dealII from 1.31s to 0.82s (60% faster).

llvm-svn: 34141
2007-02-10 07:31:44 +00:00
Chris Lattner
c2542fe089 make the datastructure used in BytecodeWriter::outputValueSymbolTable
*slightly* less abusive of memory.  This speeds up the bcwriter from
1.83s to 1.32s (39% faster) on 447.dealII.

llvm-svn: 34140
2007-02-10 07:11:51 +00:00
Chris Lattner
5397f397fe Switch typemap over to DenseMap. No significant speedup.
llvm-svn: 34139
2007-02-10 07:06:46 +00:00
Chris Lattner
1b93c3207e Switch NodeMap from an std::map to a DenseMap. This speeds up bcwriting
of 447.dealII from 3.3s to 1.8s (80% faster).

llvm-svn: 34138
2007-02-10 07:01:05 +00:00
Chris Lattner
279770b88d use typedefs where appropriate
llvm-svn: 34136
2007-02-10 06:42:23 +00:00
Chris Lattner
98373d22fb The ModuleLevel vector is often quite sparse. Switch it to a DenseMap. This
speeds up bcwriting of 447.dealII by 40%, from 4.63s to 3.32s.

llvm-svn: 34135
2007-02-10 06:38:19 +00:00
Chris Lattner
dc8f129004 Make the ModuleLevel datastructure more sane. When a function-local value
is inserted into the table, it remembers that the value needs to be popped
off.  This makes purgeFunction much faster, speeding up bcwriting of 447.dealII
from 6.8->4.6s (47%).

llvm-svn: 34133
2007-02-10 06:09:41 +00:00
Chris Lattner
d043d112d0 Only compute the module levels info once per module, instead of once
per function.  This speeds up bcwriting on 447.dealII from 10.16s to 6.81s
(49%).

llvm-svn: 34132
2007-02-10 05:54:33 +00:00
Chris Lattner
b005a435cd Clone and specialize CreateSlotIfNeeded into CreateFunctionValueSlot to handle
function-local values.  This speeds up bcwriting a small 2.2% (10.384->10.156s
on 447.dealII), but paves the way for more important changes.

llvm-svn: 34131
2007-02-10 05:45:09 +00:00
Chris Lattner
31d8a25842 make getSlot/getTypeSlot inline
llvm-svn: 34130
2007-02-10 05:18:35 +00:00
Chris Lattner
cbbfa88ced getTypeSlot can never fail
llvm-svn: 34129
2007-02-10 05:17:48 +00:00
Chris Lattner
78926ecd8e getSlot can never fail. Make it assert internally, eliminate checks in
clients.  Same for getTypeSlot.

llvm-svn: 34128
2007-02-10 05:13:03 +00:00
Chris Lattner
83352c4de3 simplify getOrCreateTypeSlot, eliminat doInsertType. Eliminate post-order iteration stuff.
llvm-svn: 34127
2007-02-10 05:02:50 +00:00
Chris Lattner
e6d3af76f8 simplify and speed up recursive type processing.
llvm-svn: 34126
2007-02-10 04:57:36 +00:00
Chris Lattner
b4d5d53916 rename getOrCreateSlot -> CreateSlotIfNeeded. Noone cares about the retval
llvm-svn: 34125
2007-02-10 04:54:01 +00:00
Chris Lattner
2965283d9f refactor callers of insertType. inline insertType into its one remaining caller.
llvm-svn: 34124
2007-02-10 04:51:21 +00:00