1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Mehdi Amini
c4181d4ac9 Bitcode reader: replace DecodeChar6() with a lookup table (NFC)
Summary: Measured to be more performant when reading bitcode.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16285

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260455
2016-02-10 22:47:48 +00:00
Alexander Kornienko
f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/


Thanks to Eugene Kosov for the original patch!

llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Benjamin Kramer
70b4ac9a5e Remove empty non-virtual destructors or mark them =default when non-public
These add no value but can make a class non-trivially copyable. NFC.

llvm-svn: 234688
2015-04-11 15:32:26 +00:00
Filipe Cabecinhas
47d5b20f32 Use report_fatal_error instead of llvm_unreachable, so we don't crash on user input
llvm-svn: 226248
2015-01-16 04:54:12 +00:00
Benjamin Kramer
4074d3de25 Spell out the template args for compilers having issues with the injected class
name.

llvm-svn: 217780
2014-09-15 16:13:33 +00:00
Benjamin Kramer
0157ffa1ec Use IntrusiveRefCntPtr to manage the lifetime of BitCodeAbbrevs.
This doesn't change the interface or gives additional safety but removes
a ton of retain/release boilerplate.

No functionality change.

llvm-svn: 217778
2014-09-15 15:44:14 +00:00
Joe Abbey
87ea4ece75 Code Custodian:
- Widespread trailing space removal
  - A dash of OCD spacing to block align enums
  - joined a line that probably needed 80 cols a while back

llvm-svn: 168566
2012-11-25 15:23:39 +00:00
Benjamin Kramer
0226d184ca Enable the small vector POD optimization for BitCodeAbbrevOp.
While at it bump the small vector size a bit, it's inside a heap-allocated class.

llvm-svn: 151980
2012-03-03 15:04:13 +00:00
Craig Topper
e18a06be4d Convert assert(0) to llvm_unreachable
llvm-svn: 149849
2012-02-05 22:14:15 +00:00
Chandler Carruth
2a6b59a693 Add 'llvm_unreachable' to passify GCC's understanding of the constraints
of several newly un-defaulted switches. This also helps optimizers
(including LLVM's) recognize that every case is covered, and we should
assume as much.

llvm-svn: 147861
2012-01-10 18:08:01 +00:00
David Blaikie
8d47bb30e3 Remove unnecessary default cases in switches that cover all enum values.
llvm-svn: 147855
2012-01-10 16:47:17 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Chris Lattner
f84ee5d944 Add two new record types to the blockinfo block:
BLOCKNAME and SETRECORDNAME.  This allows a bitcode
file to be self describing with pretty names for 
records and blocks in addition to numbers.  This
enhances llvm-bcanalyzer to use this to print prettily.

llvm-svn: 70165
2009-04-26 22:21:57 +00:00
Chris Lattner
ce9fec457b fix comment to reflect the implementation I ended up settling on.
Thanks to Duncan for noticing this

llvm-svn: 68518
2009-04-07 16:30:31 +00:00
Chris Lattner
ac7e143979 add a new Blob encoding abbreviation for bitcode files that emits
elements in a form that is efficient for the reader to just get a
pointer in memory and start reading.  APIs to do efficient reading
and writing are still todo.

llvm-svn: 68465
2009-04-06 21:50:39 +00:00
Misha Brukman
5cfd666bde Removed trailing whitespace.
llvm-svn: 65199
2009-02-20 23:04:06 +00:00
Zhongxing Xu
b187adcf5a Fix a calculation error in comments.
llvm-svn: 57619
2008-10-16 01:21:44 +00:00
Evan Cheng
d9353009b7 Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Dan Gohman
7fa473514d Add explicit keywords.
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
Jeff Cohen
ce844b2aaa Unbreak VC++.
llvm-svn: 36831
2007-05-06 03:12:47 +00:00
Chris Lattner
cedc5577f2 add a 6-bit encoding type for strings.
llvm-svn: 36770
2007-05-05 01:15:42 +00:00
Chris Lattner
eca2bb1334 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 :)

llvm-svn: 36767
2007-05-05 00:17:00 +00:00
Chris Lattner
75b84adf6b add support for array abbreviations.
llvm-svn: 36754
2007-05-04 20:33:47 +00:00
Chris Lattner
4e0c6003b7 minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCK
block type.

llvm-svn: 36748
2007-05-04 18:25:49 +00:00
Chris Lattner
f0086ffafa refcount BitCodeAbbrev objects
llvm-svn: 36747
2007-05-04 17:35:19 +00:00
Chris Lattner
5510ac5a56 first part of implementation of abbrevs. The writer isn't fully there yet and the
reader doesn't handle them at all yet.

llvm-svn: 36363
2007-04-23 16:04:05 +00:00
Chris Lattner
97852839f7 Define the content-independent interfaces to read/write bitcode files and
the high-level interface to read/write LLVM IR bitcode files.

This is a work in progress.

llvm-svn: 36329
2007-04-22 06:22:05 +00:00