Commit Graph

32365 Commits

Author SHA1 Message Date
Chris Lattner 15273e4d91 Switch this over to bitcode instead of bytecode.
llvm-svn: 36866
2007-05-06 09:28:33 +00:00
Chris Lattner c9c5d3eed8 Move this here from Bytecode/Archive.h
llvm-svn: 36865
2007-05-06 09:14:53 +00:00
Chris Lattner 76fd90fb61 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 4492f73eb4 allow zero-length arrays
llvm-svn: 36863
2007-05-06 08:22:10 +00:00
Chris Lattner 3c5616ee12 Allow structs with zero fields.
llvm-svn: 36862
2007-05-06 08:21:50 +00:00
Chris Lattner eb99789fef we aren't at the end of stream until we've consumed all the bytes AND all
the bits in those bytes.

llvm-svn: 36861
2007-05-06 08:12:09 +00:00
Bill Wendling f985c492e1 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 a77bb942a2 add a missing check
llvm-svn: 36859
2007-05-06 07:33:01 +00:00
Chris Lattner 5db36d3d82 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 9b35b3e863 Fix a bug in my previous patch
llvm-svn: 36857
2007-05-06 07:24:03 +00:00
Chris Lattner 1ca28f8a90 add bitcode support
llvm-svn: 36856
2007-05-06 06:18:07 +00:00
Chris Lattner a0e5f01e23 add bitcode support
llvm-svn: 36855
2007-05-06 06:02:13 +00:00
Chris Lattner 8279f7e3c2 this doesn't directly depend on bytecode
llvm-svn: 36854
2007-05-06 05:58:00 +00:00
Chris Lattner e542042f8d add bitcode support.
llvm-svn: 36853
2007-05-06 05:56:58 +00:00
Chris Lattner b52f3aac73 archive library already depends on bc reader
llvm-svn: 36852
2007-05-06 05:53:02 +00:00
Chris Lattner e74845f075 add bitcode support, optimize reading to not read all function bodies just
to get deplibs

llvm-svn: 36851
2007-05-06 05:51:37 +00:00
Chris Lattner 957d090ed1 use an auto_ptr to avoid an explicit delete
llvm-svn: 36850
2007-05-06 05:47:36 +00:00
Chris Lattner f6dd4d7fca add bitcode support
llvm-svn: 36849
2007-05-06 05:47:06 +00:00
Chris Lattner adc9e30a72 Remove the -emit-bytecode option. Noone in the llvm tree uses it, and this
keeps llvm-upgrade a simple "source to source" tool.

llvm-svn: 36848
2007-05-06 05:40:41 +00:00
Chris Lattner ef8f389e08 add bitcode reading support to llvm-nm
llvm-svn: 36847
2007-05-06 05:36:18 +00:00
Chris Lattner 4a4499b69e pull some win32 code into common code, add bitcode identification support.
llvm-svn: 36846
2007-05-06 05:32:21 +00:00
Chris Lattner 963a255853 add support for identifying bitcode files
llvm-svn: 36845
2007-05-06 05:30:10 +00:00
Chris Lattner 99016c3f2d bitcodify, remove eh cruft
llvm-svn: 36844
2007-05-06 05:21:42 +00:00
Chris Lattner b94d80b6fb teach this to read from bitcode files
llvm-svn: 36843
2007-05-06 05:18:53 +00:00
Chris Lattner cdda3a4ae5 debugger depends on bcreader, not llvm-db
llvm-svn: 36842
2007-05-06 05:18:37 +00:00
Chris Lattner 27936994bd remove EH cruft, add bitcode support
llvm-svn: 36841
2007-05-06 05:13:17 +00:00
Chris Lattner 2785bdbefd add bitcode reading support, remove eh stuff
llvm-svn: 36840
2007-05-06 04:58:26 +00:00
Chris Lattner 6dd290ad3d add bitcode reading support. Remove EH cruft.
llvm-svn: 36839
2007-05-06 04:55:19 +00:00
Chris Lattner 6147489a09 bitcodify
llvm-svn: 36838
2007-05-06 04:49:55 +00:00
Chris Lattner f693167d68 simplify code
llvm-svn: 36837
2007-05-06 04:43:36 +00:00
Chris Lattner c424ba7ebd add support to llvm-prof for reading from a bitcode file
llvm-svn: 36836
2007-05-06 04:43:00 +00:00
Chris Lattner 7284541754 Add a helper that either opens a file or stdin.
llvm-svn: 36835
2007-05-06 04:41:59 +00:00
Nate Begeman 4060c7ac63 Reference correct header
llvm-svn: 36834
2007-05-06 04:00:55 +00:00
Jeff Cohen 53555de8f2 Make code more 64-bit aware.
llvm-svn: 36833
2007-05-06 03:24:19 +00:00
Jeff Cohen fd73e54ef8 Keep header file free of 'possible loss of data' warnings.
llvm-svn: 36832
2007-05-06 03:23:14 +00:00
Jeff Cohen b3f36d48c6 Unbreak VC++.
llvm-svn: 36831
2007-05-06 03:12:47 +00:00
Chris Lattner 0f49a6fe89 if -bitcode is specified, read and write a bitcode file instead of a bytecode file.
llvm-svn: 36830
2007-05-06 02:42:03 +00:00
Chris Lattner c67e6d9d16 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 7ef417107b 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 af8fffc081 implement reading/writing of inlineasm objects
llvm-svn: 36827
2007-05-06 01:58:20 +00:00
Chris Lattner 19f599471c add inline asm code
llvm-svn: 36826
2007-05-06 01:50:11 +00:00
Chris Lattner 251d0a3adb Fix a subtle bug that prevented round-tripping 470.lbm
llvm-svn: 36825
2007-05-06 01:43:38 +00:00
Reid Spencer cfb3f8b53a Make my credits refer to my wiki page.
llvm-svn: 36824
2007-05-06 01:30:17 +00:00
Chris Lattner cc6d4c9fc2 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 9ee4836dde 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 f25f710c4d 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 4b6ce8fa59 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
Lauro Ramos Venancio 941fd97361 Add myself.
llvm-svn: 36819
2007-05-06 00:41:36 +00:00
Chris Lattner 036d1bddf2 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 e9759c29d1 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