1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

29788 Commits

Author SHA1 Message Date
Reid Spencer
b8c5bbce4b Allow PackedType to be constructed with an abstract type.
llvm-svn: 34152
2007-02-10 19:03:01 +00:00
Chris Lattner
61a62b514e fix a grammar ambiguity noticed by Duncan
llvm-svn: 34151
2007-02-10 18:35:31 +00:00
Reid Spencer
422c616f9f Align make log output with the rest of llvm.
llvm-svn: 34150
2007-02-10 15:14:00 +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
a7ed569db1 convert some vectors to smallvector.
llvm-svn: 34145
2007-02-10 08:33:11 +00:00
Chris Lattner
8eb2002881 speed up the verifier 8.5% by using a smallvector instead of vector.
llvm-svn: 34144
2007-02-10 08:30:29 +00:00
Chris Lattner
a0792c722e Change an std::set to a SmallPtrSet. This speeds up the verifier on
447.dealII from 1.27s to 0.86s.

llvm-svn: 34143
2007-02-10 08:19:44 +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
f686454486 Make find return the appropriate iterator/const_iterator
llvm-svn: 34137
2007-02-10 06:58:17 +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
025607b8b0 Allow DenseMAp to take an explicit DenseMapKeyInfo
llvm-svn: 34134
2007-02-10 06:34:58 +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
Chris Lattner
fea071b3c8 simplify code.
llvm-svn: 34123
2007-02-10 04:47:51 +00:00
Chris Lattner
8e07ddf937 simplify some logic, reduce nesting
llvm-svn: 34122
2007-02-10 04:42:30 +00:00
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
Evan Cheng
a86214b294 Add function live-ins to entry block live-in set.
llvm-svn: 34112
2007-02-10 02:43:39 +00:00
Evan Cheng
6dc088ffd4 Add live-ins to MachineBasicBlock.
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Evan Cheng
14f837357e Rename some variables to avoid confusion with SelectionDAGISel::BB.
llvm-svn: 34110
2007-02-10 01:08:18 +00:00
Evan Cheng
af3b119b29 These vectors are frequently large. Use std::vector instead.
llvm-svn: 34109
2007-02-09 23:59:14 +00:00
Chris Lattner
27cff151e2 Fix clients like this:
delete ParseBytecodeFile(InputFilename, 0, &ErrorMessage);
  llvm_shutdown();
  delete ParseBytecodeFile(InputFilename, 0, &ErrorMessage);

The primitive type objects failed to ressurect themselves after shutdown, leading
to crashes in clients that used them after llvm_shutdown().

This solution isn't wonderful, because we clearly have static ctors.  However,
the code it replaces was just as bad, so it's not a regression.

llvm-svn: 34106
2007-02-09 22:24:04 +00:00
Evan Cheng
5e8eb0c198 Add reference counting to constantpool entries. Delete the unused ones.
llvm-svn: 34105
2007-02-09 20:54:44 +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
678fd83797 int -> i32, etc.
llvm-svn: 34102
2007-02-09 17:56:02 +00:00
Chris Lattner
31e202922a add a note
llvm-svn: 34101
2007-02-09 17:38:01 +00:00
Reid Spencer
b6fe932923 Get the use of \ right.
llvm-svn: 34100
2007-02-09 17:18:42 +00:00
Reid Spencer
d390bd5266 Fix some bugs in module building that broke llvm-stacker project.
llvm-svn: 34099
2007-02-09 17:09:14 +00:00