History log of /llvm-project/llvm/lib/CodeGen/GlobalMerge.cpp (Results 76 – 92 of 92)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: studio-1.4
# 0bef27d8 12-Aug-2015 John Brawn <john.brawn@arm.com>

[GlobalMerge] Only emit aliases for internal linkage variables for non-Mach-O

On Mach-O emitting aliases for the variables that make up a MergedGlobals
variable can cause problems when linking with

[GlobalMerge] Only emit aliases for internal linkage variables for non-Mach-O

On Mach-O emitting aliases for the variables that make up a MergedGlobals
variable can cause problems when linking with dead stripping enabled so don't
do that, except for external variables where we must emit an alias.

llvm-svn: 244748

show more ...


# 863bfdbf 11-Aug-2015 John Brawn <john.brawn@arm.com>

[GlobalMerge] Use private linkage for MergedGlobals variables

Other objects can never reference the MergedGlobals symbol so external linkage
is never needed. Using private instead of internal linkag

[GlobalMerge] Use private linkage for MergedGlobals variables

Other objects can never reference the MergedGlobals symbol so external linkage
is never needed. Using private instead of internal linkage means the object is
more similar to what it looks like when global merging is not enabled, with
the only difference being that the merged variables are addressed indirectly
relative to the start of the section they are in.

Also add aliases for merged variables with internal linkage, as this also makes
the object be more like what it is when they are not merged.

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

llvm-svn: 244615

show more ...


# df005cbe 08-Aug-2015 Benjamin Kramer <benny.kra@googlemail.com>

Fix some comment typos.

llvm-svn: 244402


# 8b954241 03-Aug-2015 John Brawn <john.brawn@arm.com>

[GlobalMerge] Allow targets to enable merging of extern variables, NFC.

Adjust the GlobalMergeOnExternal option so that the default behaviour is to
do whatever the Target thinks is best. Explicitly

[GlobalMerge] Allow targets to enable merging of extern variables, NFC.

Adjust the GlobalMergeOnExternal option so that the default behaviour is to
do whatever the Target thinks is best. Explicitly enabled or disabling the
option will override this default.

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

llvm-svn: 243873

show more ...


Revision tags: llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1
# f6727b0d 07-Jul-2015 Mehdi Amini <mehdi.amini@apple.com>

Redirect DataLayout from TargetMachine to Module in GlobalMerge

Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one o

Redirect DataLayout from TargetMachine to Module in GlobalMerge

Summary:
This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

Reviewers: echristo

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 241615

show more ...


Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1
# 8379e298 08-Jun-2015 Oliver Stannard <oliver.stannard@arm.com>

Fix assertion failure in global-merge with unused ConstantExpr

The global-merge pass was crashing because it assumes that all ConstantExprs
(reached via the global variables that they use) have at l

Fix assertion failure in global-merge with unused ConstantExpr

The global-merge pass was crashing because it assumes that all ConstantExprs
(reached via the global variables that they use) have at least one user.

I haven't worked out a way to test this, as an unused ConstantExpr cannot be
represented by serialised IR, and global-merge can only be run in llc, which
does not run any passes which can make a ConstantExpr dead.

This (reduced to the point of silliness) C code triggers this bug when compiled
for arm-none-eabi at -O1:

static a = 7;
static volatile b[10] = {&a};

c;
main() {
c = 0;
for (; c < 10;)
printf(b[c]);
}

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

llvm-svn: 239308

show more ...


# 82076412 04-Jun-2015 Ahmed Bougacha <ahmed.bougacha@gmail.com>

[GlobalMerge] Take into account minsize on Global users' parents.

Now that we can look at users, we can trivially do this: when we would
have otherwise disabled GlobalMerge (currently -O<3), we can

[GlobalMerge] Take into account minsize on Global users' parents.

Now that we can look at users, we can trivially do this: when we would
have otherwise disabled GlobalMerge (currently -O<3), we can just run
it for minsize functions, as it's usually a codesize win.

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

llvm-svn: 239087

show more ...


Revision tags: 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 ...


# 279e3ee9 18-Apr-2015 Ahmed Bougacha <ahmed.bougacha@gmail.com>

[GlobalMerge] Look at uses to create smaller global sets.

Instead of merging everything together, look at the users of
GlobalVariables, and try to group them by function, to create
sets of globals u

[GlobalMerge] Look at uses to create smaller global sets.

Instead of merging everything together, look at the users of
GlobalVariables, and try to group them by function, to create
sets of globals used "together".

Using that information, a less-aggressive alternative is to keep merging
everything together *except* globals that are only ever used alone, that
is, those for which it's clearly non-profitable to merge with others.

In my testing, grouping by Function is too aggressive, but grouping by
BasicBlock is too conservative. Anything in-between isn't trivially
available, so stick with Function grouping for now.

cl::opts are added for testing; both enabled by default.

A few of the testcases aren't testing the merging proper, but just
various edge cases when merging does occur. Update them to use the
previous grouping behavior. Also, one of the tests is unrelated to
GlobalMerge; change it accordingly.
While there, switch to r234666' flags rather than the brutal -O3.

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

llvm-svn: 235249

show more ...


# b96444ef 11-Apr-2015 Ahmed Bougacha <ahmed.bougacha@gmail.com>

[CodeGen] Split -enable-global-merge into ARM and AArch64 options.

Currently, there's a single flag, checked by the pass itself.
It can't force-enable the pass (and is on by default), because it
mig

[CodeGen] Split -enable-global-merge into ARM and AArch64 options.

Currently, there's a single flag, checked by the pass itself.
It can't force-enable the pass (and is on by default), because it
might not even have been created, as that's the targets decision.
Instead, have separate explicit flags, so that the decision is
consistently made in the target.

Keep the flag as a last-resort "force-disable GlobalMerge" for now,
for backwards compatibility.

llvm-svn: 234666

show more ...


# 4a2e73b0 02-Apr-2015 David Blaikie <dblaikie@gmail.com>

[opaque pointer type] API migration for GEP constant factories

Require the pointee type to be passed explicitly and assert that it is
correct. For now it's possible to pass nullptr here (and I've do

[opaque pointer type] API migration for GEP constant factories

Require the pointee type to be passed explicitly and assert that it is
correct. For now it's possible to pass nullptr here (and I've done so in
a few places in this patch) but eventually that will be disallowed once
all clients have been updated or removed. It'll be a long road to get
all the way there... but if you have the cahnce to update your callers
to pass the type explicitly without depending on a pointer's element
type, that would be a good thing to do soon and a necessary thing to do
eventually.

llvm-svn: 233938

show more ...


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0
# ed47b229 23-Feb-2015 Eric Christopher <echristo@gmail.com>

Rewrite the global merge pass to be subprogram agnostic for now.
It was previously using the subtarget to get values for the global
offset without actually checking each function as it was generating

Rewrite the global merge pass to be subprogram agnostic for now.
It was previously using the subtarget to get values for the global
offset without actually checking each function as it was generating
code. Go ahead and solidify the current behavior and make the
existing FIXMEs more prominent.

As a note the ARM backend previously had a thumb1 and non-thumb1
set of defaults. Only the former was tested so I've changed the
behavior to only use that for now.

llvm-svn: 230245

show more ...


# 9ecaa174 20-Feb-2015 Eric Christopher <echristo@gmail.com>

Grab the DataLayout off of the TargetMachine since that's where
it's stored.

llvm-svn: 230059


Revision tags: llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1
# d9903888 14-Jan-2015 Chandler Carruth <chandlerc@gmail.com>

[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 ...


Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2
# d913448b 04-Aug-2014 Eric Christopher <echristo@gmail.com>

Remove the TargetMachine forwards for TargetSubtargetInfo based
information and update all callers. No functional change.

llvm-svn: 214781


Revision tags: llvmorg-3.5.0-rc1
# cccdadca 08-Jul-2014 Benjamin Kramer <benny.kra@googlemail.com>

Fix some Twine locals.

Two of those are use after frees. Found by clang-tidy, fixed by me.

llvm-svn: 212537


# 96e92c1d 13-Jun-2014 Jiangning Liu <jiangning.liu@arm.com>

Move GlobalMerge from Transform to CodeGen.

This patch is to move GlobalMerge pass from Transform/Scalar
to CodeGen, because GlobalMerge de

Move GlobalMerge from Transform to CodeGen.

This patch is to move GlobalMerge pass from Transform/Scalar
to CodeGen, because GlobalMerge depends on TargetMachine.
In the mean time, the macro INITIALIZE_TM_PASS is also moved
to CodeGen/Passes.h. With this fix we can avoid making
libScalarOpts depend on libCodeGen.

llvm-svn: 210951

show more ...


1234