History log of /llvm-project/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp (Results 26 – 50 of 96)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2
# 52545e60 26-Sep-2022 Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>

[DebugInfo][InferAddressSpaces] Propagate DebugLoc when cloning an instruction in InferAddressSpaces

Differential Revision: https://reviews.llvm.org/D134428


Revision tags: llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6
# dc9c2eac 10-Jun-2022 Guillaume Chatelet <gchatelet@google.com>

[NFC][Alignment] Simplify code


Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3
# 96d3be84 28-Apr-2022 Wenju He <wenju.he@intel.com>

[InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair

isNoopAddrSpaceCast is expecting SrcAS is different from DestAS.
If the two AS are the same, consider ptrtoint/inttoptr as noop

[InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair

isNoopAddrSpaceCast is expecting SrcAS is different from DestAS.
If the two AS are the same, consider ptrtoint/inttoptr as noop cast.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D123573

show more ...


Revision tags: llvmorg-14.0.2, llvmorg-14.0.1
# 26b14c3e 02-Apr-2022 Austin Kerbow <Austin.Kerbow@amd.com>

[InferAddressSpaces] Fix assert on invalid bitcast placement

Similar to the problem in 0bb25b4603, bitcasts that are inserted must
dominate all uses. When rewriting "values" with "new values" that h

[InferAddressSpaces] Fix assert on invalid bitcast placement

Similar to the problem in 0bb25b4603, bitcasts that are inserted must
dominate all uses. When rewriting "values" with "new values" that have
the updated address space, we may replace the "new value" with a bitcast
if one of the original users is an addresspace cast. This bitcast must
be inserted before ALL users, not only before the addresspace cast.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D122964

show more ...


# 2ed030ba 21-Mar-2022 psamolysov-intel <pavel.samolysov@intel.com>

[InferAddressSpaces][NFC] Small code improvements for the InferAddressSpaces pass

There is a bunch of code improvements in the patch: marking as const everything what can be
const and fixing some ty

[InferAddressSpaces][NFC] Small code improvements for the InferAddressSpaces pass

There is a bunch of code improvements in the patch: marking as const everything what can be
const and fixing some typos in comments.

Also the patch removes the shadowing parameter TTI from the rewriteWithNewAddressSpaces
method, the TTI parameter is not required because the same field is in the class.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D121671

show more ...


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# 59630917 02-Mar-2022 serge-sans-paille <sguelton@redhat.com>

Cleanup includes: Transform/Scalar

Estimated impact on preprocessor output line:
before: 1062981579
after: 1062494547

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cl

Cleanup includes: Transform/Scalar

Estimated impact on preprocessor output line:
before: 1062981579
after: 1062494547

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D120817

show more ...


Revision tags: llvmorg-14.0.0-rc2
# 0bb25b46 11-Feb-2022 Austin Kerbow <Austin.Kerbow@amd.com>

[InferAddressSpaces] Fix assert on invalid cast ordering

If a cast is needed when replacing uses with newly created values, the
cast must be inserted after the instruction that defines the new value

[InferAddressSpaces] Fix assert on invalid cast ordering

If a cast is needed when replacing uses with newly created values, the
cast must be inserted after the instruction that defines the new value.

Fixes: SWDEV-321215

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D119524

show more ...


Revision tags: llvmorg-14.0.0-rc1
# 52fbb786 09-Feb-2022 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Fix assert on inferred source for inttoptr/ptrtoint

If we had some source value we could infer an address space from that
went through a ptrtoint/inttoptr pair, this would fail s

InferAddressSpaces: Fix assert on inferred source for inttoptr/ptrtoint

If we had some source value we could infer an address space from that
went through a ptrtoint/inttoptr pair, this would fail since bitcast
can't change the address space.

Fixes issue 53665.

show more ...


Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 732e8968 31-Dec-2021 Kazu Hirata <kazu@google.com>

[Scalar] Remove a redundant declaration (NFC)

InitializePasses.h contains the proper declaration.

Identified with readability-redundant-declaration.


Revision tags: llvmorg-13.0.1-rc1
# bf225939 15-Oct-2021 Michael Liao <michael.hliao@gmail.com>

[InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

- CUDA cannot associate memory space with pointer types. Even though Clang could add extra attributes to specify the addres

[InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

- CUDA cannot associate memory space with pointer types. Even though Clang could add extra attributes to specify the address space explicitly on a pointer type, it breaks the portability between Clang and NVCC.
- This change proposes to assume the address space from a pointer from the assumption built upon target-specific address space predicates, such as `__isGlobal` from CUDA. E.g.,

```
foo(float *p) {
__builtin_assume(__isGlobal(p));
// From there, we could assume p is a global pointer instead of a
// generic one.
}
```

This makes the code portable without introducing the implementation-specific features.

Note that NVCC starts to support __builtin_assume from version 11.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D112041

show more ...


# ae27c57b 27-Oct-2021 Arthur Eubanks <aeubanks@google.com>

[InferAddressSpaces] Make pass work with opaque pointers

Avoid getPointerElementType().


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init
# b988d69e 15-Jul-2021 Artem Belevich <tra@google.com>

[infer-address-spaces] Handle complex non-pointer constexpr arguments.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51099

Differential Revision: https://reviews.llvm.org/D106098


# 9a7afae4 09-Jul-2021 Arthur Eubanks <aeubanks@google.com>

[OpaquePtr][InferAddrSpace] Use PointerType::getWithSamePointeeType()


# 37b6e03c 30-Jun-2021 Jon Roelofs <jonathan_roelofs@apple.com>

[Intrinsics] Make MemCpyInlineInst a MemCpyInst

This opens up more optimization opportunities in passes that already handle MemCpyInst's.

Differential revision: https://reviews.llvm.org/D105247


Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4
# ae983de6 28-Jun-2021 Reshabh Sharma <Reshabhkumar.Sharma@amd.com>

[InferAddressSpaces] NFC: For noop IntToPtr/PtrToInt pair cast to operator instead of PtrToInt

Compiler crashes at an assertion while casting operands to PtrToIntInst at some cases when
ptrtoint is

[InferAddressSpaces] NFC: For noop IntToPtr/PtrToInt pair cast to operator instead of PtrToInt

Compiler crashes at an assertion while casting operands to PtrToIntInst at some cases when
ptrtoint is present as an explicit operand to inttoptr. Explicit instruction operator as
operand can not be casted to an Instruction.

This patch replaces cast from PtrToInst to Operator which are later checked for constant
expressions.

Differential Revision: https://reviews.llvm.org/D105002

show more ...


Revision tags: llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1
# c2ef06d3 28-Dec-2020 Arthur Eubanks <aeubanks@google.com>

[NewPM] Port infer-address-spaces

And add it to the AMDGPU opt pipeline.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D93880


# 5d2529f2 29-Dec-2020 Kazu Hirata <kazu@google.com>

[Scalar] Construct SmallVector with iterator ranges (NFC)


Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1
# f375885a 07-Nov-2020 Michael Liao <michael.hliao@gmail.com>

[InferAddrSpace] Teach to handle assumed address space.

- In certain cases, a generic pointer could be assumed as a pointer to
the global memory space or other spaces. With a dedicated target hook

[InferAddrSpace] Teach to handle assumed address space.

- In certain cases, a generic pointer could be assumed as a pointer to
the global memory space or other spaces. With a dedicated target hook
to query that address space from a given value, infer-address-space
pass could infer and propagate that to all its users.

Differential Revision: https://reviews.llvm.org/D91121

show more ...


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3
# 7d6ca2ec 15-Sep-2020 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Fix assert with unreachable code

Invalid IR in unreachable code is technically valid IR. In this case,
the address space of the value was never inferred, and we tried to
rewrite

InferAddressSpaces: Fix assert with unreachable code

Invalid IR in unreachable code is technically valid IR. In this case,
the address space of the value was never inferred, and we tried to
rewrite it with an invalid address space value which would assert.

show more ...


Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2
# dccfaacf 16-Jun-2020 Michael Liao <michael.hliao@gmail.com>

[InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

Summary:
- `ptrtoint` and `inttoptr` are defined as no-op casts if the integer
value as the same size as the pointer value. The pair

[InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.

Summary:
- `ptrtoint` and `inttoptr` are defined as no-op casts if the integer
value as the same size as the pointer value. The pair of
`ptrtoint`/`inttoptr` is in fact a no-op cast sequence between
different address spaces. Teach `infer-address-spaces` to handle them
like a `bitcast`.

Reviewers: arsenm, chandlerc

Subscribers: jvesely, wdng, nhaehnle, hiraditya, kerbowa, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D81938

show more ...


Revision tags: llvmorg-10.0.1-rc1
# d6671ee9 15-May-2020 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Handle ptrmask intrinsic

This one is slightly odd since it counts as an address expression,
which previously could never fail. Allow the existing TTI hook to
return the value to

InferAddressSpaces: Handle ptrmask intrinsic

This one is slightly odd since it counts as an address expression,
which previously could never fail. Allow the existing TTI hook to
return the value to use, and re-use it for handling how to handle
ptrmask.

Handles the no-op addrspacecasts for AMDGPU. We could probably do
something better based on analysis of the mask value based on the
address space, but leave that for now.

show more ...


# 9a08c307 21-Apr-2020 Benjamin Kramer <benny.kra@googlemail.com>

Bit-pack some pairs. No functionlity change intended.


Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init
# 531c1161 16-Dec-2019 Guillaume Chatelet <gchatelet@google.com>

Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove"

Summary:
This is a resubmit of D71473.

This patch introduces a set of functions to enable deprecation of IRBuilder functions without

Resubmit "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove"

Summary:
This is a resubmit of D71473.

This patch introduces a set of functions to enable deprecation of IRBuilder functions without breaking out of tree clients.
Functions will be deprecated one by one and as in tree code is cleaned up.

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: aaron.ballman, courbet

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71547

show more ...


# 4658da10 16-Dec-2019 Guillaume Chatelet <gchatelet@google.com>

Revert "[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove"

This reverts commit 181ab91efc9fb08dedda10a2fbc5fccb83ce8799.


# 181ab91e 13-Dec-2019 Guillaume Chatelet <gchatelet@google.com>

[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove

Summary:
This patch introduces a set of functions to enable deprecation of IRBuilder functions without breaking out of tree clients.
Functions w

[Alignment][NFC] Deprecate CreateMemCpy/CreateMemMove

Summary:
This patch introduces a set of functions to enable deprecation of IRBuilder functions without breaking out of tree clients.
Functions will be deprecated one by one and as in tree code is cleaned up.

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71473

show more ...


1234