History log of /llvm-project-15.0.7/llvm/lib/Bitcode/Reader/BitcodeReader.cpp (Results 501 – 525 of 1180)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 26aa9358 30-Dec-2015 Teresa Johnson <[email protected]>

[ThinLTO] Check MDNode values saved for metadata linking (NFC)

Add an assert suggested in review for r255909 to ensure that MDNodes
saved in the map used for metadata linking are either temporary or

[ThinLTO] Check MDNode values saved for metadata linking (NFC)

Add an assert suggested in review for r255909 to ensure that MDNodes
saved in the map used for metadata linking are either temporary or
resolved.

Also add a comment clarifying why we may need to save off non-MDNode
metadata.

llvm-svn: 256646

show more ...


# 61b406ec 29-Dec-2015 Teresa Johnson <[email protected]>

Rename MDValue* to Metadata* (NFC)

Renamed MDValue* to Metadata*, and MDValueToValIDMap to MetadataToIDs,
as per review for r255909.

llvm-svn: 256593


# 34702959 21-Dec-2015 Teresa Johnson <[email protected]>

Remove overly strict new assert in BitcodeReader.

This fixes a bug introduced by the ThinLTO metadata linking patch
r255909. The assert is overly-strict and while useful in development of
the patch,

Remove overly strict new assert in BitcodeReader.

This fixes a bug introduced by the ThinLTO metadata linking patch
r255909. The assert is overly-strict and while useful in development of
the patch, doesn't seem interesting to keep.

Fixes PR25907.

llvm-svn: 256161

show more ...


# e01e363f 19-Dec-2015 Rafael Espindola <[email protected]>

Assert that we have all use/users in the getters.

An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like

if (V.use_empty())

The problem is that uses in u

Assert that we have all use/users in the getters.

An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like

if (V.use_empty())

The problem is that uses in unmaterialized functions are not accounted
for.

This patch adds asserts that all uses are known.

llvm-svn: 256105

show more ...


# 79753a07 18-Dec-2015 Rafael Espindola <[email protected]>

Remove redundant argument. NFC.

llvm-svn: 256031


# c4a03483 18-Dec-2015 Rafael Espindola <[email protected]>

Drop materializeAllPermanently.

This inlines materializeAll into the only caller
(materializeAllPermanently) and renames materializeAllPermanently to
just materializeAll.

llvm-svn: 256024


# 18c63b0f 18-Dec-2015 Rafael Espindola <[email protected]>

Drop support for dematerializing.

It was only used on lib/Linker and the use was "dead" since it was used on a
function the IRMover had just moved.

llvm-svn: 256019


# e5a61917 17-Dec-2015 Teresa Johnson <[email protected]>

[ThinLTO] Metadata linking for imported functions

Summary:
Second patch split out from http://reviews.llvm.org/D14752.

Maps metadata as a post-pass from each module when importing complete,
suturin

[ThinLTO] Metadata linking for imported functions

Summary:
Second patch split out from http://reviews.llvm.org/D14752.

Maps metadata as a post-pass from each module when importing complete,
suturing up final metadata to the temporary metadata left on the
imported instructions.

This entails saving the mapping from bitcode value id to temporary
metadata in the importing pass, and from bitcode value id to final
metadata during the metadata linking postpass.

Depends on D14825.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

llvm-svn: 255909

show more ...


# fb3f4907 16-Dec-2015 Vaivaswatha Nagaraj <[email protected]>

Add InaccessibleMemOnly and inaccessibleMemOrArgMemOnly attributes

Summary:
This patch introduces two new function attributes

InaccessibleMemOnly: This attribute indicates that the function may on

Add InaccessibleMemOnly and inaccessibleMemOrArgMemOnly attributes

Summary:
This patch introduces two new function attributes

InaccessibleMemOnly: This attribute indicates that the function may only access memory that is not accessible by the program/IR being compiled. This is a weaker form of ReadNone.
inaccessibleMemOrArgMemOnly: This attribute indicates that the function may only access memory that is either not accessible by the program/IR being compiled, or is pointed to by its pointer arguments. This is a weaker form of ArgMemOnly

Test cases have been updated. This revision uses this (https://github.com/llvm-mirror/llvm/commit/d001932f3a8aa1ebd1555162fdce365f011bc292) as reference.

Reviewers: jmolloy, hfinkel

Subscribers: reames, joker.eph, llvm-commits

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

llvm-svn: 255778

show more ...


# 9d2bfc48 14-Dec-2015 Rafael Espindola <[email protected]>

Use diagnostic handler in the LLVMContext

This patch converts code that has access to a LLVMContext to not take a
diagnostic handler.

This has a few advantages

* It is easier to use a consistent d

Use diagnostic handler in the LLVMContext

This patch converts code that has access to a LLVMContext to not take a
diagnostic handler.

This has a few advantages

* It is easier to use a consistent diagnostic handler in a single program.
* Less clutter since we are not passing a handler around.

It does make it a bit awkward to implement some C APIs that return a
diagnostic string. I will propose new versions of these APIs and
deprecate the current ones.

llvm-svn: 255571

show more ...


# fa54aced 14-Dec-2015 Sanjay Patel <[email protected]>

add fast-math-flags to 'call' instructions (PR21290)

This patch adds optional fast-math-flags (the same that apply to fmul/fadd/fsub/fdiv/frem/fcmp)
to call instructions in IR. Follow-up patches wou

add fast-math-flags to 'call' instructions (PR21290)

This patch adds optional fast-math-flags (the same that apply to fmul/fadd/fsub/fdiv/frem/fcmp)
to call instructions in IR. Follow-up patches would use these flags in LibCallSimplifier, add
support to clang, and extend FMF to the DAG for calls.

Motivating example:

%y = fmul fast float %x, %x
%z = tail call float @sqrtf(float %y)

We'd like to be able to optimize sqrt(x*x) into fabs(x). We do this today using a function-wide
attribute for unsafe-math, but we really want to trigger on the instructions themselves:

%z = tail call fast float @sqrtf(float %y)

because in an LTO build it's possible that calls with fast semantics have been inlined into a
function with non-fast semantics.

The code changes and tests are based on the recent commits that added "notail":
http://reviews.llvm.org/rL252368

and added FMF to fcmp:
http://reviews.llvm.org/rL241901

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

llvm-svn: 255555

show more ...


# bbfc7219 14-Dec-2015 David Majnemer <[email protected]>

[IR] Remove terminatepad

It turns out that terminatepad gives little benefit over a cleanuppad
which calls the termination function. This is not sufficient to
implement fully generic filters but MS

[IR] Remove terminatepad

It turns out that terminatepad gives little benefit over a cleanuppad
which calls the termination function. This is not sufficient to
implement fully generic filters but MSVC doesn't support them which
makes terminatepad a little over-designed.

Depends on D15478.

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

llvm-svn: 255522

show more ...


# 8a1c45d6 12-Dec-2015 David Majnemer <[email protected]>

[IR] Reformulate LLVM's EH funclet IR

While we have successfully implemented a funclet-oriented EH scheme on
top of LLVM IR, our scheme has some notable deficiencies:
- catchendpad and cleanupendpad

[IR] Reformulate LLVM's EH funclet IR

While we have successfully implemented a funclet-oriented EH scheme on
top of LLVM IR, our scheme has some notable deficiencies:
- catchendpad and cleanupendpad are necessary in the current design
but they are difficult to explain to others, even to seasoned LLVM
experts.
- catchendpad and cleanupendpad are optimization barriers. They cannot
be split and force all potentially throwing call-sites to be invokes.
This has a noticable effect on the quality of our code generation.
- catchpad, while similar in some aspects to invoke, is fairly awkward.
It is unsplittable, starts a funclet, and has control flow to other
funclets.
- The nesting relationship between funclets is currently a property of
control flow edges. Because of this, we are forced to carefully
analyze the flow graph to see if there might potentially exist illegal
nesting among funclets. While we have logic to clone funclets when
they are illegally nested, it would be nicer if we had a
representation which forbade them upfront.

Let's clean this up a bit by doing the following:
- Instead, make catchpad more like cleanuppad and landingpad: no control
flow, just a bunch of simple operands; catchpad would be splittable.
- Introduce catchswitch, a control flow instruction designed to model
the constraints of funclet oriented EH.
- Make funclet scoping explicit by having funclet instructions consume
the token produced by the funclet which contains them.
- Remove catchendpad and cleanupendpad. Their presence can be inferred
implicitly using coloring information.

N.B. The state numbering code for the CLR has been updated but the
veracity of it's output cannot be spoken for. An expert should take a
look to make sure the results are reasonable.

Reviewers: rnk, JosephTremoulet, andrew.w.kaylor

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

llvm-svn: 255422

show more ...


# a9bcf16e 10-Dec-2015 Amjad Aboud <[email protected]>

Macro debug info support in LLVM IR
Introduced DIMacro and DIMacroFile debug info metadata in the LLVM IR to support macros.

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

llvm-svn: 255245


# 9abe1089 03-Dec-2015 Mehdi Amini <[email protected]>

Remove "ExportingModule" from ThinLTO Index (NFC)

There is no real reason the index has to have the concept of an
exporting Module. We should be able to have one single unique
instance of the Index,

Remove "ExportingModule" from ThinLTO Index (NFC)

There is no real reason the index has to have the concept of an
exporting Module. We should be able to have one single unique
instance of the Index, and it should be read-only after creation
for the whole ThinLTO processing.
The linker plugin should be able to process multiple modules (in
parallel or in sequence) with the same index.

The only reason the ExportingModule was present seems to be to
implement hasExportedFunctions() that is used by the Module linker
to decide what to do with the current Module.
For now I replaced it with a query to the map of Modules path to
see if this module was declared in the Index and consider that if
it is the case then it is probably exporting function.
On the long term the Linker interface needs to evolve and this
call should not be needed anymore.

From: Mehdi Amini <[email protected]>
llvm-svn: 254581

show more ...


Revision tags: llvmorg-3.7.1
# 6290dbc0 21-Nov-2015 Teresa Johnson <[email protected]>

[ThinLTO] Handle bitcode without function summary sections gracefully

Summary:
Several fixes to the handling of bitcode files without function summary
sections so that they are skipped during ThinLT

[ThinLTO] Handle bitcode without function summary sections gracefully

Summary:
Several fixes to the handling of bitcode files without function summary
sections so that they are skipped during ThinLTO processing in llvm-lto
and the gold plugin when appropriate instead of aborting.

1 Don't assert when trying to add a FunctionInfo that doesn't have
a summary attached.
2 Skip FunctionInfo structures that don't have attached function summary
sections when trying to create the combined function summary.
3 In both llvm-lto and gold-plugin, check whether a bitcode file has
a function summary section before trying to parse the index, and skip
the bitcode file if it does not.
4 Fix hasFunctionSummaryInMemBuffer in BitcodeReader, which had a bug
where we returned to early while looking for the summary section.

Also added llvm-lto and gold-plugin based tests for cases where we
don't have function summaries in the bitcode file. I verified that
either the first couple fixes described above are enough to avoid the
crashes, or fixes 1,3,4. But have combined them all here for added
robustness.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

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

llvm-svn: 253796

show more ...


# 16e2a9ee 21-Nov-2015 Teresa Johnson <[email protected]>

Move new assert to correct location

This assert was meant to execute at the end of parseMetadata, but
we return early and never reach the end of the function. Caught
by a compile-time warning since

Move new assert to correct location

This assert was meant to execute at the end of parseMetadata, but
we return early and never reach the end of the function. Caught
by a compile-time warning since the function doesn't return a value
from that location.

llvm-svn: 253762

show more ...


Revision tags: llvmorg-3.7.1-rc2
# d4d3dfd8 20-Nov-2015 Teresa Johnson <[email protected]>

[ThinLTO] Add MODULE_CODE_METADATA_VALUES record

Summary:
This is split out from the ThinLTO metadata mapping patch
http://reviews.llvm.org/D14752.

To avoid needing to parse the module level metada

[ThinLTO] Add MODULE_CODE_METADATA_VALUES record

Summary:
This is split out from the ThinLTO metadata mapping patch
http://reviews.llvm.org/D14752.

To avoid needing to parse the module level metadata during function
importing, a new module-level record is added which holds the
number of module-level metadata values. This is required because
metadata value ids are assigned implicitly during parsing, and the
function-level metadata ids start after the module-level metadata ids.

I made a change to this version of the code compared to D14752
in order to add more consistent and thorough assertion checking of the
new record value. We now unconditionally use the record value to
initialize the MDValueList size, and handle it the same in parseMetadata
for all module level metadata cases (lazy loading or not).

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

llvm-svn: 253668

show more ...


# 354f520f 19-Nov-2015 Mehdi Amini <[email protected]>

Do not require a Context to extract the FunctionIndex from Bitcode (NFC)

The LLVMContext was only used for Diagnostic. Pass a DiagnosticHandler
instead.

Differential Revision: http://reviews.llvm.o

Do not require a Context to extract the FunctionIndex from Bitcode (NFC)

The LLVMContext was only used for Diagnostic. Pass a DiagnosticHandler
instead.

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

From: Mehdi Amini <[email protected]>
llvm-svn: 253540

show more ...


# f79d3449 18-Nov-2015 Sanjoy Das <[email protected]>

[OperandBundles] Tighten OperandBundleDef's interface; NFC

llvm-svn: 253446


Revision tags: llvmorg-3.7.1-rc1
# 12545075 15-Nov-2015 Teresa Johnson <[email protected]>

Use a different block id for block of metadata kind records

Summary:
There are currently two blocks with the METADATA_BLOCK id at module
scope. The first has the module-level metadata values (consis

Use a different block id for block of metadata kind records

Summary:
There are currently two blocks with the METADATA_BLOCK id at module
scope. The first has the module-level metadata values (consisting of
some combination of METADATA_* record codes except for METADATA_KIND).
The second consists only of METADATA_KIND records. The latter is used
only in the METADATA_ATTACHMENT block within function blocks (for
metadata attached to instructions).

For ThinLTO we want to delay the parsing of module level metadata
until all functions have been imported from that module (there is some
bookkeeping used to suture it up when we read it during a post-pass).
However, we do need the METADATA_KIND records when parsing the function
body during importing, since those kinds are used as described above.

To simplify identification and parsing of just the block containing
the metadata kinds, use a different block id (METADATA_KIND_BLOCK_ID).
Support older bitcode without the new block id as well.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits

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

llvm-svn: 253154

show more ...


# 3383ccc4 09-Nov-2015 Mehdi Amini <[email protected]>

Add a method to the BitcodeReader to parse only the identification block

Summary: Mimic parseTriple(); and exposes it to LTOModule.cpp

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

From

Add a method to the BitcodeReader to parse only the identification block

Summary: Mimic parseTriple(); and exposes it to LTOModule.cpp

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

From: Mehdi Amini <[email protected]>
llvm-svn: 252442

show more ...


# 97cb3971 07-Nov-2015 Akira Hatanaka <[email protected]>

[Bitcode] Add enums for call instruction markers and flags. NFC.

This commit adds enums in LLVMBitCodes.h to improve readability and
maintainability. This is a follow-up to r252368 which was discuss

[Bitcode] Add enums for call instruction markers and flags. NFC.

This commit adds enums in LLVMBitCodes.h to improve readability and
maintainability. This is a follow-up to r252368 which was discussed
here:

http://reviews.llvm.org/D12923

llvm-svn: 252395

show more ...


# 5cfcce12 06-Nov-2015 Akira Hatanaka <[email protected]>

Add 'notail' marker for call instructions.

This marker prevents optimization passes from adding 'tail' or
'musttail' markers to a call. Is is used to prevent tail call
optimization from being perfor

Add 'notail' marker for call instructions.

This marker prevents optimization passes from adding 'tail' or
'musttail' markers to a call. Is is used to prevent tail call
optimization from being performed on the call.

rdar://problem/22667622

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

llvm-svn: 252368

show more ...


# e6f87ca8 06-Nov-2015 James Molloy <[email protected]>

Add a new attribute: norecurse

This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other t

Add a new attribute: norecurse

This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals.

llvm-svn: 252282

show more ...


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