History log of /llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp (Results 276 – 300 of 785)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6fefc0d6 02-Nov-2017 Yichao Yu <yyc1992@gmail.com>

Allow inaccessiblememonly and inaccessiblemem_or_argmemonly to be overwriten on call site with operand bundle

Summary:
Similar to argmemonly, readonly and readnone.

Fix PR35128

Reviewers: andrew.w

Allow inaccessiblememonly and inaccessiblemem_or_argmemonly to be overwriten on call site with operand bundle

Summary:
Similar to argmemonly, readonly and readnone.

Fix PR35128

Reviewers: andrew.w.kaylor, chandlerc, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

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

llvm-svn: 317201

show more ...


Revision tags: llvmorg-5.0.1-rc1
# ba1c9f7a 06-Sep-2017 Nuno Lopes <nunoplopes@sapo.pt>

Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias
Remove code that assumed that a nullptr of address space != 0 couldnt alias with a non-null pointer. This is incorrect, s

Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias
Remove code that assumed that a nullptr of address space != 0 couldnt alias with a non-null pointer. This is incorrect, since nothing can be concluded about a null pointer in an address space != 0.
This code was written before address spaces were introduced

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

llvm-svn: 312648

show more ...


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3
# 530851c2 11-Aug-2017 Eugene Zelenko <eugene.zelenko@gmail.com>

[Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 310766


Revision tags: llvmorg-5.0.0-rc2
# 598d1632 08-Aug-2017 Nuno Lopes <nunoplopes@sapo.pt>

BasicAA: assert on another case where aliasGEP shouldn't get a PartialAlias response

llvm-svn: 310420


# c7d4110a 08-Aug-2017 Nuno Lopes <nunoplopes@sapo.pt>

BasicAA: aliasGEP shouldn't get a PartialAlias response here
add an assert() to ensure that's the case (as I'm not convinced it won't happen)

llvm-svn: 310373


Revision tags: llvmorg-5.0.0-rc1
# a089dd86 11-Jul-2017 NAKAMURA Takumi <geek4civic@gmail.com>

Whitespace.

llvm-svn: 307614


# 76bab1f2 11-Jul-2017 NAKAMURA Takumi <geek4civic@gmail.com>

Revert r307581, "Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet."

It broke stage2 tests in selfhosting.

llvm-svn: 307613


# 2ff973f2 10-Jul-2017 Farhana Aleen <farhana.a.aleen@intel.com>

Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet.

Reviewers: Daniel Berlin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.o

Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet.

Reviewers: Daniel Berlin

Subscribers: llvm-commits

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

llvm-svn: 307581

show more ...


# d3711ee9 22-Jun-2017 Craig Topper <craig.topper@intel.com>

[BasicAA] Add type check and Value equality check around code added in r305481.

This matches the checks done at the beginning of isKnownNonEqual that this code is partially emulating.

Without this

[BasicAA] Add type check and Value equality check around code added in r305481.

This matches the checks done at the beginning of isKnownNonEqual that this code is partially emulating.

Without this we can get assertion failures due to the bit widths of the KnownBits not matching.

llvm-svn: 306044

show more ...


# 47f85609 21-Jun-2017 Michael Kruse <llvm@meinersbur.de>

[BasicAA] Use MayAlias instead of PartialAlias for fallback.

Using various methods, BasicAA tries to determine whether two
GetElementPtr memory locations alias when its base pointers are known
to be

[BasicAA] Use MayAlias instead of PartialAlias for fallback.

Using various methods, BasicAA tries to determine whether two
GetElementPtr memory locations alias when its base pointers are known
to be equal. When none of its heuristics are applicable, it falls back
to PartialAlias to, according to a comment, protect TBAA making a wrong
decision in case of unions and malloc. PartialAlias is not correct,
because a PartialAlias result implies that some, but not all, bytes
overlap which is not necessarily the case here.

AAResults returns the first analysis result that is not MayAlias.
BasicAA is always the first alias analysis. When it returns
PartialAlias, no other analysis is queried to give a more exact result
(which was the intention of returning PartialAlias instead of MayAlias).
For instance, ScopedAA could return a more accurate result.

The PartialAlias hack was introduced in r131781 (and re-applied in
r132632 after some reverts) to fix llvm.org/PR9971 where TBAA returns a
wrong NoAlias result due to a union. A test case for the malloc case
mentioned in the comment was not provided and I don't think it is
affected since it returns an omnipotent char anyway.

Since r303851 (https://reviews.llvm.org/D33328) clang does emit specific
TBAA for unions anymore (but "omnipotent char" instead). Hence, the
PartialAlias workaround is not required anymore.

This patch passes the test-suite and check-llvm/check-clang of a
self-hoisted build on x64.

Reviewed By: hfinkel

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

llvm-svn: 305938

show more ...


# 58752546 15-Jun-2017 Craig Topper <craig.topper@intel.com>

[BasicAA] Don't call isKnownNonEqual if we might be have gone through a PHINode.

This is a fix for the test case in PR32314.

Basic Alias Analysis can ask if two nodes are known non-equal after look

[BasicAA] Don't call isKnownNonEqual if we might be have gone through a PHINode.

This is a fix for the test case in PR32314.

Basic Alias Analysis can ask if two nodes are known non-equal after looking through a phi node to find a GEP. isAddOfNonZero saw an add of a constant from the same phi and said that its output couldn't be equal. But Basic Alias Analysis was really asking about the value from the previous loop iteration.

This patch at least makes that case not happen anymore, I'm not sure if there were still other ways this can fail. As was discussed in the bug, it looks like fixing BasicAA would be difficult so this patch seemed like a possible workaround

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

llvm-svn: 305481

show more ...


Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2
# a5130bbd 19-May-2017 Daniel Berlin <dberlin@dberlin.org>

BasicAA: Uninserted instructions have no parent, and notDifferentParent explicitly allows for this case, but getParent crashes when handed one.

llvm-svn: 303442


# 1a36b7d8 15-May-2017 Craig Topper <craig.topper@gmail.com>

[ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits.

This patch finishes off the conversion of ComputeSignBit to computeKnownBits.

Differential Revision: https://reviews.llvm.o

[ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits.

This patch finishes off the conversion of ComputeSignBit to computeKnownBits.

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

llvm-svn: 303035

show more ...


# dfc8955e 14-May-2017 Craig Topper <craig.topper@gmail.com>

[BasicAA] Alphabetize includes. NFC

llvm-svn: 303002


# 9fe35797 13-May-2017 Craig Topper <craig.topper@gmail.com>

[ValueTracking] Remove const_casts on several calls to computeKnownBits and ComputeSignBit. NFC

llvm-svn: 302991


Revision tags: llvmorg-4.0.1-rc1
# 610c966a 24-Apr-2017 Piotr Padlewski <piotr.padlewski@gmail.com>

Handle invariant.group.barrier in BasicAA

Summary:
llvm.invariant.group.barrier returns pointer that mustalias
pointer it takes. It can't be marked with `returned` attribute,
because it would be rem

Handle invariant.group.barrier in BasicAA

Summary:
llvm.invariant.group.barrier returns pointer that mustalias
pointer it takes. It can't be marked with `returned` attribute,
because it would be remove easily. The other reason is that
only Alias Analysis can know about this, because if any other
pass would know it, then the result would be replaced with it's
argument, which would be invalid.

We can think about returned pointer as something that mustalias, but
it doesn't have to be bitwise the same as the argument.

Reviewers: dberlin, chandlerc, hfinkel, sanjoy

Subscribers: reames, nlewycky, rsmith, anna, amharc

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

llvm-svn: 301227

show more ...


# f09c1e34 18-Apr-2017 Sanjoy Das <sanjoy@playingwithpointers.com>

Add a getPointerOperandType() helper to LoadInst and StoreInst; NFC

I will use this in a later change.

llvm-svn: 300613


# 09bb760b 18-Apr-2017 Craig Topper <craig.topper@gmail.com>

[MemoryBuiltins] Add isMallocOrCallocLikeFn so BasicAA can check for both at the same time

BasicAA wants to know if a function is either a malloc or calloc like function. Currently we have to check

[MemoryBuiltins] Add isMallocOrCallocLikeFn so BasicAA can check for both at the same time

BasicAA wants to know if a function is either a malloc or calloc like function. Currently we have to check both separately. This means both calls check if its an intrinsic, query TLI, check the nobuiltin attribute, scan the AllocationFnData, etc.

This patch adds a isMallocOrCallocLikeFn so we can go through all of the checks once per call.

This also changes the one other location I saw that called both together.

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

llvm-svn: 300608

show more ...


# fb502d2f 14-Apr-2017 Reid Kleckner <rnk@google.com>

[IR] Make paramHasAttr to use arg indices instead of attr indices

This avoids the confusing 'CS.paramHasAttr(ArgNo + 1, Foo)' pattern.

Previously we were testing return value attributes with index

[IR] Make paramHasAttr to use arg indices instead of attr indices

This avoids the confusing 'CS.paramHasAttr(ArgNo + 1, Foo)' pattern.

Previously we were testing return value attributes with index 0, so I
introduced hasReturnAttr() for that use case.

llvm-svn: 300367

show more ...


# 56c7e88c 21-Mar-2017 George Burgess IV <george.burgess.iv@gmail.com>

Let llvm.objectsize be conservative with null pointers

This adds a parameter to @llvm.objectsize that makes it return
conservative values if it's given null.

This fixes PR23277.

Differential Revis

Let llvm.objectsize be conservative with null pointers

This adds a parameter to @llvm.objectsize that makes it return
conservative values if it's given null.

This fixes PR23277.

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

llvm-svn: 298430

show more ...


Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3
# 37cba436 01-Mar-2017 Igor Laevsky <igmyrj@gmail.com>

[BasicAA] Take attributes into account when requesting modref info for a call site

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

llvm-svn: 296617


Revision tags: llvmorg-4.0.0-rc2
# 1726fc69 27-Jan-2017 Mehdi Amini <mehdi.amini@apple.com>

Fix BasicAA incorrect assumption on GEP

This is fixing pr31761: BasicAA is deducing NoAlias
on the result of the GEP if the base pointer is itself NoAlias.

This is possible only if the NoAlias on t

Fix BasicAA incorrect assumption on GEP

This is fixing pr31761: BasicAA is deducing NoAlias
on the result of the GEP if the base pointer is itself NoAlias.

This is possible only if the NoAlias on the base pointer is
deduced with a non-sized query: this should guarantee that
the pointers are belonging to different memory allocation
and that the GEP can't legally jump from one to another.

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

llvm-svn: 293293

show more ...


# d21529fa 23-Jan-2017 David L. Jones <dlj@google.com>

[Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC)

Summary:
The LibFunc::Func enum holds enumerators named for libc functions.
Unfortunately, there are real situations, including li

[Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC)

Summary:
The LibFunc::Func enum holds enumerators named for libc functions.
Unfortunately, there are real situations, including libc implementations, where
function names are actually macros (musl uses "#define fopen64 fopen", for
example; any other transitively visible macro would have similar effects).

Strictly speaking, a conforming C++ Standard Library should provide any such
macros as functions instead (via <cstdio>). However, there are some "library"
functions which are not part of the standard, and thus not subject to this
rule (fopen64, for example). So, in order to be both portable and consistent,
the enum should not use the bare function names.

The old enum naming used a namespace LibFunc and an enum Func, with bare
enumerators. This patch changes LibFunc to be an enum with enumerators prefixed
with "LibFFunc_". (Unfortunately, a scoped enum is not sufficient to override
macros.)

There are additional changes required in clang.

Reviewers: rsmith

Subscribers: mehdi_amini, mzolotukhin, nemanjai, llvm-commits

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

llvm-svn: 292848

show more ...


Revision tags: llvmorg-4.0.0-rc1
# 56fe48b7 27-Dec-2016 Chandler Carruth <chandlerc@gmail.com>

[PM] Remove a pointless optimization.

There is no need to do this within an analysis. That method shouldn't
even be reached if this predicate holds as the actual useful
optimization is in the analys

[PM] Remove a pointless optimization.

There is no need to do this within an analysis. That method shouldn't
even be reached if this predicate holds as the actual useful
optimization is in the analysis manager itself.

llvm-svn: 290614

show more ...


# aa351675 27-Dec-2016 Chandler Carruth <chandlerc@gmail.com>

[PM] Teach BasicAA how to invalidate its result object.

This requires custom handling because BasicAA caches handles to other
analyses and so it needs to trigger indirect invalidation.

This fixes o

[PM] Teach BasicAA how to invalidate its result object.

This requires custom handling because BasicAA caches handles to other
analyses and so it needs to trigger indirect invalidation.

This fixes one of the common crashes when using the new PM in real
pipelines. I've also tweaked a regression test to check that we are at
least handling the most immediate case.

I'm going to work at re-structuring this test some to both scale better
(rather than all being in one file) and check more invalidation paths in
a follow-up commit, but I wanted to get the basic bug fix in place.

llvm-svn: 290603

show more ...


1...<<11121314151617181920>>...32