Chris Lattner
6e7e5fab70
Make this more efficient of the common case where we are only mangling globals.
...
Do not mangle internal global names that do not collide with anything.
This gives us strings that now look like this:
__2E_str_1: ; '.str_1'
.asciz "foo"
instead of this:
l1__2E_str_1: ; '.str_1'
.asciz "foo"
llvm-svn: 24277
2005-11-10 18:48:58 +00:00
Chris Lattner
6a14d020a3
Force packed vectors to be a power of two in length.
...
llvm-svn: 24264
2005-11-10 01:40:59 +00:00
Chris Lattner
6991a6f23f
print alignment info for globals and functions
...
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner
c6ef0112c0
verify that alignments are always a power of 2
...
llvm-svn: 24200
2005-11-05 21:57:54 +00:00
Chris Lattner
8eee9a6234
fix printing the alignment directive
...
llvm-svn: 24197
2005-11-05 21:20:34 +00:00
Nate Begeman
f299b9fb03
Add support alignment of allocation instructions.
...
Add support for specifying alignment and size of setjmp jmpbufs.
No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.
llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Chris Lattner
fd80437e76
Fix an iterator invalidation problem in code used by the -strip pass
...
llvm-svn: 24124
2005-10-31 18:42:37 +00:00
Chris Lattner
99b65b821a
Allow $
...
llvm-svn: 23721
2005-10-14 01:28:34 +00:00
Chris Lattner
5adabfc4fb
add a hack to work around broken VC++ scoping rules. Thx to JeffC for pointing
...
this out to me
llvm-svn: 23655
2005-10-07 05:23:36 +00:00
Chris Lattner
b98aa6cc83
refactor a bit of code.
...
When moving constant entries in 'Map' if the entry is the representative
constant for the abstractypemap, make sure to update it as well. This
fixes the bcreader failures from last night on several C++ apps.
llvm-svn: 23628
2005-10-04 21:35:50 +00:00
Chris Lattner
0fcb065305
Minor speedup to avoid array searches given a Use*. This speeds up bc reading
...
of the python test from 1:00 to 54s.
llvm-svn: 23627
2005-10-04 18:47:09 +00:00
Chris Lattner
e2a54ddd33
Change the signature of replaceUsesOfWithOnConstant. The bool was always
...
true dynamically. Finally, pass the Use* that replaceAllUsesWith has into
the method for future use.
llvm-svn: 23626
2005-10-04 18:13:04 +00:00
Chris Lattner
8cce7373f7
For large constants (e.g. arrays and structs with many elements) just
...
creating the keys and doing comparisons to index into 'Map' takes a lot
of time. For these large constants, keep an inverse map so that 'remove'
and move operations are much faster.
This speeds up a release build of the bc reader on Eric's nasty python
bytecode file from 1:39 to 1:00s.
llvm-svn: 23624
2005-10-04 17:48:46 +00:00
Chris Lattner
6627e8e4b5
minor cleanup/fastpath for the bcreader. This speeds up the bcreader
...
from 1:41 -> 1:39 on the large python .bc file in a release build.
llvm-svn: 23623
2005-10-04 16:52:46 +00:00
Chris Lattner
5d68585bb1
implement the struct version of the array speedup, speeding up the
...
testcase a bit more from 1:48 -> 1.40.
llvm-svn: 23619
2005-10-04 01:17:50 +00:00
Chris Lattner
eb44192fe0
Change ConstantArray::replaceUsesOfWithOnConstant to attempt to update
...
constant arrays in place instead of reallocating them and replaceAllUsesOf'ing
the result. This speeds up a release build of the bcreader from:
136.987u 120.866s 4:24.38
to
49.790u 49.890s 1:40.14
... a 2.6x speedup parsing a large python bc file.
llvm-svn: 23614
2005-10-03 22:51:37 +00:00
Chris Lattner
ae1bdaf67e
move some methods, no other changes
...
llvm-svn: 23613
2005-10-03 21:58:36 +00:00
Chris Lattner
6a65c397f3
minor microoptimizations
...
llvm-svn: 23612
2005-10-03 21:56:24 +00:00
Chris Lattner
20786460b5
Split SimpleConstantVal up into its components, so each Constant subclass getsa different enum value. This allows 'classof' for these to be really simple,not needing to call getType() anymore.
...
This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.
llvm-svn: 23467
2005-09-27 06:09:08 +00:00
Chris Lattner
26a6005735
Add support for a marker byte that indicates that we shouldn't add the user
...
prefix to a symbol name
llvm-svn: 23421
2005-09-24 08:24:28 +00:00
Jim Laskey
5f57048c62
Move code dependency for MathExtras.h out of Constants.h.
...
llvm-svn: 22840
2005-08-17 20:06:22 +00:00
Jim Laskey
61e3d7bca5
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Andrew Lenharth
972c05771c
only build .a on alpha
...
llvm-svn: 22787
2005-08-14 15:14:34 +00:00
Andrew Lenharth
5f4a72a18e
Testing a variable before it is defined doesn't work so well. It is a fairly small thing, so just let everyone build the .a file
...
llvm-svn: 22783
2005-08-13 14:58:23 +00:00
Andrew Lenharth
d9a0c60da4
Fix oversized GOT problem with gcc-4 on alpha
...
llvm-svn: 22777
2005-08-13 05:09:50 +00:00
Chris Lattner
4e2d62ba5d
Add a helper method
...
llvm-svn: 22768
2005-08-12 22:14:06 +00:00
Chris Lattner
e698d06904
add new helper function
...
llvm-svn: 22698
2005-08-08 05:21:50 +00:00
Chris Lattner
fbcacf822a
PHINode::hasConstantValue should never return the PHI itself, even if the
...
PHI is its only operand.
llvm-svn: 22676
2005-08-05 15:37:31 +00:00
Chris Lattner
b80ff334d8
Fix an iterator invalidation problem when we decide a phi has a constant value
...
llvm-svn: 22675
2005-08-05 15:34:10 +00:00
Chris Lattner
f112b97227
Invoke instructions do not dominate all successors
...
llvm-svn: 22671
2005-08-05 01:03:27 +00:00
Chris Lattner
4a3dc26192
Now that hasConstantValue is more careful w.r.t. returning values that only
...
dominate the PHI node, this code can go away. This also makes passes more
aggressive, e.g. implementing Transforms/CondProp/phisimplify2.ll
llvm-svn: 22670
2005-08-05 01:02:04 +00:00
Chris Lattner
f9aa29ef5c
Use the bool argument to hasConstantValue to decide whether the client is
...
prepared to deal with return values that do not dominate the PHI. If we
cannot prove that the result dominates the PHI node, do not return it if
the client can't cope.
llvm-svn: 22669
2005-08-05 01:00:58 +00:00
Chris Lattner
752c3e7b35
Mark hasConstantValue as a const method
...
llvm-svn: 22666
2005-08-05 00:49:06 +00:00
Nate Begeman
7547f4085b
Add an extra parameter that Chris requested
...
llvm-svn: 22665
2005-08-04 23:50:43 +00:00
Nate Begeman
ef41400067
Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
...
BasicBlock's removePredecessor routine. This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp
llvm-svn: 22664
2005-08-04 23:24:19 +00:00
Jeff Cohen
bd51ec7461
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth
a9214fec08
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Chris Lattner
fb4a99b117
Verify that varargs functions all have ccc
...
llvm-svn: 21792
2005-05-08 22:27:09 +00:00
Chris Lattner
26a44493ef
add support for explicit calling conventions
...
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner
72ffd7e7d5
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Andrew Lenharth
8b64bd0fd5
Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
...
population (ctpop). Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.
More coming soon.
llvm-svn: 21676
2005-05-03 17:19:30 +00:00
Chris Lattner
9620dd281d
fix a bug in the 1 index GEP handling code
...
llvm-svn: 21670
2005-05-03 16:44:45 +00:00
Chris Lattner
e53a188512
add direct support for making GEP instrs with one index
...
llvm-svn: 21665
2005-05-03 05:43:30 +00:00
Jeff Cohen
d33e8df701
Use ANSI-approved way of getting the value infinity (otherwise VC++ won't compile it)
...
llvm-svn: 21662
2005-05-03 03:13:01 +00:00
Andrew Lenharth
d46211fc03
fold fp div by 0 to inf, the way gcc does. This is legal according to the FP spec
...
llvm-svn: 21655
2005-05-02 21:25:47 +00:00
Chris Lattner
234ffe2395
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Chris Lattner
11f6bc02a9
Unbreak the sparc backend.
...
llvm-svn: 21598
2005-04-27 18:57:15 +00:00
Chris Lattner
6b2ebc1531
don't let Reid build void*'s :)
...
llvm-svn: 21571
2005-04-26 20:03:33 +00:00
Chris Lattner
3aff97254e
Make dominates(A,B) work with post dominators. Patch contributed by
...
Naveen Neelakantam, thanks!
llvm-svn: 21543
2005-04-25 20:50:33 +00:00