History log of /llvm-project-15.0.7/llvm/lib/Bitcode/Reader/BitcodeReader.cpp (Results 676 – 700 of 1180)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.6.0-rc2
# fcd044b6 30-Jan-2015 Filipe Cabecinhas <[email protected]>

Check bit widths before trying to get a type.

Added a test case for it.
Also added run lines for the test case in r227566.

Bugs found with afl-fuzz

llvm-svn: 227589


# d0858e10 30-Jan-2015 Filipe Cabecinhas <[email protected]>

[bitcode reader] Fix an assert on invalid type tables

Bug found with afl-fuzz

llvm-svn: 227566


# 3087b22e 20-Jan-2015 David Majnemer <[email protected]>

Bitcode: Don't create comdats when autoupgrading macho bitcode

Don't infer COMDAT groups from older bitcode if the target is macho,
it doesn't have COMDATs.

llvm-svn: 226546


# 2bc00f4a 19-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

IR: Merge UniquableMDNode back into MDNode, NFC

As pointed out in r226501, the distinction between `MDNode` and
`UniquableMDNode` is confusing. When we need subclasses of `MDNode`
that don't use al

IR: Merge UniquableMDNode back into MDNode, NFC

As pointed out in r226501, the distinction between `MDNode` and
`UniquableMDNode` is confusing. When we need subclasses of `MDNode`
that don't use all its functionality it might make sense to break it
apart again, but until then this makes the code clearer.

llvm-svn: 226520

show more ...


# 7d82313b 19-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

IR: Return unique_ptr from MDNode::getTemporary()

Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to
return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and
clean u

IR: Return unique_ptr from MDNode::getTemporary()

Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to
return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and
clean up call sites. (For now, `DIBuilder` call sites just call
`release()` immediately.)

There's an accompanying change in each of clang and polly to use the new
API.

llvm-svn: 226504

show more ...


# 946fdcc5 19-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

IR: Remove MDNodeFwdDecl

Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API
changes, there's no real functionality change here.
`MDNode::getTemporary()` now forwards to `MDTuple::getTe

IR: Remove MDNodeFwdDecl

Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API
changes, there's no real functionality change here.
`MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`,
which returns a tuple with `isTemporary()` equal to true.

The main point is that we can now add temporaries of other `MDNode`
subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the
first place because I didn't recognize this need, and thought they were
only needed to handle forward references).

A few things left out of (or highlighted by) this commit:

- I've had to remove the (few) uses of `std::unique_ptr<>` to deal
with temporaries, since the destructor is no longer public.
`getTemporary()` should probably return the equivalent of
`std::unique_ptr<T, MDNode::deleteTemporary>`.
- `MDLocation::getTemporary()` doesn't exist yet (worse, it actually
does exist, but does the wrong thing: `MDNode::getTemporary()` is
inherited and returns an `MDTuple`).
- `MDNode` now only has one subclass, `UniquableMDNode`, and the
distinction between them is actually somewhat confusing.

I'll fix those up next.

llvm-svn: 226501

show more ...


# 12ca34f5 19-Jan-2015 Rafael Espindola <[email protected]>

Bring r226038 back.

No change in this commit, but clang was changed to also produce trivial comdats when
needed.

Original message:

Don't create new comdats in CodeGen.

This patch stops the implic

Bring r226038 back.

No change in this commit, but clang was changed to also produce trivial comdats when
needed.

Original message:

Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

llvm-svn: 226467

show more ...


# 60b72136 16-Jan-2015 Timur Iskhodzhanov <[email protected]>

Revert r226242 - Revert Revert Don't create new comdats in CodeGen

This breaks AddressSanitizer (ninja check-asan) on Windows

llvm-svn: 226251


# 67a79e72 16-Jan-2015 Rafael Espindola <[email protected]>

Revert "Revert Don't create new comdats in CodeGen"

This reverts commit r226173, adding r226038 back.

No change in this commit, but clang was changed to also produce trivial comdats for
costructors

Revert "Revert Don't create new comdats in CodeGen"

This reverts commit r226173, adding r226038 back.

No change in this commit, but clang was changed to also produce trivial comdats for
costructors, destructors and vtables when needed.

Original message:

Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

llvm-svn: 226242

show more ...


# f5adf13f 15-Jan-2015 Timur Iskhodzhanov <[email protected]>

Revert Don't create new comdats in CodeGen

It breaks AddressSanitizer on Windows.

llvm-svn: 226173


Revision tags: llvmorg-3.6.0-rc1
# fad1639a 14-Jan-2015 Rafael Espindola <[email protected]>

Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now pr

Don't create new comdats in CodeGen.

This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

llvm-svn: 226038

show more ...


# d9903888 14-Jan-2015 Chandler Carruth <[email protected]>

[cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the Inst

[cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

llvm-svn: 225974

show more ...


# 6a484832 13-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

AsmParser/Bitcode: Add support for MDLocation

This adds assembly and bitcode support for `MDLocation`. The assembly
side is rather big, since this is the first `MDNode` subclass (that
isn't `MDTupl

AsmParser/Bitcode: Add support for MDLocation

This adds assembly and bitcode support for `MDLocation`. The assembly
side is rather big, since this is the first `MDNode` subclass (that
isn't `MDTuple`). Part of PR21433.

(If you're wondering where the mountains of testcase updates are, we
don't need them until I update `DILocation` and `DebugLoc` to actually
use this class.)

llvm-svn: 225830

show more ...


# 118632db 12-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

IR: Split GenericMDNode into MDTuple and UniquableMDNode

Split `GenericMDNode` into two classes (with more descriptive names).

- `UniquableMDNode` will be a common subclass for `MDNode`s that are

IR: Split GenericMDNode into MDTuple and UniquableMDNode

Split `GenericMDNode` into two classes (with more descriptive names).

- `UniquableMDNode` will be a common subclass for `MDNode`s that are
sometimes uniqued like constants, and sometimes 'distinct'.

This class gets the (short-lived) RAUW support and related API.

- `MDTuple` is the basic tuple that has always been returned by
`MDNode::get()`. This is as opposed to more specific nodes to be
added soon, which have additional fields, custom assembly syntax,
and extra semantics.

This class gets the hash-related logic, since other sublcasses of
`UniquableMDNode` may need to hash based on other fields.

To keep this diff from getting too big, I've added casts to `MDTuple`
that won't really scale as new subclasses of `UniquableMDNode` are
added, but I'll clean those up incrementally.

(No functionality change intended.)

llvm-svn: 225682

show more ...


# d0b23bef 10-Jan-2015 Rafael Espindola <[email protected]>

Use the DiagnosticHandler to print diagnostics when reading bitcode.

The bitcode reading interface used std::error_code to report an error to the
callers and it is the callers job to print diagnosti

Use the DiagnosticHandler to print diagnostics when reading bitcode.

The bitcode reading interface used std::error_code to report an error to the
callers and it is the callers job to print diagnostics.

This is not ideal for error handling or diagnostic reporting:

* For error handling, all that the callers care about is 3 possibilities:
* It worked
* The bitcode file is corrupted/invalid.
* The file is not bitcode at all.

* For diagnostic, it is user friendly to include far more information
about the invalid case so the user can find out what is wrong with the
bitcode file. This comes up, for example, when a developer introduces a
bug while extending the format.

The compromise we had was to have a lot of error codes.

With this patch we use the DiagnosticHandler to communicate with the
human and std::error_code to communicate with the caller.

This allows us to have far fewer error codes and adds the infrastructure to
print better diagnostics. This is so because the diagnostics are printed when
he issue is found. The code that detected the problem in alive in the stack and
can pass down as much context as needed. As an example the patch updates
test/Bitcode/invalid.ll.

Using a DiagnosticHandler also moves the fatal/non-fatal error decision to the
caller. A simple one like llvm-dis can just use fatal errors. The gold plugin
needs a bit more complex treatment because of being passed non-bitcode files. An
hypothetical interactive tool would make all bitcode errors non-fatal.

llvm-svn: 225562

show more ...


# 9ed19665 09-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

Revert "Bitcode: Move the DEBUG_LOC record to DEBUG_LOC_OLD"

This reverts commit r225498 (but leaves r225499, which was a worthy
cleanup).

My plan was to change `DEBUG_LOC` to store the `MDNode` di

Revert "Bitcode: Move the DEBUG_LOC record to DEBUG_LOC_OLD"

This reverts commit r225498 (but leaves r225499, which was a worthy
cleanup).

My plan was to change `DEBUG_LOC` to store the `MDNode` directly rather
than its operands (patch was to go out this morning), but on reflection
it's not clear that it's strictly better. (I had missed that the
current code is unlikely to emit the `MDNode` at all.)

Conflicts:
lib/Bitcode/Reader/BitcodeReader.cpp (due to r225499)

llvm-svn: 225531

show more ...


# 52d0f16e 09-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

Bitcode: Share logic for last instruction, NFC

Share logic for getting the last instruction emitted.

llvm-svn: 225499


# 11fae74a 09-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

Bitcode: Move the DEBUG_LOC record to DEBUG_LOC_OLD

Prepare to simplify the `DebugLoc` record.

llvm-svn: 225498


# 090a19bd 08-Jan-2015 Duncan P. N. Exon Smith <[email protected]>

IR: Add 'distinct' MDNodes to bitcode and assembly

Propagate whether `MDNode`s are 'distinct' through the other types of IR
(assembly and bitcode). This adds the `distinct` keyword to assembly.

Cu

IR: Add 'distinct' MDNodes to bitcode and assembly

Propagate whether `MDNode`s are 'distinct' through the other types of IR
(assembly and bitcode). This adds the `distinct` keyword to assembly.

Currently, no one actually calls `MDNode::getDistinct()`, so these nodes
only get created for:

- self-references, which are never uniqued, and
- nodes whose operands are replaced that hit a uniquing collision.

The concept of distinct nodes is still not quite first-class, since
distinct-ness doesn't yet survive across `MapMetadata()`.

Part of PR22111.

llvm-svn: 225474

show more ...


# bec6af62 08-Jan-2015 Rafael Espindola <[email protected]>

Explicitly handle LinkOnceODRAutoHideLinkage. NFC. We already have a test.

llvm-svn: 225449


# 7b4b2dcd 08-Jan-2015 Rafael Espindola <[email protected]>

Update naming style and clang-format. NFC.

llvm-svn: 225448


Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2
# 06d6930b 18-Dec-2014 Yaron Keren <[email protected]>

Fix Visual C++ error "'llvm::make_unique' : ambiguous call to overloaded function".

llvm-svn: 224506


# 7d727b5f 18-Dec-2014 Rafael Espindola <[email protected]>

Modernize the getStreamedBitcodeModule interface a bit. NFC.

llvm-svn: 224499


# 5bd34e56 12-Dec-2014 Duncan P. N. Exon Smith <[email protected]>

Bitcode: Add missing "Remove in 4.0" comments

llvm-svn: 224090


# 5c7006e0 11-Dec-2014 Duncan P. N. Exon Smith <[email protected]>

Bitcode: Add METADATA_NODE and METADATA_VALUE

This reflects the typelessness of `Metadata` in the bitcode format,
removing types from all metadata operands.

`METADATA_VALUE` represents a `ValueAsMe

Bitcode: Add METADATA_NODE and METADATA_VALUE

This reflects the typelessness of `Metadata` in the bitcode format,
removing types from all metadata operands.

`METADATA_VALUE` represents a `ValueAsMetadata`, and always has two
fields: the type and the value.

`METADATA_NODE` represents an `MDNode`, and unlike `METADATA_OLD_NODE`,
doesn't store types. It stores operands at their ID+1 so that `0` can
reference `nullptr` operands.

Part of PR21532.

llvm-svn: 224073

show more ...


1...<<21222324252627282930>>...48