Chris Lattner
332a173cff
avoid string thrashing when formatting names in output. This
...
speeds up release-asserts llvm-dis on kc++ from 1.86s to 1.04s (~79%)
llvm-svn: 54868
2008-08-17 04:40:13 +00:00
Chris Lattner
ba25bb349e
random cleanups.
...
llvm-svn: 54866
2008-08-17 04:17:45 +00:00
Chris Lattner
dab4a64423
add support for a cout/cerr analog (outs()/errs()) as well as
...
a simple adaptor class to give raw output capabilities to
something that wants to write to an ostream.
llvm-svn: 54865
2008-08-17 04:13:37 +00:00
Chris Lattner
c9c1d50446
opening "-" automatically yields stdout.
...
llvm-svn: 54863
2008-08-17 03:53:23 +00:00
Chris Lattner
eef022091c
rename OutputData to 'write' to match ostream.
...
llvm-svn: 54857
2008-08-17 01:46:05 +00:00
Chris Lattner
312d8de59b
add a new raw_ostream class which is an extremely high performance ostream that
...
can *only* output data (no seeking, reading, etc). This is adapted from the
clang "-E outputter", and is roughly 10% faster than stdio on darwin and 30%
(or more) faster than std::ostream.
llvm-svn: 54855
2008-08-17 01:35:29 +00:00
Anton Korobeynikov
bd9823f5a4
PPC/Linux normally uses named section for bss
...
llvm-svn: 54847
2008-08-16 12:59:02 +00:00
Anton Korobeynikov
61af04fa0a
Use proper strings section name for PPC
...
llvm-svn: 54846
2008-08-16 12:58:46 +00:00
Anton Korobeynikov
d475141eea
Use correct name for TLS address resolution routine on x86-64
...
llvm-svn: 54845
2008-08-16 12:58:29 +00:00
Anton Korobeynikov
d51454bfa6
Add interface for section override. Use this for Sparc, since it should use named BSS section.
...
llvm-svn: 54844
2008-08-16 12:58:12 +00:00
Anton Korobeynikov
436f708112
Move SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. This makes JIT asmprinter-free.
...
llvm-svn: 54843
2008-08-16 12:57:46 +00:00
Anton Korobeynikov
767865a3d1
Reduce heap trashing due to std::string construction / concatenation via caching of section flags string representations
...
llvm-svn: 54842
2008-08-16 12:57:07 +00:00
Owen Anderson
13498aa150
Remove GCSE, ValueNumbering, and LoadValueNumbering. These have been deprecated for almost a year; it's finally time for them to go away.
...
llvm-svn: 54822
2008-08-15 21:31:02 +00:00
Devang Patel
a8e9ee0529
Reapply 54786. Add overflow and number of mantissa bits checks.
...
llvm-svn: 54821
2008-08-15 21:21:34 +00:00
Owen Anderson
426c49472d
Convert several std::vectors over to SmallVector, and use reserve() as appropriate for cases where std::vector is still used.
...
llvm-svn: 54820
2008-08-15 18:49:41 +00:00
Chris Lattner
f991487f21
Inline the fastpath of PATypeHolder::get(). This is a small speedup in
...
instcombine among other things.
llvm-svn: 54814
2008-08-15 15:16:50 +00:00
Evan Cheng
b2e1459e48
Revert 54786. It's not checking for overflows, etc.
...
llvm-svn: 54813
2008-08-15 08:12:11 +00:00
Chris Lattner
28a74aa6ca
use smallvector instead of vector for a couple worklists. This speeds up instcombine
...
by ~10% on some testcases.
llvm-svn: 54811
2008-08-15 04:03:01 +00:00
Owen Anderson
d3c6cbed61
Use SmallSet instead of std::set to save allocations.
...
llvm-svn: 54810
2008-08-14 23:41:38 +00:00
Owen Anderson
fd1d9b5c38
Move MachineInstr::getOpcode inline.
...
llvm-svn: 54807
2008-08-14 23:25:30 +00:00
Dan Gohman
1a413c0387
Build the X86GenFastISel.inc file.
...
llvm-svn: 54806
2008-08-14 23:18:11 +00:00
Devang Patel
b5abdd4c33
The pass manager is not able to schedule -loop-deletion -loop-index-split.
...
The loop-deletion pass does not preserve dom frontier, which is required by
loop-index-split. When the PM checks dom frontier for loop-index-split, it has
already verified that lcssa is availalble. However, new dom frontier forces new
loop pass manager, which does not have lcssa yet.
The PM should recheck availability of required analysis passes in such cases.
llvm-svn: 54805
2008-08-14 23:07:48 +00:00
Bill Wendling
bebfe7b7fc
Temporarily revert r54792. It's causing an ICE during bootstrapping.
...
llvm-svn: 54804
2008-08-14 23:05:24 +00:00
Dan Gohman
7534da85c9
Also avoid pinsrw and pinsrb with a variable insertelement index.
...
llvm-svn: 54803
2008-08-14 22:53:18 +00:00
Owen Anderson
600a8ca0d5
Convert uses of std::vector in TargetInstrInfo to SmallVector. This change had to be propoagated down into all the targets and up into all clients of this API.
...
llvm-svn: 54802
2008-08-14 22:49:33 +00:00
Dan Gohman
c530d2983d
Don't try to use the insertps instruction for vector
...
element inserts with non-constant indices. This fixes
CodeGen/X86/vector-variable-idx.ll on machines that
have SSE4.1.
llvm-svn: 54801
2008-08-14 22:43:26 +00:00
Dan Gohman
6b146d5ec3
Make FastISel's constructor protected, and give it a destructor.
...
llvm-svn: 54793
2008-08-14 21:51:29 +00:00
Devang Patel
8aa62f7dfa
Use DenseMap. Patch by Pratik Solanki.
...
llvm-svn: 54792
2008-08-14 21:31:10 +00:00
Owen Anderson
af9e467544
Remove more uses of std::set.
...
llvm-svn: 54787
2008-08-14 21:01:00 +00:00
Devang Patel
67f9b08a91
If IV is used in a int-to-float cast inside the loop then try to eliminate the cast opeation.
...
llvm-svn: 54786
2008-08-14 20:58:31 +00:00
Owen Anderson
3c7772990a
Have LeakDetector use a SmallPtrSet instead of an std::set.
...
llvm-svn: 54785
2008-08-14 20:40:10 +00:00
Dan Gohman
b0f5e18201
Improve support for vector casts in LLVM IR and CodeGen.
...
llvm-svn: 54784
2008-08-14 20:04:46 +00:00
Owen Anderson
169e5e5b99
Speed up addRegisterDead by adding more fast checks before performing the expensive
...
subregister query, and by increasing the size of the subregister hashtable so
that there are fewer collisions.
llvm-svn: 54781
2008-08-14 18:34:18 +00:00
Dan Gohman
027326ba3e
Use empty() instead of begin() == end().
...
llvm-svn: 54780
2008-08-14 18:13:49 +00:00
Matthijs Kooijman
3bbc2deb9c
Replace two for loops with while(!X->use_empty()) loops. This prevents
...
invalidating the iterator by deleting the current use. This fixes a segfault on
64 bit linux reported in PR2675.
Also remove an unneeded if.
llvm-svn: 54778
2008-08-14 15:03:05 +00:00
Owen Anderson
34aee11210
Get rid of a use of std::map.
...
llvm-svn: 54770
2008-08-13 23:36:23 +00:00
Dan Gohman
db5b503d60
Fix a bogus srem rule - a negative value srem'd by a power-of-2
...
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.
llvm-svn: 54767
2008-08-13 23:12:35 +00:00
Owen Anderson
de29970fc6
Expunge the last uses of std::map from LiveIntervals.
...
llvm-svn: 54766
2008-08-13 22:28:50 +00:00
Owen Anderson
550fc15832
Move r2iMap_ over to DenseMap from std::map.
...
llvm-svn: 54765
2008-08-13 22:08:30 +00:00
Dan Gohman
096cdc6059
Allow SelectionDAG to create EXTRACT_VECTOR_ELT nodes with
...
non-constant indices. Only a few of the peephole checks require
a constant index.
llvm-svn: 54764
2008-08-13 21:51:37 +00:00
Owen Anderson
28f2e658f1
Make the allocation of LiveIntervals explicit, rather than holding them in the r2iMap_ by value. This will prevent references to them from being invalidated
...
if the map is changed.
llvm-svn: 54763
2008-08-13 21:49:13 +00:00
Dan Gohman
374d9328b7
Fix SCCP's handling of struct value loads and stores. SCCP doesn't
...
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.
llvm-svn: 54760
2008-08-13 21:22:48 +00:00
Devang Patel
bb9cb77326
Rename. s/FindIVForUser/FindIVUserForCond/g
...
llvm-svn: 54754
2008-08-13 20:31:11 +00:00
Duncan Sands
26e54f3570
Teach constant folding that an inttoptr of a
...
ptrtoint can be turned into a bitcast if the
integer is at least as wide as a pointer.
llvm-svn: 54752
2008-08-13 20:20:35 +00:00
Dan Gohman
4b1b033f89
Initial checkin of the new "fast" instruction selection support. See
...
the comments in FastISelEmitter.cpp for details on what this is.
This is currently experimental and unusable.
llvm-svn: 54751
2008-08-13 20:19:35 +00:00
Dan Gohman
502d2aebff
Oops, check in these files too, for the FastISel -> Fast rename.
...
llvm-svn: 54750
2008-08-13 19:55:00 +00:00
Dan Gohman
9e27bed4f0
Rename SelectionDAGISel's FastISel to Fast, to begin to make
...
room for the new FastISel instruction selection code.
llvm-svn: 54749
2008-08-13 19:47:40 +00:00
Dale Johannesen
b23672a4e3
Generated files for 54744.
...
llvm-svn: 54745
2008-08-13 18:41:46 +00:00
Dale Johannesen
c3d88ff804
Add read/write support for X86's sseregparm.
...
llvm-svn: 54744
2008-08-13 18:40:23 +00:00
Owen Anderson
9007c9afde
Get rid of unused variable.
...
llvm-svn: 54742
2008-08-13 17:44:52 +00:00