#
a0d2fd4a |
| 28-May-2020 |
Philip Reames <listmail@philipreames.com> |
[Statepoint] Sink actual_args and gc_args to GCStatepointInst [NFC]
These are the two operand sets which are expected to survive more than another week or so. Instead of bothering to update the deo
[Statepoint] Sink actual_args and gc_args to GCStatepointInst [NFC]
These are the two operand sets which are expected to survive more than another week or so. Instead of bothering to update the deopt and gc-transition operands, we'll just wait until those are removed and delete the code.
For those following along, this is likely to be the last (major) change in this sequence for about a week. I want to wait until all of this has been merged downstream to ensure I haven't introduced any bugs (and migrate some downstream code to the new interfaces). Once that's done, we should be able to delete Statepoint/ImmutableStatepoint without too much work.
show more ...
|
#
587fa99c |
| 28-May-2020 |
Philip Reames <listmail@philipreames.com> |
Default to generating statepoints with deopt and gc-transition bundles if needed
Continues from D80598.
The key point of the change is to default to using operand bundles instead of the inline leng
Default to generating statepoints with deopt and gc-transition bundles if needed
Continues from D80598.
The key point of the change is to default to using operand bundles instead of the inline length prefix argument lists for statepoint nodes. An important subtlety to note is that the presence of a bundle has semantic meaning, even if it is empty. As such, we need to make a somewhat deeper change to the interface than is first obvious.
Existing code treats statepoint deopt arguments and the deopt bundle operands differently during inlining. The former is ignored (resulting in caller state being dropped), the later is merged.
We can't preserve the old behaviour for calls with deopt fed to RS4GC and then inlining, but we can avoid the no-deopt case changing. At least in internal testing, that seem to be the important one. (I'd argue the "stop merging after RS4GC" behaviour for the former was always "unexpected", but that the behaviour for non-deopt calls actually make sense.)
Differential Revision: https://reviews.llvm.org/D80674
show more ...
|
#
87bea912 |
| 28-May-2020 |
Philip Reames <listmail@philipreames.com> |
[Statepoint] Replace uses of isX functions with idiomatic isa<X>
Now that all of the statepoint related routines have classes with isa support, let's cleanup.
I'm leaving the (dead) utitilities in
[Statepoint] Replace uses of isX functions with idiomatic isa<X>
Now that all of the statepoint related routines have classes with isa support, let's cleanup.
I'm leaving the (dead) utitilities in tree for a few days so that I can do the same cleanup downstream without breakage.
show more ...
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
11aa3707 |
| 14-May-2020 |
Eli Friedman <efriedma@quicinc.com> |
StoreInst should store Align, not MaybeAlign
This is D77454, except for stores. All the infrastructure work was done for loads, so the remaining changes necessary are relatively small.
Differentia
StoreInst should store Align, not MaybeAlign
This is D77454, except for stores. All the infrastructure work was done for loads, so the remaining changes necessary are relatively small.
Differential Revision: https://reviews.llvm.org/D79968
show more ...
|
#
eb282be9 |
| 14-May-2020 |
Anna Thomas <anna@azul.com> |
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer""
This is relanding of rGbb308b020522420413c7d3f2989a88f2fc423c56 after speculatively fixing buildbot lit test failure wh
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer""
This is relanding of rGbb308b020522420413c7d3f2989a88f2fc423c56 after speculatively fixing buildbot lit test failure which was seen on two bots (I cannot reproduce the lit test failure locally either).
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer
Summary: This is a more general fix to 59029b9eef23 (D75704). This patch does the following:
updates isKnownBaseValue to account for base pointer and derived pointer having differing types.
This inturn allows us to populate the lattice (States) for such derived pointers.
It also updates all states where the base and derived pointers have differing types (vector versus scalar) and conservatively marks these states as conflictcs. Note that in 59029b9eef23, we were just fixing existing lattice values and that too, only for uses of extractelement.
Reviewers: reames, skatkov, dantrushin
Reviewed By: skatkov
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D76305
show more ...
|
#
f20c6274 |
| 14-May-2020 |
Anna Thomas <anna@azul.com> |
Revert "[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer"
This reverts commit bb308b020522420413c7d3f2989a88f2fc423c56. Failing a testcase.
|
#
bb308b02 |
| 14-May-2020 |
Anna Thomas <anna@azul.com> |
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer
Summary: This is a more general fix to 59029b9eef23 (D75704). This patch does the following: 1. updates isKnownBaseValue
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer
Summary: This is a more general fix to 59029b9eef23 (D75704). This patch does the following: 1. updates isKnownBaseValue to account for base pointer and derived pointer having differing types. 2. This inturn allows us to populate the lattice (States) for such derived pointers. 3. It also updates all states where the base and derived pointers have differing types (vector versus scalar) and conservatively marks these states as conflictcs. Note that in 59029b9eef23, we were just fixing existing lattice values and that too, only for uses of extractelement.
Reviewers: reames, skatkov, dantrushin
Reviewed By: skatkov
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D76305
show more ...
|
#
40574fef |
| 28-Apr-2020 |
Sam Parker <sam.parker@arm.com> |
[NFC][CostModel] Add TargetCostKind to relevant APIs
Make the kind of cost explicit throughout the cost model which, apart from making the cost clear, will allow the generic parts to calculate bette
[NFC][CostModel] Add TargetCostKind to relevant APIs
Make the kind of cost explicit throughout the cost model which, apart from making the cost clear, will allow the generic parts to calculate better costs. It will also allow some backends to approximate and correlate the different costs if they wish. Another benefit is that it will also help simplify the cost model around immediate and intrinsic costs, where we currently have multiple APIs.
RFC thread: http://lists.llvm.org/pipermail/llvm-dev/2020-April/141263.html
Differential Revision: https://reviews.llvm.org/D79002
show more ...
|
#
7a5a1e94 |
| 01-May-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[IR] AttributeList::getContext has a single user, remove it.
|
#
a58b62b4 |
| 28-Apr-2020 |
Craig Topper <craig.topper@gmail.com> |
[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOpe
[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOperand().
I also made a few cleanups in here. For example, to removes use of getElementType on a pointer when we could just use getFunctionType from the call.
Differential Revision: https://reviews.llvm.org/D78882
show more ...
|
#
19cc9b9d |
| 09-Apr-2020 |
Christopher Tetreault <ctetreau@quicinc.com> |
Clean up usages of asserting vector getters in Type
Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicate
Clean up usages of asserting vector getters in Type
Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicates the refactor while adding little value.
Reviewers: efriedma, sdesmalen, rriddle
Reviewed By: sdesmalen
Subscribers: hiraditya, dantrushin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77261
show more ...
|
#
1ee6ec2b |
| 31-Mar-2020 |
Eli Friedman <efriedma@quicinc.com> |
Remove "mask" operand from shufflevector.
Instead, represent the mask as out-of-line data in the instruction. This should be more efficient in the places that currently use getShuffleVector(), and p
Remove "mask" operand from shufflevector.
Instead, represent the mask as out-of-line data in the instruction. This should be more efficient in the places that currently use getShuffleVector(), and paves the way for further changes to add new shuffles for scalable vectors.
This doesn't change the syntax in textual IR. And I don't currently plan to change the bitcode encoding in this patch, although we'll probably need to do something once we extend shufflevector for scalable types.
I expect that once this is finished, we can then replace the raw "mask" with something more appropriate for scalable vectors. Not sure exactly what this looks like at the moment, but there are a few different ways we could handle it. Maybe we could try to describe specific shuffles. Or maybe we could define it in terms of a function to convert a fixed-length array into an appropriate scalable vector, using a "step", or something like that.
Differential Revision: https://reviews.llvm.org/D72467
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4 |
|
#
59029b9e |
| 06-Mar-2020 |
Anna Thomas <anna@azul.com> |
[RS4GC] Handle uses of extractelement for conversion from vector to scalar base
As mentioned in the comments, extractelement is special since we actually want a scalar base for that element we extra
[RS4GC] Handle uses of extractelement for conversion from vector to scalar base
As mentioned in the comments, extractelement is special since we actually want a scalar base for that element we extracted from the vector (i.e. not a vector base). This same logic should apply to uses of the extractelement such as phis and selects which have the same BDV as the extractelement. Howeber, for these uses we conservatively mark the BDV state as conflict, since setting the EE's new base BDV does not always dominate these uses.
Added testcase showcases the problem where the BDV identification chokes on the incorrect cast from vector to scalar for the phi use of extractelement.
Tests-Run: make check, internal fuzzer testing
Reviewers: reames, skatkov, dantrushin Reviewed-By: dantrushin
Differential Revision: https://reviews.llvm.org/D75704
show more ...
|
Revision tags: llvmorg-10.0.0-rc3 |
|
#
7c362b25 |
| 16-Feb-2020 |
Nikita Popov <nikita.ppv@gmail.com> |
[IRBuilder] Fix unnecessary IRBuilder copies; NFC
Fix a few cases where an IRBuilder is passed to a helper function by value, while a by reference pass was intended.
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
05da2fe5 |
| 13-Nov-2019 |
Reid Kleckner <rnk@google.com> |
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of reco
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation.
I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h
Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild.
Reviewers: bkramer, asbirlea, bollu, jdoerfert
Differential Revision: https://reviews.llvm.org/D70211
show more ...
|
#
eb6700b5 |
| 02-Oct-2019 |
Florian Hahn <flo@fhahn.com> |
[Local] Remove unused LazyValueInfo pointer from removeUnreachableBlock.
There are no users that pass in LazyValueInfo, so we can simplify the function a bit.
Reviewers: brzycki, asbirlea, davide
[Local] Remove unused LazyValueInfo pointer from removeUnreachableBlock.
There are no users that pass in LazyValueInfo, so we can simplify the function a bit.
Reviewers: brzycki, asbirlea, davide
Reviewed By: davide
Differential Revision: https://reviews.llvm.org/D68297
llvm-svn: 373488
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4 |
|
#
9c27b59c |
| 07-Sep-2019 |
Teresa Johnson <tejohnson@google.com> |
Change TargetLibraryInfo analysis passes to always require Function
Summary: This is the first change to enable the TLI to be built per-function so that -fno-builtin* handling can be migrated to use
Change TargetLibraryInfo analysis passes to always require Function
Summary: This is the first change to enable the TLI to be built per-function so that -fno-builtin* handling can be migrated to use function attributes. See discussion on D61634 for background. This is an enabler for fixing handling of these options for LTO, for example.
This change should not affect behavior, as the provided function is not yet used to build a specifically per-function TLI, but rather enables that migration.
Most of the changes were very mechanical, e.g. passing a Function to the legacy analysis pass's getTLI interface, or in Module level cases, adding a callback. This is similar to the way the per-function TTI analysis works.
There was one place where we were looking for builtins but not in the context of a specific function. See FindCXAAtExit in lib/Transforms/IPO/GlobalOpt.cpp. I'm somewhat concerned my workaround could provide the wrong behavior in some corner cases. Suggestions welcome.
Reviewers: chandlerc, hfinkel
Subscribers: arsenm, dschuff, jvesely, nhaehnle, mehdi_amini, javed.absar, sbc100, jgravelle-google, eraman, aheejin, steven_wu, george.burgess.iv, dexonsmith, jfb, asbirlea, gchatelet, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66428
llvm-svn: 371284
show more ...
|
Revision tags: llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3 |
|
#
3160734a |
| 11-Feb-2019 |
Chandler Carruth <chandlerc@gmail.com> |
[CallSite removal] Migrate the statepoint GC infrastructure to use the `CallBase` class rather than `CallSite` wrappers.
I pushed this change down through most of the statepoint infrastructure, comp
[CallSite removal] Migrate the statepoint GC infrastructure to use the `CallBase` class rather than `CallSite` wrappers.
I pushed this change down through most of the statepoint infrastructure, completely removing the use of CallSite where I could reasonably do so. I ended up making a couple of cut-points: generic call handling (instcombine, TLI, SDAG). As soon as it hit truly generic handling with users outside the immediate code, I simply transitioned into or out of a `CallSite` to make this a reasonable sized chunk.
Differential Revision: https://reviews.llvm.org/D56122
llvm-svn: 353660
show more ...
|
Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
#
5f436fc5 |
| 06-Feb-2019 |
Richard Trieu <rtrieu@google.com> |
Move DomTreeUpdater from IR to Analysis
DomTreeUpdater depends on headers from Analysis, but is in IR. This is a layering violation since Analysis depends on IR. Relocate this code from IR to Anal
Move DomTreeUpdater from IR to Analysis
DomTreeUpdater depends on headers from Analysis, but is in IR. This is a layering violation since Analysis depends on IR. Relocate this code from IR to Analysis to fix the layering violation.
llvm-svn: 353265
show more ...
|
#
14359ef1 |
| 01-Feb-2019 |
James Y Knight <jyknight@google.com> |
[opaque pointer types] Pass value type to LoadInst creation.
This cleans up all LoadInst creation in LLVM to explicitly pass the value type rather than deriving it from the pointer's element-type.
[opaque pointer types] Pass value type to LoadInst creation.
This cleans up all LoadInst creation in LLVM to explicitly pass the value type rather than deriving it from the pointer's element-type.
Differential Revision: https://reviews.llvm.org/D57172
llvm-svn: 352911
show more ...
|
#
7976eb58 |
| 01-Feb-2019 |
James Y Knight <jyknight@google.com> |
[opaque pointer types] Pass function types to CallInst creation.
This cleans up all CallInst creation in LLVM to explicitly pass a function type rather than deriving it from the pointer's element-ty
[opaque pointer types] Pass function types to CallInst creation.
This cleans up all CallInst creation in LLVM to explicitly pass a function type rather than deriving it from the pointer's element-type.
Differential Revision: https://reviews.llvm.org/D57170
llvm-svn: 352909
show more ...
|
#
13680223 |
| 01-Feb-2019 |
James Y Knight <jyknight@google.com> |
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc doesn't choke on it, hopefully.
Original Message: The Func
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc doesn't choke on it, hopefully.
Original Message: The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue passing the result of getOrInsertFunction() through to EmitCall, even once pointer types lose their pointee-type.
Then: - update the CallInst/InvokeInst instruction creation functions to take a Callee, - modify getOrInsertFunction to return FunctionCallee, and - update all callers appropriately.
One area of particular note is the change to the sanitizer code. Previously, they had been casting the result of `getOrInsertFunction` to a `Function*` via `checkSanitizerInterfaceFunction`, and storing that. That would report an error if someone had already inserted a function declaraction with a mismatching signature.
However, in general, LLVM allows for such mismatches, as `getOrInsertFunction` will automatically insert a bitcast if needed. As part of this cleanup, cause the sanitizer code to do the same. (It will call its functions using the expected signature, however they may have been declared.)
Finally, in a small number of locations, callers of `getOrInsertFunction` actually were expecting/requiring that a brand new function was being created. In such cases, I've switched them to Function::Create instead.
Differential Revision: https://reviews.llvm.org/D57315
llvm-svn: 352827
show more ...
|
#
fadf2506 |
| 31-Jan-2019 |
James Y Knight <jyknight@google.com> |
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791).
Seems to run into compilation failures with GC
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791).
Seems to run into compilation failures with GCC (but not clang, where I tested it). Reverting while I investigate.
llvm-svn: 352800
show more ...
|
#
f47d6b38 |
| 31-Jan-2019 |
James Y Knight <jyknight@google.com> |
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue pas
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue passing the result of getOrInsertFunction() through to EmitCall, even once pointer types lose their pointee-type.
Then: - update the CallInst/InvokeInst instruction creation functions to take a Callee, - modify getOrInsertFunction to return FunctionCallee, and - update all callers appropriately.
One area of particular note is the change to the sanitizer code. Previously, they had been casting the result of `getOrInsertFunction` to a `Function*` via `checkSanitizerInterfaceFunction`, and storing that. That would report an error if someone had already inserted a function declaraction with a mismatching signature.
However, in general, LLVM allows for such mismatches, as `getOrInsertFunction` will automatically insert a bitcast if needed. As part of this cleanup, cause the sanitizer code to do the same. (It will call its functions using the expected signature, however they may have been declared.)
Finally, in a small number of locations, callers of `getOrInsertFunction` actually were expecting/requiring that a brand new function was being created. In such cases, I've switched them to Function::Create instead.
Differential Revision: https://reviews.llvm.org/D57315
llvm-svn: 352791
show more ...
|
#
4d683ee7 |
| 24-Jan-2019 |
Philip Reames <listmail@philipreames.com> |
[RS4GC] Be slightly less conservative for gep vector_base, scalar_idx
After submitting https://reviews.llvm.org/D57138, I realized it was slightly more conservative than needed. The scalar indices d
[RS4GC] Be slightly less conservative for gep vector_base, scalar_idx
After submitting https://reviews.llvm.org/D57138, I realized it was slightly more conservative than needed. The scalar indices don't appear to be a problem on a vector gep, we even had a test for that.
Differential Revision: https://reviews.llvm.org/D57161
llvm-svn: 352061
show more ...
|