Dan Gohman
7616b6f30c
Correct a few comments.
...
llvm-svn: 37034
2007-05-14 14:31:17 +00:00
Dan Gohman
f704d8f166
Add passes -view-cfg and -view-cfg-only that are like -print-cfg and
...
-print-cfg-only except they use the ViewCFG function, which displays the
CFG rendered with graphviz with gv.
llvm-svn: 37033
2007-05-14 14:25:08 +00:00
Reid Spencer
3dab764309
Make the results for the rotate functions correct when rotateAmt == 0.
...
llvm-svn: 37026
2007-05-14 00:15:28 +00:00
Reid Spencer
a17d02ad08
Add some things needed by the llvm-gcc version supporting bit accurate integer
...
types:
1. Functions to compute div/rem at the same time.
2. Further assurance that an APInt with 0 bitwidth cannot be constructed.
3. Left and right rotate operations.
4. An exactLogBase2 function which requires an exact power of two or it
returns -1.
llvm-svn: 37025
2007-05-13 23:44:59 +00:00
Chris Lattner
ecc23415ad
Fix PR1413
...
llvm-svn: 37023
2007-05-13 22:19:27 +00:00
Chris Lattner
8ed56b8c48
Fix Transforms/GlobalOpt/2007-05-13-Crash.ll
...
llvm-svn: 37020
2007-05-13 21:28:07 +00:00
Anton Korobeynikov
ad0dd14386
Emit function debug frames in one atom. This will prevent us from generating incorrect assembler in case of both
...
debug information & exception information presented.
llvm-svn: 37019
2007-05-13 17:30:11 +00:00
Anton Korobeynikov
100919126f
Emit multiple common EH frames for multiple (including blank) personality
...
functions. This partly fixes PR1414: now we're restricted only to one
personality function per eh frame, not per module. Further work on
"multiple personalities" topic needs representative example.
llvm-svn: 37018
2007-05-13 15:42:26 +00:00
Anton Korobeynikov
7daaf71b29
More DWARF-related things cleanup:
...
1. Fix PR1380
2. Apply Duncan's patch from PR1410
3. Insert workaround for "one personality function per module" as noted in PR1414
4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is
shown correctly, but arguments for function on top of stack are displayed incorrectly.
llvm-svn: 37015
2007-05-12 22:36:25 +00:00
Reid Spencer
8c2e0f85eb
Fix shl to produce the correct result when the bitwidth is > 64 and the
...
shift amount is 0. Previously this code would do a lshr by the bit width
which can lead to incorrect results.
llvm-svn: 37010
2007-05-12 18:01:57 +00:00
Reid Spencer
e7a70b7212
Get the size of auto arrays right, regardless of its changing size.
...
llvm-svn: 37006
2007-05-12 11:07:40 +00:00
Chris Lattner
fe54b2a495
allow partially materialized modules to be written out, which just strips out
...
the functions which haven't been read.
llvm-svn: 36999
2007-05-11 23:51:59 +00:00
Devang Patel
c611adb5b7
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049516.html
...
llvm-svn: 36998
2007-05-11 23:14:43 +00:00
Chris Lattner
119ece07be
significantly improve debug output of lsr
...
llvm-svn: 36996
2007-05-11 22:40:34 +00:00
Dan Gohman
03114bee5f
Update comments to say "vector" instead of "packed".
...
llvm-svn: 36995
2007-05-11 21:43:24 +00:00
Dan Gohman
167379e73a
Fix typos.
...
llvm-svn: 36994
2007-05-11 21:10:54 +00:00
Dan Gohman
2e4ac0dea5
This patch extends the LoopUnroll pass to be able to unroll loops
...
with unknown trip counts. This is left off by default, and a
command-line option enables it. It also begins to separate loop
unrolling into a utility routine; eventually it might be made usable
from other passes.
It currently works by inserting conditional branches between each
unrolled iteration, unless it proves that the trip count is a
multiple of a constant integer > 1, which it currently only does in
the rare case that the trip count expression is a Mul operator with
a ConstantInt operand. Eventually this information might be provided
by other sources, for example by a pass that peels/splits the loop
for this purpose.
llvm-svn: 36990
2007-05-11 20:53:41 +00:00
Chris Lattner
3936efb43b
fix regressions from my previous checking, including
...
Transforms/InstCombine/2006-12-08-ICmp-Combining.ll
llvm-svn: 36989
2007-05-11 16:58:45 +00:00
Anton Korobeynikov
5754e67b1a
Perform correct actions numbers/sizes computation
...
llvm-svn: 36988
2007-05-11 08:47:35 +00:00
Anton Korobeynikov
2d2a44b71f
Fix action No calculation in multiple-invoke-one-LP mode
...
llvm-svn: 36987
2007-05-11 08:23:57 +00:00
Chris Lattner
f7adc33cbd
fix Transforms/InstCombine/2007-05-10-icmp-or.ll
...
llvm-svn: 36984
2007-05-11 05:55:56 +00:00
Chris Lattner
b601311b07
fix a memory leak
...
llvm-svn: 36981
2007-05-11 00:43:26 +00:00
Chris Lattner
044aaca356
Fix a bug where the bcreader could crash on .bc files that were an exact
...
multiple of the page size, due to a bug in MappedFile
llvm-svn: 36980
2007-05-11 00:00:27 +00:00
Dale Johannesen
2f28ffc5fd
Do not generate branches to entry block. This fixes several test suite
...
failures on PPC (can happen only when prologue code is null)
llvm-svn: 36979
2007-05-10 23:59:23 +00:00
Anton Korobeynikov
5ba99a95e8
Ooops. Some debugging stuff :)
...
llvm-svn: 36978
2007-05-10 22:38:46 +00:00
Anton Korobeynikov
0a29b65e0c
Allow multiple invokes per landing pad. This (probably) fixes PR1410.
...
llvm-svn: 36977
2007-05-10 22:34:59 +00:00
Duncan Sands
828ef09f10
Later computations assume we are aligned at this point.
...
llvm-svn: 36975
2007-05-10 18:40:24 +00:00
Anton Korobeynikov
a25bb3a0ff
TypeIds are indexed by j, not i
...
llvm-svn: 36974
2007-05-10 15:10:34 +00:00
Dale Johannesen
4f9661688c
Make tail merging handle many more cases (all it can, I think).
...
llvm-svn: 36966
2007-05-10 01:01:49 +00:00
Chris Lattner
96e9e88590
add some notes
...
llvm-svn: 36965
2007-05-10 00:08:04 +00:00
Evan Cheng
649f25dad1
Can't fold the bit_convert is the store is a truncating store.
...
llvm-svn: 36962
2007-05-09 21:49:47 +00:00
Anton Korobeynikov
4423f1a3fd
Do not assert, when case range split metric is zero and JTs are not allowed: just emit binary tree in this case. This
...
fixes PR1403.
llvm-svn: 36959
2007-05-09 20:07:08 +00:00
Devang Patel
1f12d0b50c
Fix PR1333
...
Testcases :
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049451.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049452.html
llvm-svn: 36955
2007-05-09 08:24:12 +00:00
Evan Cheng
73abcaa525
Switch BCC, MOVCCr, etc. to PredicateOperand.
...
llvm-svn: 36948
2007-05-08 21:08:43 +00:00
Evan Cheng
4dd52e052f
PredicateOperand can be used as a normal operand for isel.
...
llvm-svn: 36947
2007-05-08 21:06:08 +00:00
Bill Wendling
a5f8cb0805
Change names from RA to something unique to get rid of naming conflicts with
...
certain linkers...
llvm-svn: 36944
2007-05-08 19:02:46 +00:00
Evan Cheng
855b26b72e
Eliminate MarkVirtRegAliveInBlock recursion.
...
llvm-svn: 36943
2007-05-08 19:00:00 +00:00
Evan Cheng
6a0b99b9f8
R0 is a sub-register of X0, etc.
...
llvm-svn: 36939
2007-05-08 17:03:51 +00:00
Dan Gohman
7459c19c81
Fix various whitespace inconsistencies.
...
llvm-svn: 36936
2007-05-08 15:19:19 +00:00
Dan Gohman
e9789171b0
Correct the comment for ApproximateLoopSize to reflect what it actually does.
...
llvm-svn: 36935
2007-05-08 15:14:19 +00:00
Chris Lattner
062b15b7cc
Make a preemptive bitcode format change to support PR1146. This lets us do
...
pr1146 in llvm 2.1 without ugly code to emulate old behavior. This should
be merged into the 2.0 release branch.
llvm-svn: 36928
2007-05-08 05:38:01 +00:00
Dale Johannesen
842aef302e
Don't generate branch to entry block.
...
llvm-svn: 36917
2007-05-08 01:01:04 +00:00
Lauro Ramos Venancio
4f648c68cd
Fix PR1390 in a better way.
...
llvm-svn: 36916
2007-05-07 23:15:16 +00:00
Evan Cheng
e18b87868d
Forgot a check.
...
llvm-svn: 36910
2007-05-07 21:36:06 +00:00
Evan Cheng
a949d165ee
This is no longer needed after enabling the DAG combiner xform.
...
llvm-svn: 36909
2007-05-07 21:29:41 +00:00
Evan Cheng
18d994d6d6
Enable a couple of xforms:
...
- (store (bitconvert v)) -> (store v) if resultant store does not require
higher alignment
- (bitconvert (load v)) -> (load (bitconvert*)v) if resultant load does not
require higher alignment
llvm-svn: 36908
2007-05-07 21:27:48 +00:00
Dale Johannesen
c884abe112
Handle some non-exit blocks in tail merging.
...
llvm-svn: 36907
2007-05-07 20:57:21 +00:00
Duncan Sands
20a9ed0e20
Parameter attributes on invoke calls were being lost due to the wrong
...
attribute index being used. Fix proposed by Anton Korobeynikov, who
asked me to implement and commit it for him. This is PR1398.
llvm-svn: 36906
2007-05-07 20:49:28 +00:00
Jeff Cohen
2e8263c013
Unbreak VC++ build.
...
llvm-svn: 36901
2007-05-07 15:21:46 +00:00
Chris Lattner
112d26a164
Enhance MemoryBuffer to return error messages in strings if they occur.
...
llvm-svn: 36899
2007-05-06 23:32:36 +00:00
Chris Lattner
8e9063c571
Fix PR1395, by passing the ID correctly
...
llvm-svn: 36894
2007-05-06 23:13:56 +00:00
Chris Lattner
50214d1447
add this back
...
llvm-svn: 36892
2007-05-06 20:31:17 +00:00
Anton Korobeynikov
3765489a61
Detabify
...
llvm-svn: 36891
2007-05-06 20:14:21 +00:00
Anton Korobeynikov
dda2087b65
Update MSIL BE. This patch fixes most weird glitches outlined in
...
README.txt. Patch by Roman Samoilov!
llvm-svn: 36890
2007-05-06 20:13:33 +00:00
Chris Lattner
c38f488a16
lib/Bytecode is dead
...
llvm-svn: 36889
2007-05-06 19:51:20 +00:00
Chris Lattner
540930c18f
move this to lib/Archive
...
llvm-svn: 36888
2007-05-06 19:50:53 +00:00
Chris Lattner
d44d4aa93f
build lib/Archive instead of lib/Bytecode
...
llvm-svn: 36887
2007-05-06 19:50:06 +00:00
Chris Lattner
5fc47d5385
adjust this to live in lib/Archive
...
llvm-svn: 36886
2007-05-06 19:49:28 +00:00
Chris Lattner
37e8034ef8
remove bytecode reader
...
llvm-svn: 36882
2007-05-06 19:42:57 +00:00
Chris Lattner
a5a46fd5f3
remove the old bc writer
...
llvm-svn: 36881
2007-05-06 19:33:40 +00:00
Chris Lattner
6056636de8
fix off-by-one that caused the llvm2cpp test to fail
...
llvm-svn: 36880
2007-05-06 19:27:46 +00:00
Chris Lattner
dc7a11940e
Flush the file after writing bitcode so that clients who don't close their
...
ofstreams will be ok.
llvm-svn: 36878
2007-05-06 19:19:23 +00:00
Chris Lattner
4dca43cc6d
remove this file for now, we can bring it back from cvs if we need it in
...
the future (and integrate it with membuffer, etc)
llvm-svn: 36876
2007-05-06 19:10:47 +00:00
Chris Lattner
71eb8d5e89
remove libbzip2, it is dead
...
llvm-svn: 36875
2007-05-06 19:05:34 +00:00
Nick Lewycky
c2306ff5b4
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Chris Lattner
5bd1b5b32d
don't build bzip2 for now
...
llvm-svn: 36871
2007-05-06 09:31:32 +00:00
Chris Lattner
5f94a8492f
disable this for now
...
llvm-svn: 36870
2007-05-06 09:31:06 +00:00
Chris Lattner
f9a6121339
don't build bcreader/bcwriter
...
llvm-svn: 36869
2007-05-06 09:30:31 +00:00
Chris Lattner
c684dbdb6b
switch this to bitcode instead of bytecode
...
llvm-svn: 36867
2007-05-06 09:29:13 +00:00
Chris Lattner
da078a7c60
Switch this over to bitcode instead of bytecode.
...
llvm-svn: 36866
2007-05-06 09:28:33 +00:00
Chris Lattner
af0a11cd65
Fix a nasty problem where we would miss enumeration of some types. This fixes
...
issues with CE_CAST etc.
llvm-svn: 36864
2007-05-06 08:35:19 +00:00
Chris Lattner
0c204417b2
Allow structs with zero fields.
...
llvm-svn: 36862
2007-05-06 08:21:50 +00:00
Bill Wendling
88e78f8bdb
3DNowA implies 3DNow. 64-bit implies SSE1, SSE2, and I assume MMX.
...
llvm-svn: 36860
2007-05-06 07:56:19 +00:00
Chris Lattner
8b0bda0104
add a missing check
...
llvm-svn: 36859
2007-05-06 07:33:01 +00:00
Chris Lattner
9fa29b4027
Fix MemoryBuffer::getFile to return null if it has an error opening the
...
file instead of aborting.
llvm-svn: 36858
2007-05-06 07:24:46 +00:00
Chris Lattner
619ffa3881
Fix a bug in my previous patch
...
llvm-svn: 36857
2007-05-06 07:24:03 +00:00
Chris Lattner
38eeedc621
add bitcode support
...
llvm-svn: 36856
2007-05-06 06:18:07 +00:00
Chris Lattner
c0fa93d591
add bitcode support
...
llvm-svn: 36855
2007-05-06 06:02:13 +00:00
Chris Lattner
342010d9f3
pull some win32 code into common code, add bitcode identification support.
...
llvm-svn: 36846
2007-05-06 05:32:21 +00:00
Chris Lattner
8394ded8eb
teach this to read from bitcode files
...
llvm-svn: 36843
2007-05-06 05:18:53 +00:00
Nate Begeman
f496eb7607
Reference correct header
...
llvm-svn: 36834
2007-05-06 04:00:55 +00:00
Jeff Cohen
64156becaa
Keep header file free of 'possible loss of data' warnings.
...
llvm-svn: 36832
2007-05-06 03:23:14 +00:00
Jeff Cohen
ce844b2aaa
Unbreak VC++.
...
llvm-svn: 36831
2007-05-06 03:12:47 +00:00
Chris Lattner
ad8aadac37
add abbrevs for binops and casts. This shrinks a testcase from 725132->682500
...
bytes.
llvm-svn: 36829
2007-05-06 02:38:57 +00:00
Chris Lattner
bf23240f44
add a new CreateBitcodeWriterPass method, which creates a bitcode writer as
...
a pass
llvm-svn: 36828
2007-05-06 02:30:12 +00:00
Chris Lattner
7eb319ab65
implement reading/writing of inlineasm objects
...
llvm-svn: 36827
2007-05-06 01:58:20 +00:00
Chris Lattner
0505a9f632
add some abbrevs for ret and unreachable, shrinking kc++ from 2717360->2705388
...
llvm-svn: 36823
2007-05-06 01:28:01 +00:00
Chris Lattner
50460e7c48
enumerate the operands of a constant before we enumerate the constant itself
...
This avoids fwd references in the reader.
llvm-svn: 36822
2007-05-06 01:00:28 +00:00
Chris Lattner
6d0c5eb739
add a denser encoding for null terminated strings, add a 6-bit abbrev as
...
well. This shrinks kc++ from 2724088 to 2717360 bytes.
llvm-svn: 36821
2007-05-06 00:53:07 +00:00
Chris Lattner
63002bb235
add an abbreviation for the string constants opzn, shrinking the constnats
...
block from:
Block ID #11 (CONSTANTS_BLOCK):
Num Instances: 1722
Total Size: 3.85976e+06b/482470B/120617W
% of file: 16.7609
Average Size: 2241.44b/280.18B/70.045W
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 1/0.00058072
Tot/Avg Records: 26423/15.3444
% Abbrev Recs: 69.1746
to:
Block ID #11 (CONSTANTS_BLOCK):
Num Instances: 1724
Total Size: 2.62406e+06b/328008B/82001.9W
% of file: 12.041
Average Size: 1522.08b/190.26B/47.5649W
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 2/0.00116009
Tot/Avg Records: 26280/15.2436
% Abbrev Recs: 68.9992
This shrinks kc++ from 2815788 to 2724088 bytes, which means the bitcode
file is now smaller than the bytecode file.
llvm-svn: 36820
2007-05-06 00:42:18 +00:00
Chris Lattner
34b256e1a6
implement the 'string constant' optimization. This shrinks kc.bit from
...
2878544 to 2815788
llvm-svn: 36818
2007-05-06 00:35:24 +00:00
Chris Lattner
9df45744b0
further reduce the redundancy of types in the instruction encoding. This
...
shrinks function bodies in kc++ from 891913B to 884073B
llvm-svn: 36817
2007-05-06 00:21:25 +00:00
Chris Lattner
32d91f39ca
stop encoding type/value pairs when the type is implied by the value.
...
This shrinks the function block of kc++ from 1055K to 906K
llvm-svn: 36816
2007-05-06 00:00:00 +00:00
Chris Lattner
8070a25149
handle gep aliasee
...
llvm-svn: 36815
2007-05-05 23:49:02 +00:00
Lauro Ramos Venancio
236cf4a51b
Fix PR1390.
...
Don't spill extra register to align the stack.
llvm-svn: 36814
2007-05-05 23:44:41 +00:00
Chris Lattner
272510387e
add a note
...
llvm-svn: 36811
2007-05-05 22:44:08 +00:00
Chris Lattner
26c55e2dda
Implement Transforms/InstCombine/cast_ptr.ll
...
llvm-svn: 36809
2007-05-05 22:41:33 +00:00
Chris Lattner
46b06d19d4
wrap long lines
...
llvm-svn: 36807
2007-05-05 22:32:24 +00:00
Chris Lattner
0074283b61
the mason example is implemented. Move some examples out of llvm/test,
...
upgrade the syntax of some other examples.
llvm-svn: 36806
2007-05-05 22:29:06 +00:00
Chris Lattner
a13a7d375c
implement anyextend from i1 -> i64
...
llvm-svn: 36802
2007-05-05 22:17:00 +00:00