History log of /llvm-project/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (Results 301 – 325 of 362)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9f77f61e 03-Jun-2015 Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com>

Remove stray semicolon. NFC.

llvm-svn: 238908


# 353a19e1 02-Jun-2015 Sanjoy Das <sanjoy@playingwithpointers.com>

[RewriteStatepointsForGC] Strip deref info after rewriting.

Summary:
Once a gc.statepoint has been rewritten to relocate live references, the
SSA values represent physical pointers instead of logica

[RewriteStatepointsForGC] Strip deref info after rewriting.

Summary:
Once a gc.statepoint has been rewritten to relocate live references, the
SSA values represent physical pointers instead of logical references.
Logical dereferencability does not imply physical dereferencability and
after RewriteStatepointsForGC has run any attributes that imply
dereferencability of the logical references need to be stripped.

This current approach is conservative, and can be made more precise
later if needed. For starters, we need to strip dereferencable
attributes only from pointers that live in the GC address space.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

llvm-svn: 238883

show more ...


# ea45f0e0 02-Jun-2015 Sanjoy Das <sanjoy@playingwithpointers.com>

[NFCI] Change RewriteStatepointsForGC to a ModulePass.

Summary:
A later change that has RewriteStatepointsForGC change function
attributes throughout the module depends on this.

Reviewers: reames,

[NFCI] Change RewriteStatepointsForGC to a ModulePass.

Summary:
A later change that has RewriteStatepointsForGC change function
attributes throughout the module depends on this.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

llvm-svn: 238882

show more ...


# 5582a6a4 25-May-2015 NAKAMURA Takumi <geek4civic@gmail.com>

Reformat.

llvm-svn: 238126


# fb3bd712 25-May-2015 NAKAMURA Takumi <geek4civic@gmail.com>

Prune CRLFs.

llvm-svn: 238125


# d83f6976 21-May-2015 Igor Laevsky <igmyrj@gmail.com>

[RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization

Correct assertion would be that there is no other uses from chain we are currently cloning. It is ok to have

[RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization

Correct assertion would be that there is no other uses from chain we are currently cloning. It is ok to have other uses of values not from this chain.

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

llvm-svn: 237899

show more ...


# ff7d4fad 20-May-2015 Aaron Ballman <aaron@aaronballman.com>

Silencing a -Wsign-compare warning; NFC.

llvm-svn: 237794


# 665bc9c9 20-May-2015 Swaroop Sridhar <Swaroop.Sridhar@microsoft.com>

Add a GCStrategy for CoreCLR

This change adds a new GC strategy for supporting the CoreCLR runtime.

This strategy is currently identical to Statepoint-example GC,
but is necessary for several upco

Add a GCStrategy for CoreCLR

This change adds a new GC strategy for supporting the CoreCLR runtime.

This strategy is currently identical to Statepoint-example GC,
but is necessary for several upcoming changes specific to CoreCLR, such as:

1. Base-pointers not explicitly reported for interior pointers
2. Different format for stack-map encoding
3. Location of Safe-point polls: polls are only needed before loop-back edges and before tail-calls (not needed at function-entry)
4. Runtime specific handshake between calls to managed/unmanaged functions.

llvm-svn: 237753

show more ...


# 285fe84e 19-May-2015 Igor Laevsky <igmyrj@gmail.com>

[RewriteStatepointsForGC] Fix up naming in "relocationViaAlloca" and run it through clang-format.

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

llvm-svn: 237703


# e0317186 19-May-2015 Igor Laevsky <igmyrj@gmail.com>

[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper to clone them after statepoint than to emit proper relocates for them. This change implements this logic. There is alr

[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper to clone them after statepoint than to emit proper relocates for them. This change implements this logic. There is alredy similar optimization in CodeGenPrepare, but doing so during RewriteStatepointsForGC allows to capture more opprtunities such as relocates in loops and longer instruction chains.

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

llvm-svn: 237701

show more ...


# ff6409d0 18-May-2015 David Blaikie <dblaikie@gmail.com>

Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only

llvm-svn: 237624


Revision tags: llvmorg-3.6.1
# 311f7106 12-May-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Extend base pointer to handle more cases w/vectors

When relocating a pointer, we need to determine a base pointer for the derived pointer being relocated. We have limited s

[RewriteStatepointsForGC] Extend base pointer to handle more cases w/vectors

When relocating a pointer, we need to determine a base pointer for the derived pointer being relocated. We have limited support for handling a pointer extracted from a vector; the current code only handled the case where the entire vector was known to contain base pointers. This patch extends the reasoning to handle chains of insertelements where the indices are constants. This case turns out to be fairly common in vectorized code. We can now handle vectors which contains mixtures of base and derived pointers provided the insertelements use constant indices.

Note that this doesn't solve the general problem. To handle variable indexed insertelements, we'd need to scalarize and introduce conditional branching based on the index. Alternatively, we could eagerly scalarize, but the code structure doesn't currently make either fix easy. The patch also doesn't handle shufflevector or other vector manipulation for much the same reasons. I plan to defer this work until I have a motivating test case.

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

llvm-svn: 237200

show more ...


# 5665c999 11-May-2015 Sanjoy Das <sanjoy@playingwithpointers.com>

Rename variables in gc_relocate related functions to follow LLVM's naming conventions.

Summary:
This patch is to rename some variables to CamelCase in gc_relocate
related functions. There is no func

Rename variables in gc_relocate related functions to follow LLVM's naming conventions.

Summary:
This patch is to rename some variables to CamelCase in gc_relocate
related functions. There is no functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237069

show more ...


Revision tags: llvmorg-3.6.1-rc1
# 89c5491a 11-May-2015 Sanjoy Das <sanjoy@playingwithpointers.com>

[RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers

Summary:
In RewriteStatepointsForGC pass, we create a gc_relocate intrinsic for
each relocated pointer,

[RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers

Summary:
In RewriteStatepointsForGC pass, we create a gc_relocate intrinsic for
each relocated pointer, and the gc_relocate has the same type with the
pointer. During the creation of gc_relocate intrinsic, llvm requires to
mangle its type. However, llvm does not support mangling of all possible
types. RewriteStatepointsForGC will hit an assertion failure when it
tries to create a gc_relocate for pointer to vector of pointers because
mangling for vector of pointers is not supported.

This patch changes the way RewriteStatepointsForGC pass creates
gc_relocate. For each relocated pointer, we erase the type of pointers
and create an unified gc_relocate of type i8 addrspace(1)*. Then a
bitcast is inserted to convert the gc_relocate to the correct type. In
this way, gc_relocate does not need to deal with different types of
pointers and the unsupported type mangling is no longer a problem. This
change would also ease further merge when LLVM erases types of pointers
and introduces an unified pointer type.

Some minor changes are also introduced to gc_relocate related part in
InstCombineCalls, CodeGenPrepare, and Verifier accordingly.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237009

show more ...


# 499d703f 06-May-2015 Sanjoy Das <sanjoy@playingwithpointers.com>

[Statepoint] Clean up Statepoint.h: accessor names.

Use getFoo() as accessors consistently and some other naming changes.

llvm-svn: 236564


# 63294cbb 26-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Exclude constant values from being considered live at a safepoint

There can be various constant pointers in the IR which do not get relocated at a safepoint. One example is

[RewriteStatepointsForGC] Exclude constant values from being considered live at a safepoint

There can be various constant pointers in the IR which do not get relocated at a safepoint. One example is the address of a global variable. Another example is a pointer created via inttoptr. Note that the optimizer itself likes to create such inttoptrs when locally propagating constants through dynamically dead code.

To deal with this, we need to exclude uses of constants from contributing to the liveness of a safepoint which might reach that use. At some later date, it might be worth exploring what could be done to support the relocation of various special types of "constants", but that's future work.

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

llvm-svn: 235821

show more ...


# ba198495 14-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Delete dead code [NFC]

Before we had real liveness, we needed to track every value that base pointer
insertion code created because these now might be live. We now just re

[RewriteStatepointsForGC] Delete dead code [NFC]

Before we had real liveness, we needed to track every value that base pointer
insertion code created because these now might be live. We now just rerun
the data flow liveness algorithm (which is actually faster!) and no longer
need the associated code.

llvm-svn: 234827

show more ...


# f209a153 13-Apr-2015 Philip Reames <listmail@philipreames.com>

[RwriteStatepointsForGC] Minor indentation and naming [NFC]

Use early-return style that's preferred in LLVM and updating the naming in places I touched with other changes in the last few days. Hope

[RwriteStatepointsForGC] Minor indentation and naming [NFC]

Use early-return style that's preferred in LLVM and updating the naming in places I touched with other changes in the last few days. Hopefully, NFC.

llvm-svn: 234785

show more ...


# 21142752 13-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Avoid inserting empty holder

We use dummy calls to adjust the liveness of values over statepoints in the midst of the insertion. If there are no values which need held liv

[RewriteStatepointsForGC] Avoid inserting empty holder

We use dummy calls to adjust the liveness of values over statepoints in the midst of the insertion. If there are no values which need held live, there's no point in actually inserting the holder.

llvm-svn: 234779

show more ...


# 69e51cae 13-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Fix a latent bug in normalization for invoke statepoint [NFC]

Since we're restructuring the CFG, we also need to make sure to update the analsis passes. While I'm touching

[RewriteStatepointsForGC] Fix a latent bug in normalization for invoke statepoint [NFC]

Since we're restructuring the CFG, we also need to make sure to update the analsis passes. While I'm touching the code, I dedicided to restructure it a bit. The code involved here was very confusing. This change moves the normalization to essentially being a pre-pass before the main insertion work and updates a few comments to actually say what is happening and *why*.

The restructuring should be covered by existing tests. I couldn't easily see how to create a test for the invalidation bug. Suggestions welcome.

llvm-svn: 234769

show more ...


# 9a2e01d9 13-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Strengthen assertions around liveness

This is related to the issues addressed in 234651. These assertions check the properties ensured by that change at the place of use.

[RewriteStatepointsForGC] Strengthen assertions around liveness

This is related to the issues addressed in 234651. These assertions check the properties ensured by that change at the place of use. Note that a similiar property is checked in checkBasicSSA, but without the reachability constraint. Technically, the liveness would be correct to include unreachable values, but this would be problematic for actual relocation.

llvm-svn: 234766

show more ...


# e73300b9 13-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Move an expensive debugging check to XDEBUG

The check in question is attempting to help find cases where we haven't relocated a pointer at a safepoint we should have. It d

[RewriteStatepointsForGC] Move an expensive debugging check to XDEBUG

The check in question is attempting to help find cases where we haven't relocated a pointer at a safepoint we should have. It does this by coercing the value to null at any safepoint which doesn't relocate it.

Unfortunately, this turns out to be rather expensive in terms of memory usage and time. The number of stores inserted can grow with O(number of values x number of statepoints). On at least one example I looked at, over half of peak memory usage was coming from this check.

With this change, the check is no longer enabled by default in Asserts builds. It is enabled for expensive asserts builds and has a command line option to enable it in both Asserts and non-Asserts builds.

llvm-svn: 234761

show more ...


# 9638ff9b 11-Apr-2015 Philip Reames <listmail@philipreames.com>

[Statepoints] Fix a release only build failure

A function which is used only in Asserts builds needs to be defined only in Asserts builds.

llvm-svn: 234667


# 4d80ede5 10-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Use a SetVector for a worklist [NFC]

Using a SetVector to replace equivelent but more verbose functionality.

llvm-svn: 234662


# df1ef08c 10-Apr-2015 Philip Reames <listmail@philipreames.com>

[RewriteStatepointsForGC] Use an actual liveness algorithm

When rewriting statepoints to make relocations explicit, we need to have a conservative but consistent notion of where a particular pointer

[RewriteStatepointsForGC] Use an actual liveness algorithm

When rewriting statepoints to make relocations explicit, we need to have a conservative but consistent notion of where a particular pointer is live at a particular site. The old code just used dominance, which is correct, but decidedly more conservative then it needed to be. This patch implements a simple dataflow algorithm that's run one per function (well, twice counting fixup after base pointer insertion). There's still lots of room to make this faster, but it's fast enough for all practical purposes today.

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

llvm-svn: 234657

show more ...


1...<<1112131415