History log of /llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp (Results 801 – 825 of 1334)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d602c35e 28-Feb-2015 Yaron Keren <yaron.keren@gmail.com>

Silence three more variable set but not used warnings, NFC.

llvm-svn: 230853


Revision tags: llvmorg-3.6.0
# b5b5efd2 25-Feb-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer type] Bitcode support for explicit type parameter on GEP.

Like r230414, add bitcode support including backwards compatibility, for
an explicit type parameter to GEP.

At the suggesti

[opaque pointer type] Bitcode support for explicit type parameter on GEP.

Like r230414, add bitcode support including backwards compatibility, for
an explicit type parameter to GEP.

At the suggestion of Duncan I tried coalescing the two older bitcodes into a
single new bitcode, though I did hit a wrinkle: I couldn't figure out how to
create an explicit abbreviation for a record with a variable number of
arguments (the indicies to the gep). This means the discriminator between
inbounds and non-inbounds gep is a full variable-length field I believe? Is my
understanding correct? Is there a way to create such an abbreviation? Should I
just use two bitcodes as before?

Reviewers: dexonsmith

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

llvm-svn: 230415

show more ...


# 8503565e 25-Feb-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer type] bitcode support for explicit type parameter to the load instruction

Summary:
I've taken my best guess at this, but I've cargo culted in places & so
explanations/corrections wou

[opaque pointer type] bitcode support for explicit type parameter to the load instruction

Summary:
I've taken my best guess at this, but I've cargo culted in places & so
explanations/corrections would be great.

This seems to pass all the tests (check-all, covering clang and llvm) so I
believe that pretty well exercises both the backwards compatibility and common
(same version) compatibility given the number of checked in bitcode files we
already have. Is that a reasonable approach to testing here? Would some more
explicit tests be desired?

1) is this the right way to do back-compat in this case (looking at the number
of entries in the bitcode record to disambiguate between the old schema and
the new?)

2) I don't quite understand the logarithm logic to choose the encoding type of
the type parameter in the abbreviation description, but I found another
instruction doing the same thing & it seems to work. Is that the right
approach?

Reviewers: dexonsmith

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

llvm-svn: 230414

show more ...


# 30bf96bf 22-Feb-2015 JF Bastien <jfb@google.com>

Use common parse routine to read alignment values from bitcode

While fuzzing LLVM bitcode files, I discovered that (1) the bitcode reader doesn't check that alignments are no larger than 2**29; (2)

Use common parse routine to read alignment values from bitcode

While fuzzing LLVM bitcode files, I discovered that (1) the bitcode reader doesn't check that alignments are no larger than 2**29; (2) downstream code doesn't check the range; and (3) for values out of range, corresponding large memory requests (based on alignment size) will fail. This code fixes the bitcode reader to check for valid alignments, fixing this problem.

This CL fixes alignment value on global variables, functions, and instructions: alloca, load, load atomic, store, store atomic.

Patch by Karl Schimpf (kschimpf@google.com).

llvm-svn: 230180

show more ...


# ad6eb127 20-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Bitcode: Stop assuming non-null fields

When writing the bitcode serialization for the new debug info hierarchy,
I assumed two fields would never be null.

Drop that assumption, since it's brittle (a

Bitcode: Stop assuming non-null fields

When writing the bitcode serialization for the new debug info hierarchy,
I assumed two fields would never be null.

Drop that assumption, since it's brittle (and crashes the
`BitcodeWriter` if wrong), and is a check better left for the verifier
anyway. (No need for a bitcode upgrade here, since the new hierarchy is
still not in place.)

The fields in question are `MDCompileUnit::getFile()` and
`MDDerivedType::getBaseType()`, the latter of which isn't null in
test/Transforms/Mem2Reg/ConvertDebugInfo2.ll (see !14, a pointer to
nothing). While the testcase might have bitrotted, there's no reason
for the bitcode format to rely on non-null for metadata operands.

This also fixes a bug in `AsmWriter` where if the `file:` is null it
isn't emitted (caught by the double-round trip in the testcase I'm
adding) -- this is a required field in `LLParser`.

I'll circle back to ConvertDebugInfo2. Once the specialized nodes are
in place, I'll be trying to turn the debug info verifier back on by
default (in the newer module pass form committed r206300) and throwing
more logic in there. If the testcase has bitrotted (as opposed to me
not understanding the schema correctly) I'll fix it then.

llvm-svn: 229960

show more ...


# 3d62bbac 19-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

IR: Drop scope from MDTemplateParameter

Follow-up to r229740, which removed `DITemplate*::getContext()` after my
upgrade script revealed that scopes are always `nullptr` for template
parameters. Th

IR: Drop scope from MDTemplateParameter

Follow-up to r229740, which removed `DITemplate*::getContext()` after my
upgrade script revealed that scopes are always `nullptr` for template
parameters. This is the other shoe: drop `scope:` from
`MDTemplateParameter` and its two subclasses. (Note: a bitcode upgrade
would be pointless, since the hierarchy hasn't been moved into place.)

llvm-svn: 229791

show more ...


Revision tags: llvmorg-3.6.0-rc4
# 060ee625 16-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Bitcode: Fix major regression: large files w/ debug info

The metadata/value split introduced a major regression reading large
bitcode files that contain debug info (or other cyclic (non-self
referen

Bitcode: Fix major regression: large files w/ debug info

The metadata/value split introduced a major regression reading large
bitcode files that contain debug info (or other cyclic (non-self
reference) metadata graphs). For the first time in a while, I dropped
from libLTO.dylib down to `llvm-lto` with a non-trivial bitcode file
(~350MB), and I hit this when reading the result of ld64's `-save-temps`
in `llvm-lto`.

Here's pseudo-code for what was going on:

read-main-metadata-block:
for each md:
if has-fwd-ref: // Only true for cyclic graphs.
any-fwd-refs <- true
if any-fwd-refs:
foreach md:
resolve-cycles(md) // Handle cycles.

foreach function:
read-function-metadata-block: // Such as !alias, !loop
if any-fwd-refs:
foreach md: // (all metadata, not just this block)
resolve-cycles(md) // A no-op, but the loop is expensive!!

This commit resets the `AnyFwdRefs` flag to `false`. This on its own
was enough to change my Release+Asserts `llvm-lto` time for reading this
bitcode from over 20 minutes (I gave up on it) to 20 seconds. I've gone
further by tracking the min/max metadata forward-references in a
metadata block. This protects against a schema that has lots of
functions that each reference their own metadata cycle.

Unfortunately, this regression is in the 3.6 branch as well.

llvm-svn: 229421

show more ...


# ecf8f7f4 16-Feb-2015 Filipe Cabecinhas <me@filcab.net>

[Bitcode reader] Fix a few assertions when reading invalid files

Summary:
When creating {insert,extract}value instructions from a BitcodeReader, we
weren't verifying the fields were valid.

Bugs fou

[Bitcode reader] Fix a few assertions when reading invalid files

Summary:
When creating {insert,extract}value instructions from a BitcodeReader, we
weren't verifying the fields were valid.

Bugs found with afl-fuzz

Reviewers: rafael

Subscribers: llvm-commits

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

llvm-svn: 229345

show more ...


# f9a1897c 15-Feb-2015 Aaron Ballman <aaron@aaronballman.com>

Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition.

llvm-svn: 229340


Revision tags: llvmorg-3.6.0-rc3
# 1c931164 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDImportedEntity

llvm-svn: 229025


# d45ce96c 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDObjCProperty

llvm-svn: 229024


# 0c5c0124 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDExpression

llvm-svn: 229023


# 72fe2d0b 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDLocalVariable

llvm-svn: 229022


# c8f810a0 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDGlobalVariable

llvm-svn: 229020


# 2847f380 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDTemplate{Type,Value}Parameter

llvm-svn: 229019


# e1460005 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDNamespace

llvm-svn: 229018


# 06a0702e 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDLexicalBlockFile

llvm-svn: 229017


# a96d4099 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDLexicalBlock

llvm-svn: 229016


# 19fc5ed7 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDSubprogram

llvm-svn: 229014


# c1f1acc7 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDCompileUnit

llvm-svn: 229013


# 54e2bc6c 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDSubroutineType

llvm-svn: 229011


# 171d077a 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDDerivedType and MDCompositeType

llvm-svn: 229009


# f14b9c7c 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDFile

llvm-svn: 229007


# 09e03f38 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDBasicType

llvm-svn: 229005


# 87754764 13-Feb-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

AsmWriter/Bitcode: MDEnumerator

llvm-svn: 229004


1...<<31323334353637383940>>...54