History log of /llvm-project/llvm/lib/Transforms/Utils/CloneModule.cpp (Results 26 – 50 of 105)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d3f4c05a 12-Jun-2016 Benjamin Kramer <benny.kra@googlemail.com>

Move instances of std::function.

Or replace with llvm::function_ref if it's never stored. NFC intended.

llvm-svn: 272513


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# a614ab7b 31-Mar-2016 Evgeniy Stepanov <eugeni.stepanov@gmail.com>

Preserve extern_weak linkage in CloneModule.

Only force "extern" linkage if the function used to be a definition
in the source module. Declarations keep their original linkage.

llvm-svn: 265043


# 2bc252ac 30-Mar-2016 Peter Collingbourne <peter@pcc.me.uk>

Cloning: Reduce complexity of debug info cloning and fix correctness issue.

Commit r260791 contained an error in that it would introduce a cross-module
reference in the old module. It also introduce

Cloning: Reduce complexity of debug info cloning and fix correctness issue.

Commit r260791 contained an error in that it would introduce a cross-module
reference in the old module. It also introduced O(N^2) complexity in the
module cloner by requiring the entire module to be visited for each function.
Fix both of these problems by avoiding use of the CloneDebugInfoMetadata
function (which is only designed to do intra-module cloning) and cloning
function-attached metadata in the same way that we clone all other metadata.

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

llvm-svn: 264935

show more ...


# f575b268 28-Mar-2016 Evgeniy Stepanov <eugeni.stepanov@gmail.com>

Remove personality for declarations in CloneModule.

Personality is copied as part of copyFunctionAttributes, but it is
invalid on a declaration. Remove the personality attribute it the
function body

Remove personality for declarations in CloneModule.

Personality is copied as part of copyFunctionAttributes, but it is
invalid on a declaration. Remove the personality attribute it the
function body is not cloned.

Also add a verifier run over output modules in the llvm-split tool.

llvm-svn: 264667

show more ...


Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3
# 7c7c3e35 13-Feb-2016 Keno Fischer <kfischer@college.harvard.edu>

[Cloning] Clone every Function's Debug Info

Summary:
Export the CloneDebugInfoMetadata utility, which clones all debug info
associated with a function into the first module. Also use this function
i

[Cloning] Clone every Function's Debug Info

Summary:
Export the CloneDebugInfoMetadata utility, which clones all debug info
associated with a function into the first module. Also use this function
in CloneModule on each function we clone (the CloneFunction entrypoint
already does this).

Without this, cloning a module will lead to DI quality regressions,
especially since r252219 reversed the Function <-> DISubprogram edge
(before we could get lucky and have this edge preserved if the
DISubprogram itself was, e.g. due to location metadata).

This was verified to fix missing debug information in julia and
a unittest to verify the new behavior is included.

Patch by Yichao Yu! Thanks!

Reviewers: loladiro, pcc
Differential Revision: http://reviews.llvm.org/D17165

llvm-svn: 260791

show more ...


Revision tags: llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1
# 5f6eaac6 16-Jan-2016 Manuel Jacob <me@manueljacob.de>

GlobalValue: use getValueType() instead of getType()->getPointerElementType().

Reviewers: mjacob

Subscribers: jholewinski, arsenm, dsanders, dblaikie

Patch by Eduard Burtescu.

Differential Revisi

GlobalValue: use getValueType() instead of getType()->getPointerElementType().

Reviewers: mjacob

Subscribers: jholewinski, arsenm, dsanders, dblaikie

Patch by Eduard Burtescu.

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

llvm-svn: 257999

show more ...


# cab951dd 08-Dec-2015 Rafael Espindola <rafael.espindola@gmail.com>

Return a std::unique_ptr from CloneModule. NFC.

llvm-svn: 255078


Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# 5b4c837c 13-Oct-2015 Duncan P. N. Exon Smith <dexonsmith@apple.com>

TransformUtils: Remove implicit ilist iterator conversions, NFC

Continuing the work from last week to remove implicit ilist iterator
conversions. First related commit was probably r249767, with som

TransformUtils: Remove implicit ilist iterator conversions, NFC

Continuing the work from last week to remove implicit ilist iterator
conversions. First related commit was probably r249767, with some more
motivation in r249925. This edition gets LLVMTransformUtils compiling
without the implicit conversions.

No functional change intended.

llvm-svn: 250142

show more ...


# 6614d8d2 14-Sep-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer types] Switch a few cases of getElementType over, since I had them lying around anyway

llvm-svn: 247610


# 16a2f3e3 14-Sep-2015 David Blaikie <dblaikie@gmail.com>

Revert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space"

This was a flawed change - it just caused the getElementType call

Revert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space"

This was a flawed change - it just caused the getElementType call to be
deferred until later, when we really need to remove it. Now that the IR
for GlobalAliases has been updated, the root cause is addressed that way
instead and this change is no longer needed (and in fact gets in the way
- because we want to pass the pointee type directly down further).

Follow up patches to push this through GlobalValue, bitcode format, etc,
will come along soon.

This reverts commit 236160.

llvm-svn: 247585

show more ...


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4
# 1dc6a8d1 21-Aug-2015 Peter Collingbourne <peter@pcc.me.uk>

TransformUtils: Introduce module splitter.

The module splitter splits a module into linkable partitions. It will
be used to implement parallel LTO code generation.

This initial version of the split

TransformUtils: Introduce module splitter.

The module splitter splits a module into linkable partitions. It will
be used to implement parallel LTO code generation.

This initial version of the splitter does not attempt to deal with the
somewhat subtle symbol visibility issues around module splitting. These
will be dealt with in a future change.

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

llvm-svn: 245662

show more ...


Revision tags: llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1
# cda8688f 30-Jun-2015 David Majnemer <david.majnemer@gmail.com>

[Cloning] Teach CloneModule about personality functions

CloneModule didn't take into account that it needed to remap the value
using values in the module.

This fixes PR23992.

llvm-svn: 241122


Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1
# f64246be 29-Apr-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space

Many of the callers already have the pointer type anyway, and for the
coup

[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space

Many of the callers already have the pointer type anyway, and for the
couple of callers that don't it's pretty easy to call PointerType::get
on the pointee type and address space.

This avoids LLParser from using PointerType::getElementType when parsing
GlobalAliases from IR.

llvm-svn: 236160

show more ...


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1
# 0bf33ffd 23-Dec-2014 Michael Kuperstein <michael.m.kuperstein@intel.com>

Remove a bad cast in CloneModule()

A cast that was introduced in r209007 was accidentally left in after the changes made to GlobalAlias rules in r210062. This crashes if the aliasee is a now-leggal

Remove a bad cast in CloneModule()

A cast that was introduced in r209007 was accidentally left in after the changes made to GlobalAlias rules in r210062. This crashes if the aliasee is a now-leggal ConstantExpr.

llvm-svn: 224756

show more ...


# 46d7af57 19-Dec-2014 Duncan P. N. Exon Smith <dexonsmith@apple.com>

Rename MapValue(Metadata*) to MapMetadata()

Instead of reusing the name `MapValue()` when mapping `Metadata`, use
`MapMetadata()`. The old name doesn't make much sense after the
`Metadata`/`Value`

Rename MapValue(Metadata*) to MapMetadata()

Instead of reusing the name `MapValue()` when mapping `Metadata`, use
`MapMetadata()`. The old name doesn't make much sense after the
`Metadata`/`Value` split.

llvm-svn: 224566

show more ...


Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1
# 0a4e9a3b 01-Oct-2014 Tom Stellard <thomas.stellard@amd.com>

C API: Add LLVMCloneModule()

llvm-svn: 218775


Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# 64c1e180 03-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Allow alias to point to an arbitrary ConstantExpr.

This patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is

Allow alias to point to an arbitrary ConstantExpr.

This patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is valid or not.

This reduces our ability to diagnose invalid uses and how early we can spot
them, but it also lets us do things like

@test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
i32 ptrtoint (i32* @bar to i32)) to i32*)

An important implication of this patch is that the notion of aliased global
doesn't exist any more. The alias has to encode the information needed to
access it in its metadata (linkage, visibility, type, etc).

Another consequence to notice is that getSection has to return a "const char *".
It could return a NullTerminatedStringRef if there was such a thing, but when
that was proposed the decision was to just uses "const char*" for that.

llvm-svn: 210062

show more ...


# f1bedd37 17-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use create methods since msvc doesn't handle delegating constructors.

llvm-svn: 209076


# 83705658 17-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Reduce abuse of default values in the GlobalAlias constructor.

This is in preparation for adding an optional offset.

llvm-svn: 209073


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# 6b238633 16-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Fix most of PR10367.

This patch changes the design of GlobalAlias so that it doesn't take a
ConstantExpr anymore. It now points directly to a GlobalObject, but its type is
independent of the aliasee

Fix most of PR10367.

This patch changes the design of GlobalAlias so that it doesn't take a
ConstantExpr anymore. It now points directly to a GlobalObject, but its type is
independent of the aliasee type.

To avoid changing all alias related tests in this patches, I kept the common
syntax

@foo = alias i32* @bar

to mean the same as now. The cases that used to use cast now use the more
general syntax

@foo = alias i16, i32* @bar.

Note that GlobalAlias now behaves a bit more like GlobalVariable. We
know that its type is always a pointer, so we omit the '*'.

For the bitcode, a nice surprise is that we were writing both identical types
already, so the format change is minimal. Auto upgrade is handled by looking
through the casts and no new fields are needed for now. New bitcode will
simply have different types for Alias and Aliasee.

One last interesting point in the patch is that replaceAllUsesWith becomes
smart enough to avoid putting a ConstantExpr in the aliasee. This seems better
than checking and updating every caller.

A followup patch will delete getAliasedGlobal now that it is redundant. Another
patch will add support for an explicit offset.

llvm-svn: 209007

show more ...


# 4fe0094f 16-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Change the GlobalAlias constructor to look a bit more like GlobalVariable.

This is part of the fix for pr10367. A GlobalAlias always has a pointer type,
so just have the constructor build the type.

Change the GlobalAlias constructor to look a bit more like GlobalVariable.

This is part of the fix for pr10367. A GlobalAlias always has a pointer type,
so just have the constructor build the type.

llvm-svn: 208983

show more ...


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2
# f40110f4 25-Apr-2014 Craig Topper <craig.topper@gmail.com>

[C++] Use 'nullptr'. Transforms edition.

llvm-svn: 207196


Revision tags: llvmorg-3.4.1-rc1, llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1, llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1
# 9fb823bb 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com>

Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long

Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366

show more ...


Revision tags: llvmorg-3.2.0, llvmorg-3.2.0-rc3
# ed0881b2 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com>

Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module

Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131

show more ...


Revision tags: llvmorg-3.2.0-rc2
# ee5984df 27-Nov-2012 Bill Wendling <isanbard@gmail.com>

Remove the dependent libraries feature.

The dependent libraries feature was never used and has bit-rotted. Remove it.

llvm-svn: 168694


12345