Commit Graph

17369 Commits

Author SHA1 Message Date
Chris Lattner
72588fc3f4 change some vectors to smallvectors. This speeds up instcombine on 447.dealII
by 5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34332 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 22:48:32 +00:00
Reid Spencer
1f43787bf0 For PR1195:
PACKED_ALIGN -> VECTOR_ALIGN


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34330 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 22:07:05 +00:00
Chris Lattner
0878c31059 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34324 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 20:01:43 +00:00
Chris Lattner
1f87a58ab2 switch an std::set to a SmallPtr set, this speeds up instcombine by 9.5%
on 447.dealII


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34323 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 19:41:52 +00:00
Chris Lattner
3b515802f6 Implement Function::getIntrinsicID without it needing to call Value::getName,
which allocates a string.  This speeds up instcombine on 447.dealII by 5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34318 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 19:17:16 +00:00
Chris Lattner
924b1ca9ee Add a new Value::getNameStr method, which is preferred over getName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:53:54 +00:00
Reid Spencer
16db3caba8 For PR1202:
Make sure we found an existing Alignment before overwriting it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34308 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:34:36 +00:00
Chris Lattner
5d4a9f7731 fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34307 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:19:15 +00:00
Chris Lattner
0152829e89 Apply B Scott Michel's patch for PR1184, which improves diagnostics in an
abort case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34306 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:17:56 +00:00
Zhou Sheng
b04973edfa 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34304 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 06:36:31 +00:00
Evan Cheng
61de82d885 Use BitVector instead of vector<bool> which can be extremely slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34302 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 05:59:24 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
a85210ac66 For PR1195:
Change a comment: Packed Type -> Vector Type


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:11:50 +00:00
Reid Spencer
d29b8b85ce Change an assert that mentions Packed Type -> Vector Type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:11:20 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Reid Spencer
b7d61101b1 Fixed packed structure breakage from earlier TargetData patch; applied
Chris Lattner's code style suggestions.

Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34292 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:11:06 +00:00
Chris Lattner
c661d61d82 fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34272 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 07:34:56 +00:00
Chris Lattner
21840b1c5c Refix CodeGen/Generic/switch-lower.ll. In contrast to my previous patch,
this doesn't miscompile lots of programs :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 07:18:16 +00:00
Chris Lattner
64f150fa92 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34267 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 06:20:04 +00:00
Chris Lattner
d2b7cec527 Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 05:52:17 +00:00
Reid Spencer
879dfe1c9c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34262 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 02:52:25 +00:00
Chris Lattner
c38fea8ef4 better support for i128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:57:55 +00:00
Chris Lattner
4c948eb373 implement expand of truncate. This allows truncates from i128 to i64 to
be supported on 32-bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34257 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:55:16 +00:00
Chris Lattner
f839ce7d03 Fix PR1198, by adding initial i128 support. Patch by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34256 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:41:38 +00:00
Andrew Lenharth
921a83a809 Well this isn't as ugly and it works better. At least gcc bootstraps again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34254 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:41:16 +00:00
Reid Spencer
db3faa64ee 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34253 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 22:41:58 +00:00
Chris Lattner
36e37d2944 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 21:44:43 +00:00
Chris Lattner
ae4f99d843 revert my previous switch lowering change, which miscompiles a few programs.
This will break a dj test until I have time to investigate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34247 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 20:09:07 +00:00
Lauro Ramos Venancio
7501605988 Add space between // and the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 20:06:15 +00:00
Lauro Ramos Venancio
3630e78db9 Add ABI information to ARM subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 19:52:28 +00:00
Lauro Ramos Venancio
cf8270a994 Add a space between // and the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34244 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 18:10:13 +00:00
Lauro Ramos Venancio
876eaf1135 According to ARM EABI, 8-bytes function arguments must be 8-bytes aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34241 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 14:07:13 +00:00
Lauro Ramos Venancio
7aa47b69ca Add "original alignment" to function arguments flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34240 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 13:50:08 +00:00
Chris Lattner
f00042a999 Switch UnaryOperators to default to passing names up by const char* when possible.
This speeds up bcreading by 1.5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34233 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 07:54:42 +00:00
Chris Lattner
ec79b3da13 add a setName variant that takes a null-terminated string. This can be
used to avoid std::string allocations in common cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34232 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 07:53:34 +00:00
Chris Lattner
1893952826 Use a SmallVector to reduce heap traffic. This speeds up bcreader 10%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34231 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 07:28:20 +00:00
Chris Lattner
d0e44c2e05 now that we can pass ranges into CallInst ctors, eliminate vector heap traffic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34229 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:30:42 +00:00
Chris Lattner
133bab0606 eliminate instruction ctors that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34228 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:22:32 +00:00
Chris Lattner
990b849abc eliminate vector-related allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34223 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:01:22 +00:00
Chris Lattner
c18470cb00 eliminate a bunch of vector-related heap traffic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34222 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 05:58:53 +00:00
Chris Lattner
9d2fda6883 eliminate use of vector ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 05:53:56 +00:00
Chris Lattner
93e985f1b1 Eliminate use of ctors that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34219 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 02:10:56 +00:00
Chris Lattner
e433919686 stop passing vector into ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34218 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:53:54 +00:00
Evan Cheng
0c9f92e1ff 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34217 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:30:55 +00:00
Chris Lattner
818d42f1e8 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34216 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:05:56 +00:00
Chris Lattner
d2dd1508aa Add invokeinst and callinst ctors that don't take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34214 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:04:01 +00:00
Chris Lattner
d54f432006 remove some dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34213 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:58:44 +00:00
Chris Lattner
7d9801dc88 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:58:01 +00:00
Chris Lattner
c856c7aea6 eliminate use of methods that take vectors as args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 00:57:40 +00:00
Chris Lattner
1ccd185cb4 stop using methods that take vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34205 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 22:56:41 +00:00