Evan Cheng
b68a774fd9
How the heck did I forget patterns for llvm.x86.sse2.cmp.sd?
...
llvm-svn: 34434
2007-02-20 00:39:09 +00:00
Reid Spencer
b6d01caf22
Simplify some code by moving variable declarations into the only block that
...
uses them.
llvm-svn: 34432
2007-02-19 23:30:10 +00:00
Reid Spencer
421bad0dc5
Implement support for non-standard integer bit widths of any size. The
...
rules alignment is to pick the alignment that corresponds to the smallest
specified alignment that is larger than the bit width of the type or the
largest specified integer alignment if none are larger than the bitwidth
of the type. For the byte size, the size returned is the next larger
multiple of the alignment for that type (using the above rule). This patch
also changes bit widths from "short" to "uint32_t" to ensure there are
enough bits to specify any bit width that LLVM can handle (currently 2^23);
16-bits isn't enough.
llvm-svn: 34431
2007-02-19 22:35:00 +00:00
Evan Cheng
f7ed82da10
Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
...
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Chris Lattner
b5d703018b
llvm-gcc issue fixed, revert reversal :)
...
llvm-svn: 34425
2007-02-19 20:01:23 +00:00
Chris Lattner
86358635e5
remove warning
...
llvm-svn: 34424
2007-02-19 19:46:17 +00:00
Evan Cheng
0a02f82767
Temporarily reverting the patch. It's breaking llvm-gcc build.
...
llvm-svn: 34423
2007-02-19 19:23:41 +00:00
Reid Spencer
887ae70af5
Add a FIXME for unwritten code.
...
llvm-svn: 34422
2007-02-19 19:00:29 +00:00
Chris Lattner
4669b0bf54
remove dead methods
...
llvm-svn: 34419
2007-02-19 07:44:24 +00:00
Chris Lattner
b5f6d0c15a
eliminate use of deprecated apis
...
llvm-svn: 34417
2007-02-19 07:34:47 +00:00
Reid Spencer
da81bf4d3e
For PR1207:
...
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.
llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Reid Spencer
861c1cb67a
1. Fix some indentation and variable names in the get{Min,Max}Value methods.
...
2. Implement toString for power-of-2 radix without using divide and always
printing full words. This allows hex/binary to look at the bit
respresentation of the APInt as well as avoid bugs in divide.
llvm-svn: 34396
2007-02-18 22:29:05 +00:00
Chris Lattner
9f4707eb04
fix comment
...
llvm-svn: 34395
2007-02-18 22:10:58 +00:00
Chris Lattner
a6f54c0e2c
simplify pass, delete dead gvar protos as well.
...
llvm-svn: 34394
2007-02-18 22:10:34 +00:00
Reid Spencer
be4ddf6856
1. Use APINT_WORD_SIZE instead of sizeof(uint64_t)
...
2. Teach slt about signedness.
3. Teach roundToDouble to properly sign extend.
llvm-svn: 34391
2007-02-18 20:09:41 +00:00
Reid Spencer
a856b6e985
1. Remove dead code (lshift function).
...
2. Consolidate memory allocation into just two inline functions.
3. Convert "unsigned" to uint32_t to gaurantee its size.
4. Eliminate magic constants and replace with symbolic equivalent.
5. Improve code documentation slightly.
6. Simplify the logical operator code because bitwidths must be the same.
7. Fix indentation per coding standards.
8. Use exit-early style to reduce indentation in several functions.
llvm-svn: 34389
2007-02-18 18:38:44 +00:00
Reid Spencer
ee0a685ea1
Make add_1 exit early if carry is 0.
...
Fix line breaks and 80 cols violation.
Simplify operator^= since bitwidths must be the same.
llvm-svn: 34388
2007-02-18 06:39:42 +00:00
Reid Spencer
fbd48a566a
Implement signed output for toString.
...
Fix bugs in countLeadingZeros and countTrailingZeros.
llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Chris Lattner
9df8be40fe
temporarily revert Devang's most recent patch, which caused a large
...
compile-time regression in LLC.
llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Reid Spencer
26c6616e4b
Fix some bugs in division logic.
...
llvm-svn: 34384
2007-02-17 22:38:07 +00:00
Evan Cheng
2605082f0e
- Changes how function livein's are handled, they now have a start index of 0.
...
- When coalescing a copy MI, if its destination is "dead", propagate the
property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.
llvm-svn: 34383
2007-02-17 11:15:40 +00:00
Evan Cheng
a3d3599210
Do not add livein's to entry MBB twice.
...
llvm-svn: 34382
2007-02-17 11:11:27 +00:00
Evan Cheng
41d2a1d8bf
Added removeLiveIn.
...
llvm-svn: 34381
2007-02-17 11:10:48 +00:00
Evan Cheng
6accd480a2
Added findRegisterDefOperand().
...
llvm-svn: 34380
2007-02-17 11:10:18 +00:00
Evan Cheng
ef932b067d
- Use MRegister::regsOverlap().
...
- Allow LiveVariables to track liveness of more registers.
llvm-svn: 34379
2007-02-17 11:09:47 +00:00
Evan Cheng
9865be6d40
Added getReservedRegs().
...
llvm-svn: 34376
2007-02-17 11:06:00 +00:00
Chris Lattner
1f7d60262e
Fix ixaddrs as well, allowing ppc64 to compile to:
...
_test2:
li r2, 0
lis r3, 1
std r2, 9024(r3)
blr
instead of:
_test2:
lis r2, 1
li r3, 0
ori r2, r2, 9024
std r3, 0(r2)
blr
This implements CodeGen/PowerPC/LargeAbsoluteAddr.ll:test2
llvm-svn: 34373
2007-02-17 06:57:26 +00:00
Chris Lattner
4a9c0bb147
Compile test/CodeGen/PowerPC/LargeAbsoluteAddr.ll to:
...
_test:
lis r2, 743
li r3, 0
stw r3, 32751(r2)
blr
instead of:
_test:
li r2, 0
stw r2, 32751(48693248)
blr
Implement support for ppc64 as well, allowing it to produce better code.
llvm-svn: 34371
2007-02-17 06:44:03 +00:00
Chris Lattner
56e5fea163
print target nodes nicely
...
llvm-svn: 34369
2007-02-17 06:38:37 +00:00
Chris Lattner
a9f917af59
Implement i/n/s constraints correctly. This fixes
...
test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll
llvm-svn: 34368
2007-02-17 06:00:35 +00:00
Devang Patel
98354dabc1
Use inverted map to speedup collectLastUses().
...
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Reid Spencer
100502d256
Move static functions closer to their usage.
...
llvm-svn: 34363
2007-02-17 03:16:00 +00:00
Reid Spencer
3986776fbd
Clean up the divide and remainder logic a bit (exit early). Use more
...
meaningful variable names. Add comments to document the flow.
llvm-svn: 34362
2007-02-17 02:07:07 +00:00
Dale Johannesen
12920dda9e
Fixes PR 1200
...
llvm-svn: 34359
2007-02-17 00:44:34 +00:00
Chris Lattner
04eb16b415
Do not dereference invalid ranges. Generalize targetdata alignment model.
...
This fixes the UnitTests/Vector/sumarray-dbl regressions.
llvm-svn: 34358
2007-02-17 00:41:42 +00:00
Reid Spencer
a32372d110
Fix bugs introduced by constructor parameter order change.
...
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Chris Lattner
dc64b9d379
Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll
...
llvm-svn: 34356
2007-02-16 23:11:51 +00:00
Reid Spencer
e4ff249d26
Remove an unnecessary predicate.
...
Patch by Scott Michel.
llvm-svn: 34354
2007-02-16 22:42:40 +00:00
Reid Spencer
1d0721209d
Review changes:
...
1. Function style changes.
2. 80-col violations.
3. Better names for things.
4. Arrange constructors so they all take bit width first.
5. Add named signed and unsigned comparison functions and remove the
corresponding operators.
6. Remove operator&& and operator|| but provide a getBoolValue function which
converts to bool as comparison against 0. This allows the normal && and
|| operators to be used as if (X.getBoolValue() && Y.getBoolValue())
Note: this still doesn't function 100% yet. I'm working on the bugs now.
llvm-svn: 34353
2007-02-16 22:36:51 +00:00
Chris Lattner
f9122c4512
simplify some code, ensure that packed structures get abi alignment of 1.
...
llvm-svn: 34352
2007-02-16 22:25:34 +00:00
Chris Lattner
8091f28d1a
fix incorrect encoding of vminsw.
...
llvm-svn: 34351
2007-02-16 21:20:09 +00:00
Anton Korobeynikov
d01defedf6
Add possibility to set memory limit for binaries run via libSystem. This
...
is especially needed for bugpoint. This partly implements PR688
llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Evan Cheng
66cb162f92
Print <dead> def operands.
...
llvm-svn: 34343
2007-02-16 09:49:18 +00:00
Evan Cheng
7238410766
Add live-ins to every BB.
...
llvm-svn: 34342
2007-02-16 09:05:02 +00:00
Andrew Lenharth
9d4819be08
fix build
...
llvm-svn: 34339
2007-02-16 02:25:55 +00:00
Andrew Lenharth
b8d6fa20bb
This was done recently
...
llvm-svn: 34338
2007-02-16 02:11:59 +00:00
Dale Johannesen
915e15481e
test commit (blank line)
...
llvm-svn: 34337
2007-02-16 01:54:53 +00:00
Chris Lattner
c992e18f8d
make mayWriteToMemory a non-virtual function
...
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Chris Lattner
99c6cf60f1
convert more vectors to smallvectors, 2.8% speedup
...
llvm-svn: 34333
2007-02-15 22:52:10 +00:00
Chris Lattner
af6094fe3f
change some vectors to smallvectors. This speeds up instcombine on 447.dealII
...
by 5%.
llvm-svn: 34332
2007-02-15 22:48:32 +00:00
Reid Spencer
03d4a8a368
For PR1195:
...
PACKED_ALIGN -> VECTOR_ALIGN
llvm-svn: 34330
2007-02-15 22:07:05 +00:00
Chris Lattner
cf835ff85a
rewrite Value::takeName to take advantage of the new symtab stuff. This
...
causes it to require no allocations and no symtab lookups in the common
case. This speeds up instcombine 9.2% on 447.dealII.
llvm-svn: 34324
2007-02-15 20:01:43 +00:00
Chris Lattner
7907e5fe07
switch an std::set to a SmallPtr set, this speeds up instcombine by 9.5%
...
on 447.dealII
llvm-svn: 34323
2007-02-15 19:41:52 +00:00
Chris Lattner
1e92e06779
Implement Function::getIntrinsicID without it needing to call Value::getName,
...
which allocates a string. This speeds up instcombine on 447.dealII by 5%.
llvm-svn: 34318
2007-02-15 19:17:16 +00:00
Chris Lattner
fd27ed9733
Add a new Value::getNameStr method, which is preferred over getName.
...
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Reid Spencer
40aa2fdac6
For PR1202:
...
Make sure we found an existing Alignment before overwriting it.
llvm-svn: 34308
2007-02-15 18:34:36 +00:00
Chris Lattner
68dcec6fea
fix indentation
...
llvm-svn: 34307
2007-02-15 18:19:15 +00:00
Chris Lattner
21ebae3394
Apply B Scott Michel's patch for PR1184, which improves diagnostics in an
...
abort case.
llvm-svn: 34306
2007-02-15 18:17:56 +00:00
Zhou Sheng
cfa2ac0592
Fix some buges:
...
1. Make getMinValue() returns the right value.
2. Fix the ByteSwap() crash problem.
3. Make Postfix increment work correctly.
4. Fix some bugs in LogBase2, Hi/LoBits and UDiv.
llvm-svn: 34304
2007-02-15 06:36:31 +00:00
Evan Cheng
14edd1989b
Use BitVector instead of vector<bool> which can be extremely slow.
...
llvm-svn: 34302
2007-02-15 05:59:24 +00:00
Reid Spencer
09575bac2e
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
d4a0b7bb7b
For PR1195:
...
Change a comment: Packed Type -> Vector Type
llvm-svn: 34299
2007-02-15 03:11:50 +00:00
Reid Spencer
537ee02f89
Change an assert that mentions Packed Type -> Vector Type.
...
llvm-svn: 34298
2007-02-15 03:11:20 +00:00
Reid Spencer
d84d35ba70
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Reid Spencer
dad84a7c02
Fixed packed structure breakage from earlier TargetData patch; applied
...
Chris Lattner's code style suggestions.
Patch by Scott Michel!
llvm-svn: 34292
2007-02-15 02:11:06 +00:00
Chris Lattner
ab1812f806
fix a warning
...
llvm-svn: 34272
2007-02-14 07:34:56 +00:00
Chris Lattner
1cf84d2745
Refix CodeGen/Generic/switch-lower.ll. In contrast to my previous patch,
...
this doesn't miscompile lots of programs :)
llvm-svn: 34268
2007-02-14 07:18:16 +00:00
Chris Lattner
4da5e17cfc
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
945e437c65
Generalize TargetData strings, to support more interesting forms of data.
...
Patch by Scott Michel.
llvm-svn: 34266
2007-02-14 05:52:17 +00:00
Reid Spencer
0c5db23119
Use brute-force algorithm for to_string. It doesn't have to be efficient
...
at this point, it just needs to work so we can test things reliably.
llvm-svn: 34262
2007-02-14 02:52:25 +00:00
Chris Lattner
084c4ca591
better support for i128.
...
llvm-svn: 34258
2007-02-13 23:57:55 +00:00
Chris Lattner
59b27fa371
implement expand of truncate. This allows truncates from i128 to i64 to
...
be supported on 32-bit hosts.
llvm-svn: 34257
2007-02-13 23:55:16 +00:00
Chris Lattner
d08d31f68a
Fix PR1198, by adding initial i128 support. Patch by Dan Gohman.
...
llvm-svn: 34256
2007-02-13 23:41:38 +00:00
Andrew Lenharth
6719d3d0a2
Well this isn't as ugly and it works better. At least gcc bootstraps again
...
llvm-svn: 34254
2007-02-13 23:41:16 +00:00
Reid Spencer
5153525402
Make some minor improvements to APInt:
...
1. Make all the operators use uppercase
2. Rename APIntRoundToDouble method just RoundToDouble, the APInt is
redundant.
3. Turn the class on for compilation.
llvm-svn: 34253
2007-02-13 22:41:58 +00:00
Chris Lattner
09a32e42bd
add a note
...
llvm-svn: 34249
2007-02-13 21:44:43 +00:00
Chris Lattner
2fbff4d2dc
revert my previous switch lowering change, which miscompiles a few programs.
...
This will break a dj test until I have time to investigate.
llvm-svn: 34247
2007-02-13 20:09:07 +00:00
Lauro Ramos Venancio
50c6a8c3a1
Add space between // and the comment.
...
llvm-svn: 34246
2007-02-13 20:06:15 +00:00
Lauro Ramos Venancio
048e16ff8f
Add ABI information to ARM subtarget.
...
llvm-svn: 34245
2007-02-13 19:52:28 +00:00
Lauro Ramos Venancio
abde3cc16c
Add a space between // and the comment.
...
llvm-svn: 34244
2007-02-13 18:10:13 +00:00
Lauro Ramos Venancio
603f201cba
According to ARM EABI, 8-bytes function arguments must be 8-bytes aligned.
...
llvm-svn: 34241
2007-02-13 14:07:13 +00:00
Lauro Ramos Venancio
9956dcffbe
Add "original alignment" to function arguments flags.
...
llvm-svn: 34240
2007-02-13 13:50:08 +00:00
Chris Lattner
0f04816cad
Switch UnaryOperators to default to passing names up by const char* when possible.
...
This speeds up bcreading by 1.5%.
llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Chris Lattner
cb9a626c67
add a setName variant that takes a null-terminated string. This can be
...
used to avoid std::string allocations in common cases.
llvm-svn: 34232
2007-02-13 07:53:34 +00:00
Chris Lattner
e786eaa3b0
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
abe7342dc2
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
e563e480d9
eliminate instruction ctors that take vectors.
...
llvm-svn: 34228
2007-02-13 06:22:32 +00:00
Chris Lattner
6ea07f178c
eliminate vector-related allocations
...
llvm-svn: 34223
2007-02-13 06:01:22 +00:00
Chris Lattner
ade1c2bb51
eliminate a bunch of vector-related heap traffic
...
llvm-svn: 34222
2007-02-13 05:58:53 +00:00
Chris Lattner
d80282427f
eliminate use of vector ctors
...
llvm-svn: 34221
2007-02-13 05:53:56 +00:00
Chris Lattner
a06a8fd2d7
Eliminate use of ctors that take vectors.
...
llvm-svn: 34219
2007-02-13 02:10:56 +00:00
Chris Lattner
4d8861efaa
stop passing vector into ctors
...
llvm-svn: 34218
2007-02-13 01:53:54 +00:00
Evan Cheng
b612316f20
Allow any MachineBasicBlock (not just the entry block) to have live-in physical
...
registers. Make sure liveinterval analysis is correctly creating live ranges
for them.
llvm-svn: 34217
2007-02-13 01:30:55 +00:00
Chris Lattner
9056bae3be
Fix switch lowering to order cases in zext order, which is how we emit the
...
comparisons. This fixes an infinite loop on CodeGen/Generic/switch-lower.ll
and PR1197
llvm-svn: 34216
2007-02-13 01:05:56 +00:00
Chris Lattner
b5fcc28075
Add invokeinst and callinst ctors that don't take vectors.
...
llvm-svn: 34214
2007-02-13 01:04:01 +00:00
Chris Lattner
054ba2c002
remove some dead methods.
...
llvm-svn: 34213
2007-02-13 00:58:44 +00:00
Chris Lattner
f79508fb59
regenerate
...
llvm-svn: 34212
2007-02-13 00:58:01 +00:00
Chris Lattner
04a2d765a1
eliminate use of methods that take vectors as args
...
llvm-svn: 34211
2007-02-13 00:57:40 +00:00
Chris Lattner
a731513406
stop using methods that take vectors.
...
llvm-svn: 34205
2007-02-12 22:56:41 +00:00
Chris Lattner
44e9472fc6
more notes
...
llvm-svn: 34204
2007-02-12 21:20:26 +00:00
Chris Lattner
b5c89c8d2d
add a note
...
llvm-svn: 34202
2007-02-12 20:26:34 +00:00
Zhou Sheng
d707d63317
1. Make APInt::shl work correctly and more efficiently.
...
2. Add functions to support the numberical conversion between APInt and
double/float.
llvm-svn: 34201
2007-02-12 20:02:55 +00:00
Chris Lattner
8d160d68b8
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
1a5de584dc
Add new setName accessor which doesn't require creating a string.
...
llvm-svn: 34197
2007-02-12 18:52:59 +00:00
Chris Lattner
32ab643df7
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
Chris Lattner
ac26f3853a
regenerate
...
llvm-svn: 34188
2007-02-11 21:40:10 +00:00
Chris Lattner
988278c3c3
add #include
...
llvm-svn: 34187
2007-02-11 21:39:35 +00:00
Chris Lattner
77baa56a70
Add support for removing elements out of StringMap.
...
llvm-svn: 34185
2007-02-11 20:58:00 +00:00
Chris Lattner
db08c1bc83
Replace the ugly FindValue method with STL-like find methods.
...
llvm-svn: 34183
2007-02-11 19:49:41 +00:00
Chris Lattner
569c8acfe3
fix uninitialized variable
...
llvm-svn: 34182
2007-02-11 19:12:18 +00:00
Chris Lattner
9521fec8cf
remove support for stringmap visitors now that iterators exist.
...
llvm-svn: 34180
2007-02-11 08:22:15 +00:00
Chris Lattner
e15605ccbf
add support for iterators.
...
llvm-svn: 34179
2007-02-11 08:20:35 +00:00
Chris Lattner
8dd4cae4f8
simplify code by using Value::takeName
...
llvm-svn: 34177
2007-02-11 01:37:51 +00:00
Chris Lattner
6e0123b17f
Simplify code by using value::takename
...
llvm-svn: 34176
2007-02-11 01:23:03 +00:00
Chris Lattner
8d4c36bb40
simplify name juggling through the use of Value::takeName.
...
llvm-svn: 34175
2007-02-11 01:08:35 +00:00
Chris Lattner
cba18e3a01
add an optimization for the case where the src has no name
...
llvm-svn: 34174
2007-02-11 01:04:09 +00:00
Nick Lewycky
63f110880b
Fix comments to match names of functions.
...
llvm-svn: 34173
2007-02-11 00:58:49 +00:00
Chris Lattner
2a8d2e0e52
simplify this code by using value::takename
...
llvm-svn: 34172
2007-02-11 00:39:38 +00:00
Chris Lattner
b625082a42
add a helper method: Value::takeName
...
llvm-svn: 34171
2007-02-11 00:37:27 +00:00
Reid Spencer
0aea61a57e
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
Chris Lattner
d3182e4e06
Switch some std::vector's to SmallVectors. This speeds up -load-vn -gcse
...
by 6% on tramp3d.
llvm-svn: 34167
2007-02-10 22:15:31 +00:00
Chris Lattner
237b5b60ea
modify CheckGEPInstructions to take a pointer and size instead of a vector.
...
llvm-svn: 34166
2007-02-10 22:12:53 +00:00
Reid Spencer
d63a5200cb
Assert that elements of packed are pointer/float/opaque.
...
llvm-svn: 34165
2007-02-10 22:02:45 +00:00
Chris Lattner
c44bd78a2e
eliminate use of TargetData::getIndexedOffset that takes a vector
...
llvm-svn: 34163
2007-02-10 20:35:22 +00:00
Chris Lattner
b402e74fcd
completely eliminate a temporary vector
...
llvm-svn: 34162
2007-02-10 20:33:15 +00:00
Chris Lattner
83dfca816c
eliminate temporary vectors.
...
llvm-svn: 34161
2007-02-10 20:31:59 +00:00
Chris Lattner
fed6f0e571
Switch LayoutInfo to be a DenseMap instead of an std::map. This speeds up
...
-load-vn -gcse by 2.3%.
llvm-svn: 34160
2007-02-10 20:26:17 +00:00
Chris Lattner
22206711c9
add a typedef
...
llvm-svn: 34159
2007-02-10 20:18:06 +00:00
Chris Lattner
e472f9c4dc
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%.
llvm-svn: 34158
2007-02-10 20:15:41 +00:00
Chris Lattner
b84892d2d2
encapsulate the rest of the StructLayout members.
...
llvm-svn: 34157
2007-02-10 19:59:22 +00:00
Chris Lattner
c473d8e431
Privatize StructLayout::MemberOffsets, adding an accessor
...
llvm-svn: 34156
2007-02-10 19:55:17 +00:00
Chris Lattner
1e692e823c
Use ManagedStatic to manage LayoutInfo, instead of rolling our own.
...
llvm-svn: 34154
2007-02-10 19:43:18 +00:00
Chris Lattner
336e3962ff
Change TargetData::getIndexedOffset interface to not require indices
...
in a vector.
llvm-svn: 34153
2007-02-10 19:33:15 +00:00
Reid Spencer
8a5e9891e8
Allow PackedType to be constructed with an abstract type.
...
llvm-svn: 34152
2007-02-10 19:03:01 +00:00
Reid Spencer
9aac907740
Compaction tables don't exist any more.
...
llvm-svn: 34148
2007-02-10 14:07:56 +00:00
Reid Spencer
6e4c277858
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
1673159125
Fix a comment.
...
llvm-svn: 34146
2007-02-10 11:59:10 +00:00
Chris Lattner
59a8d2c30f
convert some vectors to smallvector.
...
llvm-svn: 34145
2007-02-10 08:33:11 +00:00
Chris Lattner
84d82c7e98
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
bc97cc29e7
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
31b60980dc
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
d7f677c590
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
2aed25cfc9
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
05aeb105df
Switch typemap over to DenseMap. No significant speedup.
...
llvm-svn: 34139
2007-02-10 07:06:46 +00:00
Chris Lattner
9082be2593
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
733a841633
use typedefs where appropriate
...
llvm-svn: 34136
2007-02-10 06:42:23 +00:00
Chris Lattner
cdde9ce28b
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
e06c2fd4df
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
82a06ec1ca
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
a6214fea08
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
0132599b8d
make getSlot/getTypeSlot inline
...
llvm-svn: 34130
2007-02-10 05:18:35 +00:00
Chris Lattner
832676a772
getTypeSlot can never fail
...
llvm-svn: 34129
2007-02-10 05:17:48 +00:00
Chris Lattner
ce57e528f5
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
1e91abbf61
simplify getOrCreateTypeSlot, eliminat doInsertType. Eliminate post-order iteration stuff.
...
llvm-svn: 34127
2007-02-10 05:02:50 +00:00
Chris Lattner
d090c6beed
simplify and speed up recursive type processing.
...
llvm-svn: 34126
2007-02-10 04:57:36 +00:00
Chris Lattner
e2154a1fa1
rename getOrCreateSlot -> CreateSlotIfNeeded. Noone cares about the retval
...
llvm-svn: 34125
2007-02-10 04:54:01 +00:00
Chris Lattner
34495b1b6d
refactor callers of insertType. inline insertType into its one remaining caller.
...
llvm-svn: 34124
2007-02-10 04:51:21 +00:00
Chris Lattner
fa60ec48d3
simplify code.
...
llvm-svn: 34123
2007-02-10 04:47:51 +00:00
Chris Lattner
53d0043173
simplify some logic, reduce nesting
...
llvm-svn: 34122
2007-02-10 04:42:30 +00:00
Chris Lattner
2a666a0b29
Remove dead ctor
...
llvm-svn: 34121
2007-02-10 04:38:34 +00:00
Chris Lattner
12002936aa
ModuleContainsAllFunctionConstants is always true
...
llvm-svn: 34120
2007-02-10 04:36:10 +00:00
Chris Lattner
c7627ca239
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
3a28413d38
inline hasNullValue, rename some variables, simplify some code.
...
llvm-svn: 34118
2007-02-10 04:29:03 +00:00
Chris Lattner
0d549b217b
merge insertValue into its single caller, eliminate some redundant checks.
...
llvm-svn: 34117
2007-02-10 04:25:02 +00:00
Chris Lattner
90a8f472da
merge doInsertValue into insertValue
...
llvm-svn: 34116
2007-02-10 04:22:30 +00:00
Chris Lattner
dcb209ac9c
insertvalue's second operand is always false
...
llvm-svn: 34115
2007-02-10 04:19:31 +00:00
Chris Lattner
ee030194f9
remove dead 'dontIgnore' flag for insertType
...
llvm-svn: 34114
2007-02-10 04:17:41 +00:00
Chris Lattner
35e18b0d05
rename getSlot -> getSlotType and getOrCreateSlot ->getOrCreateTypeSlot
...
for types.
llvm-svn: 34113
2007-02-10 04:15:40 +00:00
Evan Cheng
276b44b0f9
Add function live-ins to entry block live-in set.
...
llvm-svn: 34112
2007-02-10 02:43:39 +00:00
Evan Cheng
bcf1d7faef
Add live-ins to MachineBasicBlock.
...
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Evan Cheng
de6083463d
Rename some variables to avoid confusion with SelectionDAGISel::BB.
...
llvm-svn: 34110
2007-02-10 01:08:18 +00:00
Evan Cheng
540f5e0d41
These vectors are frequently large. Use std::vector instead.
...
llvm-svn: 34109
2007-02-09 23:59:14 +00:00
Chris Lattner
d2e8e55ae0
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
8b7700f146
Add reference counting to constantpool entries. Delete the unused ones.
...
llvm-svn: 34105
2007-02-09 20:54:44 +00:00
Reid Spencer
5808739fac
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
Chris Lattner
c9088b4c8e
add a note
...
llvm-svn: 34101
2007-02-09 17:38:01 +00:00
Reid Spencer
ca444882bd
Make SlotCalculator::getPlane an inline function. It is used inside loops.
...
llvm-svn: 34091
2007-02-09 15:25:50 +00:00
Chris Lattner
02be9919ab
remove unneeded #includes
...
llvm-svn: 34086
2007-02-09 07:54:13 +00:00
Chris Lattner
b3905c70c4
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
fc30d1bb69
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
Zhou Sheng
e93db8fba2
Eliminates friend function declaration inside APInt, instead, adds public
...
methods as those global function's internal implementation.
llvm-svn: 34083
2007-02-09 07:48:24 +00:00
Nate Begeman
ba52b94fa2
Remove fixed item
...
llvm-svn: 34081
2007-02-09 04:19:54 +00:00
Evan Cheng
f76bb63555
This is done.
...
llvm-svn: 34072
2007-02-08 23:53:38 +00:00
Evan Cheng
93049457ee
Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().
...
llvm-svn: 34066
2007-02-08 22:16:19 +00:00
Evan Cheng
92658d5648
Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
...
llvm-svn: 34065
2007-02-08 22:13:59 +00:00
Chris Lattner
751a42010b
Rename CStringMap -> StringMap, since it now supports nul characters in the
...
strings.
llvm-svn: 34064
2007-02-08 19:20:57 +00:00
Chris Lattner
259ba20bd8
Allow cstringmap to contain strings with nul characters in them.
...
llvm-svn: 34062
2007-02-08 19:08:37 +00:00
Andrew Lenharth
9a4a1515ee
return addresses, those I already have
...
llvm-svn: 34056
2007-02-08 17:37:41 +00:00
Zhou Sheng
11eea86410
Switched this file on accidently.
...
llvm-svn: 34054
2007-02-08 16:45:48 +00:00
Zhou Sheng
fbf61eaba7
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.
llvm-svn: 34053
2007-02-08 14:35:19 +00:00
Bill Wendling
e796b6de45
Fixed comments.
...
llvm-svn: 34040
2007-02-08 06:05:08 +00:00
Evan Cheng
6ad6fdb70b
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.
llvm-svn: 34039
2007-02-08 06:04:54 +00:00
Bill Wendling
2aa9a42f24
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).
llvm-svn: 34034
2007-02-08 01:39:44 +00:00
Bill Wendling
59889ae93f
Added new method to add a "simple" code emitter. That is, to only add
...
the code emitter and not set variables.
llvm-svn: 34033
2007-02-08 01:38:33 +00:00
Bill Wendling
523048ecde
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.
llvm-svn: 34032
2007-02-08 01:36:53 +00:00
Bill Wendling
3c4d37a531
Add function to create a file writer.
...
llvm-svn: 34031
2007-02-08 01:35:27 +00:00
Bill Wendling
4e8ad36338
Dead files. Functionality has been taken over by the Add*Writer functions.
...
llvm-svn: 34029
2007-02-08 01:32:51 +00:00
Bill Wendling
860ce1b82e
Moved from include/llvm/CodeGen to lib/CodeGen.
...
llvm-svn: 34027
2007-02-08 01:30:50 +00:00
Reid Spencer
0690d442ab
For PR1188:
...
Compute BitMask correctly.
Patch by Leo (wenwenti@hotmail.com ).
llvm-svn: 34026
2007-02-08 00:29:31 +00:00
Chris Lattner
ddfead20e8
move archive-specific stuff out of bcreader into archive library.
...
llvm-svn: 34022
2007-02-07 23:53:17 +00:00