Commit Graph

17369 Commits

Author SHA1 Message Date
Chris Lattner
48d3c108b6 more notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34204 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 21:20:26 +00:00
Chris Lattner
08ba1de2d2 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34202 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 20:26:34 +00:00
Zhou Sheng
d93f00c35d 1. Make APInt::shl work correctly and more efficiently.
2. Add functions to support the numberical conversion between APInt and
   double/float.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34201 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 20:02:55 +00:00
Chris Lattner
dd8cec59fc avoid creating a temporary string when reading the symbol table for a
module.  This speeds up the bcreader 11%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 18:53:43 +00:00
Chris Lattner
042ad36871 Add new setName accessor which doesn't require creating a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 18:52:59 +00:00
Chris Lattner
dec628eead 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%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 05:18:08 +00:00
Chris Lattner
8adde28039 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34188 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:40:10 +00:00
Chris Lattner
c02659f675 add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:39:35 +00:00
Chris Lattner
44dcd01cb3 Add support for removing elements out of StringMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34185 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 20:58:00 +00:00
Chris Lattner
b5bb9f5b5c Replace the ugly FindValue method with STL-like find methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34183 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 19:49:41 +00:00
Chris Lattner
ea7acb8591 fix uninitialized variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 19:12:18 +00:00
Chris Lattner
360cac8fef remove support for stringmap visitors now that iterators exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 08:22:15 +00:00
Chris Lattner
a86559ec42 add support for iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34179 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 08:20:35 +00:00
Chris Lattner
86cc423555 simplify code by using Value::takeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34177 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 01:37:51 +00:00
Chris Lattner
6934a04a8c Simplify code by using value::takename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34176 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 01:23:03 +00:00
Chris Lattner
046800a712 simplify name juggling through the use of Value::takeName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34175 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 01:08:35 +00:00
Chris Lattner
f41916e75d add an optimization for the case where the src has no name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34174 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 01:04:09 +00:00
Nick Lewycky
3e051647c0 Fix comments to match names of functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34173 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:58:49 +00:00
Chris Lattner
33f294930e simplify this code by using value::takename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34172 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:39:38 +00:00
Chris Lattner
7216811ea2 add a helper method: Value::takeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:37:27 +00:00
Reid Spencer
b508987e84 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"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34169 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 00:03:39 +00:00
Chris Lattner
a77600e861 Switch some std::vector's to SmallVectors. This speeds up -load-vn -gcse
by 6% on tramp3d.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34167 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 22:15:31 +00:00
Chris Lattner
fd1ad3b730 modify CheckGEPInstructions to take a pointer and size instead of a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34166 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 22:12:53 +00:00
Reid Spencer
cc5dc2e792 Assert that elements of packed are pointer/float/opaque.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 22:02:45 +00:00
Chris Lattner
829621c59e eliminate use of TargetData::getIndexedOffset that takes a vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:35:22 +00:00
Chris Lattner
309f87e34a completely eliminate a temporary vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34162 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:33:15 +00:00
Chris Lattner
7f6b9d2f1a eliminate temporary vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34161 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:31:59 +00:00
Chris Lattner
f6ca09a22b Switch LayoutInfo to be a DenseMap instead of an std::map. This speeds up
-load-vn -gcse by 2.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34160 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:26:17 +00:00
Chris Lattner
a12bd03f07 add a typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:18:06 +00:00
Chris Lattner
9182e3f205 eliminate the std::vector from StructLayout, allocating the elements immediately
after the StructLayout object in memory.  This marginally improves locality,
speeding up -load-vn -gcse by ~0.8%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:15:41 +00:00
Chris Lattner
b0c39a3b4d encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:59:22 +00:00
Chris Lattner
b1919e2f08 Privatize StructLayout::MemberOffsets, adding an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:55:17 +00:00
Chris Lattner
ec6478b8f3 Use ManagedStatic to manage LayoutInfo, instead of rolling our own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34154 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:43:18 +00:00
Chris Lattner
ddce8d21ea Change TargetData::getIndexedOffset interface to not require indices
in a vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:33:15 +00:00
Reid Spencer
e463fc8098 Allow PackedType to be constructed with an abstract type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34152 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:03:01 +00:00
Reid Spencer
91c4af242a Compaction tables don't exist any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 14:07:56 +00:00
Reid Spencer
fe3cccfb8f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34147 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 14:04:08 +00:00
Reid Spencer
c834553b72 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34146 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 11:59:10 +00:00
Chris Lattner
f8edb62e22 convert some vectors to smallvector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34145 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 08:33:11 +00:00
Chris Lattner
8552faeb7e speed up the verifier 8.5% by using a smallvector instead of vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34144 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 08:30:29 +00:00
Chris Lattner
78287b400a Change an std::set to a SmallPtrSet. This speeds up the verifier on
447.dealII from 1.27s to 0.86s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34143 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 08:19:44 +00:00
Chris Lattner
863da4c4f5 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 07:42:59 +00:00
Chris Lattner
ae052aa5a7 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34141 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 07:31:44 +00:00
Chris Lattner
b8cb5fe12c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34140 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 07:11:51 +00:00
Chris Lattner
f98aad66fa Switch typemap over to DenseMap. No significant speedup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34139 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 07:06:46 +00:00
Chris Lattner
362df0d4b7 Switch NodeMap from an std::map to a DenseMap. This speeds up bcwriting
of 447.dealII from 3.3s to 1.8s (80% faster).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34138 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 07:01:05 +00:00
Chris Lattner
dc45f0fb40 use typedefs where appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34136 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 06:42:23 +00:00
Chris Lattner
13dc07c7dc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34135 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 06:38:19 +00:00
Chris Lattner
7cad3cf448 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%).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34133 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 06:09:41 +00:00
Chris Lattner
06f94d5902 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%).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34132 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 05:54:33 +00:00
Chris Lattner
77aae264a0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34131 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 05:45:09 +00:00
Chris Lattner
2b8269f92b make getSlot/getTypeSlot inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34130 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 05:18:35 +00:00
Chris Lattner
972b4dccaf getTypeSlot can never fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34129 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 05:17:48 +00:00
Chris Lattner
a2bdad49c9 getSlot can never fail. Make it assert internally, eliminate checks in
clients.  Same for getTypeSlot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34128 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 05:13:03 +00:00
Chris Lattner
8183cf62f6 simplify getOrCreateTypeSlot, eliminat doInsertType. Eliminate post-order iteration stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34127 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 05:02:50 +00:00
Chris Lattner
25c0293f20 simplify and speed up recursive type processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34126 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:57:36 +00:00
Chris Lattner
94bec4fbf8 rename getOrCreateSlot -> CreateSlotIfNeeded. Noone cares about the retval
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34125 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:54:01 +00:00
Chris Lattner
17d60ce795 refactor callers of insertType. inline insertType into its one remaining caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34124 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:51:21 +00:00
Chris Lattner
25c3fa3152 simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:47:51 +00:00
Chris Lattner
36e1173baa simplify some logic, reduce nesting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34122 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:42:30 +00:00
Chris Lattner
4ef92d8d64 Remove dead ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:38:34 +00:00
Chris Lattner
7f481e5224 ModuleContainsAllFunctionConstants is always true
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34120 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:36:10 +00:00
Chris Lattner
1ef9ca4442 only one client of getOrCreateSlot can pass a void typed value. Check type
there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34119 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:31:52 +00:00
Chris Lattner
44bd331c22 inline hasNullValue, rename some variables, simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34118 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:29:03 +00:00
Chris Lattner
87dddc5262 merge insertValue into its single caller, eliminate some redundant checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34117 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:25:02 +00:00
Chris Lattner
75e2cf555c merge doInsertValue into insertValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34116 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:22:30 +00:00
Chris Lattner
618181ea0e insertvalue's second operand is always false
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34115 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:19:31 +00:00
Chris Lattner
330fce71b2 remove dead 'dontIgnore' flag for insertType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34114 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:17:41 +00:00
Chris Lattner
cb43fdc40c rename getSlot -> getSlotType and getOrCreateSlot ->getOrCreateTypeSlot
for types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 04:15:40 +00:00
Evan Cheng
ad2070c667 Add function live-ins to entry block live-in set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34112 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 02:43:39 +00:00
Evan Cheng
13d8285678 Add live-ins to MachineBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 02:38:19 +00:00
Evan Cheng
15699fc5ed Rename some variables to avoid confusion with SelectionDAGISel::BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 01:08:18 +00:00
Evan Cheng
e03cff6812 These vectors are frequently large. Use std::vector instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34109 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 23:59:14 +00:00
Chris Lattner
d1f711fa6d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34106 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 22:24:04 +00:00
Evan Cheng
c99ef085b9 Add reference counting to constantpool entries. Delete the unused ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 20:54:44 +00:00
Reid Spencer
7d0034194c Use int32_t and uint32_t to hopefully help weak compilers (cygwin) not
generate errors about being unable to resolve overloaded type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34103 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 18:03:35 +00:00
Chris Lattner
8abcfe11b5 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 17:38:01 +00:00
Reid Spencer
394355e4cc Make SlotCalculator::getPlane an inline function. It is used inside loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34091 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 15:25:50 +00:00
Chris Lattner
191d73187a remove unneeded #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34086 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 07:54:13 +00:00
Chris Lattner
8dcd81cc0e remove dead code, the outputConstants function is now only called at module scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34085 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 07:53:20 +00:00
Chris Lattner
ba6de4b1cf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34084 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 07:51:47 +00:00
Zhou Sheng
ff4304f824 Eliminates friend function declaration inside APInt, instead, adds public
methods as those global function's internal implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34083 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 07:48:24 +00:00
Nate Begeman
8c541bcc56 Remove fixed item
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34081 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 04:19:54 +00:00
Evan Cheng
6a9a76508c This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34072 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 23:53:38 +00:00
Evan Cheng
2e67781ef5 Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 22:16:19 +00:00
Evan Cheng
fa1eb27b76 Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 22:13:59 +00:00
Chris Lattner
bb28a81ba3 Rename CStringMap -> StringMap, since it now supports nul characters in the
strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:20:57 +00:00
Chris Lattner
ee182422ff Allow cstringmap to contain strings with nul characters in them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:08:37 +00:00
Andrew Lenharth
ac5a545043 return addresses, those I already have
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34056 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 17:37:41 +00:00
Zhou Sheng
a05eaa658e Switched this file on accidently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34054 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 16:45:48 +00:00
Zhou Sheng
0b706b18bd As Chris and Reid suggested, remove "isSigned" field from APInt, instead,
add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34053 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 14:35:19 +00:00
Bill Wendling
2f5bcb5f38 Fixed comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 06:05:08 +00:00
Evan Cheng
f50d09ad21 Fixed a long standing spiller bug that's exposed by Thumb:
The code sequence before the spiller is something like:
                 = tMOVrr
        %reg1117 = tMOVrr
        %reg1078 = tLSLri %reg1117, 2

The it starts spilling:
        %r0 = tRestore <fi#5>, 0
        %r1 = tRestore <fi#7>, 0
        %r1 = tMOVrr %r1<kill>
        tSpill %r1, <fi#5>, 0
        %reg1078 = tLSLri %reg1117, 2

It restores the value while processing the first tMOVrr. At this point, the
spiller remembers fi#5 is available in %r0. Next it processes the second move.
It restores the source before the move and spills the result afterwards. The
move becomes a noop and is deleted. However, a spill has been inserted and that
should invalidate reuse of %r0 for fi#5 and add reuse of %r1 for fi#5.
Therefore, %reg1117 (which is also assigned fi#5) should get %r1, not %r0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 06:04:54 +00:00
Bill Wendling
eb1ac33850 Moved the MachOWriter and ELFWriter out of the Target/* files. Placed the
definition of it into the CodeGen library. This is so that a backend doesn't
necessarily add in these writers if it doesn't use them (like in the lli
program).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:39:44 +00:00
Bill Wendling
50e4e88d97 Added new method to add a "simple" code emitter. That is, to only add
the code emitter and not set variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:38:33 +00:00
Bill Wendling
04523eab6b Split the addPassesToEmitFile method up into two. This is so that we can
do some common stuff, then on our own add an object file writer (by calling
a concrete function), and then do some finishing stuff, if need be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34032 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:36:53 +00:00
Bill Wendling
8f84f1f301 Add function to create a file writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34031 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:35:27 +00:00
Bill Wendling
449c57a0f9 Dead files. Functionality has been taken over by the Add*Writer functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34029 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:32:51 +00:00
Bill Wendling
4b2ca1a3c4 Moved from include/llvm/CodeGen to lib/CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34027 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:30:50 +00:00
Reid Spencer
23cbb1c78a For PR1188:
Compute BitMask correctly.

Patch by Leo (wenwenti@hotmail.com).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 00:29:31 +00:00