Commit Graph

18878 Commits

Author SHA1 Message Date
Chris Lattner
0f1621bb4c add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36965 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-10 00:08:04 +00:00
Evan Cheng
2c4f94363a Can't fold the bit_convert is the store is a truncating store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-09 21:49:47 +00:00
Anton Korobeynikov
7294b58ecd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-09 20:07:08 +00:00
Devang Patel
fd98dc9a76 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36955 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-09 08:24:12 +00:00
Evan Cheng
42d712b306 Switch BCC, MOVCCr, etc. to PredicateOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36948 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 21:08:43 +00:00
Evan Cheng
f88b3a5698 PredicateOperand can be used as a normal operand for isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36947 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 21:06:08 +00:00
Bill Wendling
e23e00ddea Change names from RA to something unique to get rid of naming conflicts with
certain linkers...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 19:02:46 +00:00
Evan Cheng
56184904cd Eliminate MarkVirtRegAliveInBlock recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36943 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 19:00:00 +00:00
Evan Cheng
43182ac0d6 R0 is a sub-register of X0, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 17:03:51 +00:00
Dan Gohman
1cc0096d55 Fix various whitespace inconsistencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36936 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 15:19:19 +00:00
Dan Gohman
f742c2363c Correct the comment for ApproximateLoopSize to reflect what it actually does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 15:14:19 +00:00
Chris Lattner
a9bb713130 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36928 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 05:38:01 +00:00
Dale Johannesen
6603a1bff0 Don't generate branch to entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 01:01:04 +00:00
Lauro Ramos Venancio
356e72c4f1 Fix PR1390 in a better way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 23:15:16 +00:00
Evan Cheng
c2cd2b29f5 Forgot a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36910 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 21:36:06 +00:00
Evan Cheng
c4e600362e This is no longer needed after enabling the DAG combiner xform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 21:29:41 +00:00
Evan Cheng
59d5b68dff 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 21:27:48 +00:00
Dale Johannesen
7d33b4c59b Handle some non-exit blocks in tail merging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 20:57:21 +00:00
Duncan Sands
4fee7034d5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 20:49:28 +00:00
Jeff Cohen
0fea8ebb4a Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36901 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-07 15:21:46 +00:00
Chris Lattner
5499da8833 Enhance MemoryBuffer to return error messages in strings if they occur.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 23:32:36 +00:00
Chris Lattner
1ce6f8da72 Fix PR1395, by passing the ID correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36894 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 23:13:56 +00:00
Chris Lattner
31c2ec3afb add this back
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36892 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 20:31:17 +00:00
Anton Korobeynikov
b682448ebd Detabify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36891 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 20:14:21 +00:00
Anton Korobeynikov
f13090c436 Update MSIL BE. This patch fixes most weird glitches outlined in
README.txt. Patch by Roman Samoilov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36890 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 20:13:33 +00:00
Chris Lattner
f527cbb0f4 lib/Bytecode is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36889 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:51:20 +00:00
Chris Lattner
38a5f74882 move this to lib/Archive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:50:53 +00:00
Chris Lattner
6593380c0e build lib/Archive instead of lib/Bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36887 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:50:06 +00:00
Chris Lattner
d61070e3ce adjust this to live in lib/Archive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36886 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:49:28 +00:00
Chris Lattner
a066e378e9 remove bytecode reader
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36882 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:42:57 +00:00
Chris Lattner
b11f1a9ee1 remove the old bc writer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36881 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:33:40 +00:00
Chris Lattner
5f32c01dea fix off-by-one that caused the llvm2cpp test to fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36880 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:27:46 +00:00
Chris Lattner
4eab2e57f9 Flush the file after writing bitcode so that clients who don't close their
ofstreams will be ok.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:19:23 +00:00
Chris Lattner
9e66233361 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36876 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:10:47 +00:00
Chris Lattner
d6f595946d remove libbzip2, it is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:05:34 +00:00
Nick Lewycky
ecd94c804a Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 13:37:16 +00:00
Chris Lattner
73a978a753 don't build bzip2 for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36871 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:31:32 +00:00
Chris Lattner
dfa8d8c6ee disable this for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36870 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:31:06 +00:00
Chris Lattner
beb4cb696d don't build bcreader/bcwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36869 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:30:31 +00:00
Chris Lattner
4bcca0f2ac switch this to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36867 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:29:13 +00:00
Chris Lattner
c1d5624d71 Switch this over to bitcode instead of bytecode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:28:33 +00:00
Chris Lattner
33f1d5b328 Fix a nasty problem where we would miss enumeration of some types. This fixes
issues with CE_CAST etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36864 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 08:35:19 +00:00
Chris Lattner
7108dce324 Allow structs with zero fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36862 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 08:21:50 +00:00
Bill Wendling
11d8fdaf6a 3DNowA implies 3DNow. 64-bit implies SSE1, SSE2, and I assume MMX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36860 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 07:56:19 +00:00
Chris Lattner
bfcc38040b add a missing check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 07:33:01 +00:00
Chris Lattner
82e791dc42 Fix MemoryBuffer::getFile to return null if it has an error opening the
file instead of aborting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 07:24:46 +00:00
Chris Lattner
6f6f5125e2 Fix a bug in my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 07:24:03 +00:00
Chris Lattner
e07c15c734 add bitcode support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 06:18:07 +00:00
Chris Lattner
1a019e5ffd add bitcode support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36855 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 06:02:13 +00:00
Chris Lattner
f283a5e53a pull some win32 code into common code, add bitcode identification support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36846 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:32:21 +00:00
Chris Lattner
2cb1ad92d1 teach this to read from bitcode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36843 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:18:53 +00:00
Nate Begeman
9a22530696 Reference correct header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 04:00:55 +00:00
Jeff Cohen
650c938c41 Keep header file free of 'possible loss of data' warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36832 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 03:23:14 +00:00
Jeff Cohen
332376bc60 Unbreak VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 03:12:47 +00:00
Chris Lattner
f9f2e83170 add abbrevs for binops and casts. This shrinks a testcase from 725132->682500
bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36829 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 02:38:57 +00:00
Chris Lattner
e8e1e4bf8a add a new CreateBitcodeWriterPass method, which creates a bitcode writer as
a pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36828 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 02:30:12 +00:00
Chris Lattner
2bce93a2ae implement reading/writing of inlineasm objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36827 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 01:58:20 +00:00
Chris Lattner
94687acd21 add some abbrevs for ret and unreachable, shrinking kc++ from 2717360->2705388
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36823 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 01:28:01 +00:00
Chris Lattner
7a303d1591 enumerate the operands of a constant before we enumerate the constant itself
This avoids fwd references in the reader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36822 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 01:00:28 +00:00
Chris Lattner
cb3d91b05b add a denser encoding for null terminated strings, add a 6-bit abbrev as
well.  This shrinks kc++ from 2724088 to 2717360 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36821 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:53:07 +00:00
Chris Lattner
817f08a0e5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36820 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:42:18 +00:00
Chris Lattner
ff7fc5dabe implement the 'string constant' optimization. This shrinks kc.bit from
2878544 to 2815788


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36818 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:35:24 +00:00
Chris Lattner
abfbf85004 further reduce the redundancy of types in the instruction encoding. This
shrinks function bodies in kc++ from 891913B to 884073B


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36817 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:21:25 +00:00
Chris Lattner
7337ab9e92 stop encoding type/value pairs when the type is implied by the value.
This shrinks the function block of kc++ from 1055K to 906K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36816 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 00:00:00 +00:00
Chris Lattner
2bf6e6a632 handle gep aliasee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36815 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 23:49:02 +00:00
Lauro Ramos Venancio
8f57667a5d Fix PR1390.
Don't spill extra register to align the stack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36814 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 23:44:41 +00:00
Chris Lattner
f110a2bdb6 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36811 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 22:44:08 +00:00
Chris Lattner
8c756c1fff Implement Transforms/InstCombine/cast_ptr.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36809 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 22:41:33 +00:00
Chris Lattner
d717c1859a wrap long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36807 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 22:32:24 +00:00
Chris Lattner
5e14b0d3e6 the mason example is implemented. Move some examples out of llvm/test,
upgrade the syntax of some other examples.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36806 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 22:29:06 +00:00
Chris Lattner
0d75f57f75 implement anyextend from i1 -> i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36802 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 22:17:00 +00:00
Chris Lattner
0258011bb9 move CodeGen/X86/overlap-add.ll here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36799 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 22:10:24 +00:00
Duncan Sands
3194f57541 Use the personality function that was registered with MMI rather than
hardwiring in the C++ one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36789 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 20:27:00 +00:00
Chris Lattner
b464c44679 Propagate alignment/volatility in two places.
Implement support for expanding a bitcast from an illegal vector type to
a legal one (e.g. 4xi32 -> 4xf32 in SSE1).  This fixes PR1371 and
CodeGen/X86/2007-05-05-VecCastExpand.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 19:39:05 +00:00
Chris Lattner
3f7998054a add support for BLOCKINFO records at the module level. This fixes the reader
issues reid noticed last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36785 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 18:57:30 +00:00
Chris Lattner
caccc996e2 Fix Transforms/LoopUnroll/2007-05-05-UnrollMiscomp.ll and PR1385.
If we have a LCSSA, only modify the input value if the inval was defined
by an instruction in the loop.  If defined by something before the loop,
it is still valid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36784 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 18:49:57 +00:00
Chris Lattner
a0c54f3ada make a temporary for *SI, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36782 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 18:36:36 +00:00
Duncan Sands
01dfdcd84b Spelling fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36781 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 16:32:57 +00:00
Anton Korobeynikov
2a07e2f4df Emit sections/directives in the proper order. This fixes PR1376. Also,
some small cleanup was made.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36780 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 09:04:50 +00:00
Chris Lattner
440168b00e add an abbrev for loads. This shrinks the function block about 50K, from:
Block ID #12 (FUNCTION_BLOCK):
      Num Instances: 2344
         Total Size: 8.8434e+06b/1.10542e+06B/276356W
          % of file: 35.6726
       Average Size: 3772.78b/471.598B/117.899W
  Tot/Avg SubBlocks: 4065/1.73422
    Tot/Avg Abbrevs: 0/0
    Tot/Avg Records: 128487/54.8153
      % Abbrev Recs: 0

to:

 Block ID #12 (FUNCTION_BLOCK):
      Num Instances: 2344
         Total Size: 8.44518e+06b/1.05565e+06B/263912W
          % of file: 34.6203
       Average Size: 3602.89b/450.362B/112.59W
  Tot/Avg SubBlocks: 4065/1.73422
    Tot/Avg Abbrevs: 0/0
    Tot/Avg Records: 128487/54.8153
      % Abbrev Recs: 22.2077


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36779 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 07:44:49 +00:00
Chris Lattner
a0f1ecc45e add abbrevs for the constants tables. This shrinks it from 4.49755e6 bits
to 3.85972e6 bits in kc++


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36778 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 07:36:14 +00:00
Chris Lattner
d092e0e18f Add abbreviations to the TYPE_BLOCK for pointers, functions, structs and arrays.
This shrinks the type_block of kc++ from 139901 bits to 99389 bits (0.55% to 0.39%
of the file), a 40% reduction.

This shrink the record from:

  Block ID #10 (TYPE_BLOCK):
      Num Instances: 1
         Total Size: 139901b/17487.6B/4371.91W
          % of file: 0.549306
        Num Abbrevs: 0
        Num Records: 3203
      % Abbrev Recs: 0

to:

  Block ID #10 (TYPE_BLOCK):
      Num Instances: 1
         Total Size: 99389b/12423.6B/3105.91W
          % of file: 0.390862
        Num Abbrevs: 4
        Num Records: 3203
      % Abbrev Recs: 99.6566

With a common histogram of:

       Code Histogram:
                1613    POINTER
                1100    FUNCTION
                255     STRUCT
                224     ARRAY
                5       INTEGER
                2       OPAQUE
                1       LABEL
                1       DOUBLE
                1       VOID
                1       NUMENTRY


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 06:30:12 +00:00
Chris Lattner
c42e226f08 Fix InstCombine/2007-05-04-Crash.ll and PR1384
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36775 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 01:59:31 +00:00
Chris Lattner
ff294a4e1e add a char6 abbrev for bbnames and value names. This represents each character
with 6 bits where possible.  This shrinks kc++ from 3324164B to 3183584B.  The
old VST was:

  Block ID #14 (VALUE_SYMTAB):
         Total Size: 1.26713e+07b/1.58391e+06B/395978W
       Average Size: 5403.53b/675.442B/168.86W
          % of file: 47.6484

The new one is:

  Block ID #14 (VALUE_SYMTAB):
         Total Size: 1.15467e+07b/1.44334e+06B/360834W
       Average Size: 4923.96b/615.495B/153.874W
          % of file: 45.3368

This is 11% smaller than the VST in the bytecode format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36771 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 01:26:50 +00:00
Chris Lattner
7a263ea859 add an abbreviation for the type symtab, this shrinks the TST from 175197 bits
to 103165 bits:

Old:
  Block ID #13 (TYPE_SYMTAB):
      Num Instances: 1
         Total Size: 175197b/21899.6B/5474.91W
       Average Size: 175197b/21899.6B/5474.91W
          % of file: 0.657023
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 0/0
    Tot/Avg Records: 255/255
      % Abbrev Recs: 0

New:
  Block ID #13 (TYPE_SYMTAB):
      Num Instances: 1
         Total Size: 103165b/12895.6B/3223.91W
       Average Size: 103165b/12895.6B/3223.91W
          % of file: 0.387937
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 1/1
    Tot/Avg Records: 255/255
      % Abbrev Recs: 100


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36769 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 00:47:19 +00:00
Chris Lattner
e17b658c79 Implement support for globally associating abbrevs with block IDs, which
relieves us from having to emit the abbrevs into each instance of the block.
This shrinks kc.bit from 3368K to 3333K, but will be a more significant win
once instructions are abbreviated.

The VST went from:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.29508e+07b/1.61885e+06B/404713W
       Average Size: 5522.73b/690.342B/172.585W
          % of file: 48.0645
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 7035/3
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100

to:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.26713e+07b/1.58391e+06B/395978W
       Average Size: 5403.53b/675.442B/168.86W
          % of file: 47.5198
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 0/0
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100

because we didn't emit the same 3 abbrevs 2345 times :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36767 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-05 00:17:00 +00:00
Lauro Ramos Venancio
a8e9562906 Add a processor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36765 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 22:16:30 +00:00
Chris Lattner
fd1ae95b8f allow the 8-bit abbrev to be used for either bb or other values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36761 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 21:31:13 +00:00
Chris Lattner
2453f71ae1 shave another 150K off of kc++, by using a 7-bit encoding for BB names
where we can.  This shrinks kc++'s down to 3368K, with a VST record of:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.29508e+07b/1.61885e+06B/404713W
       Average Size: 5522.73b/690.342B/172.585W
          % of file: 48.0645
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 7035/3
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100

Isn't it nice to be able to optimizer bc size without touching the reader? :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36759 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 20:58:35 +00:00
Chris Lattner
5969830361 where possible, encode symtab names with 7 bits per char instead of 8. This
shaves 110K off kc++ to 3514K.  Before:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.50425e+07b/1.88031e+06B/470077W
       Average Size: 6414.69b/801.837B/200.459W
          % of file: 51.8057
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 2345/1
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 85.1791

after:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.41229e+07b/1.76536e+06B/441341W
       Average Size: 6022.56b/752.82B/188.205W
          % of file: 50.2295
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 4690/2
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 85.1791


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36758 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 20:52:02 +00:00
Bill Wendling
4222d806fa Add an "implies" field to features. This indicates that, if the current
feature is set, then the features in the implied list should be set also.
The opposite is also enforced: if a feature in the implied list isn't set,
then the feature that owns that implies list shouldn't be set either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36756 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 20:38:40 +00:00
Chris Lattner
2e7899dae9 Encode all value symtab strings as arrays of 8-bit fixed width integers,
instead of the default inefficient encoding.  This shrinks kc++ from 4134K
to 3629K


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36755 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 20:34:50 +00:00
Chris Lattner
15e6d170e8 eliminate internal length fields from record. Records already know their
total length


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 19:11:41 +00:00
Chris Lattner
07faafc8f9 stub out creation of BLOCKINFO_BLOCK
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36749 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 18:26:27 +00:00
Duncan Sands
3b346368de A bitcast of a global variable may have been constant folded to a GEP -
handle this case too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36745 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 17:12:26 +00:00
Dan Gohman
e5b01bea7b Use IntrinsicInst to test for prefetch instructions, which is ever so
slightly nicer than using CallInst with an extra check; thanks Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 14:59:09 +00:00
Chris Lattner
6da91d3c2c optimize constant layout. This fixes encoding of 181.mcf (by ensuring
integer structure idx's are emitted before constant expr geps) and shrinks
files slightly.  For example kc++ shrinks from 4326188 to 4240128 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36742 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 05:21:47 +00:00
Chris Lattner
12f535b937 simple optimization for the type table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 05:05:48 +00:00
Chris Lattner
39b2e8b56f regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36740 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 04:01:37 +00:00
Chris Lattner
dd3094a2a8 fix a bug where llvm-as couldn't assemble the .ll file for 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 04:01:07 +00:00