diff options
author | Tyker <tyker1@outlook.com> | 2021-02-10 01:32:00 +0100 |
---|---|---|
committer | Tyker <tyker1@outlook.com> | 2021-02-10 01:32:00 +0100 |
commit | 5652e192fc22ed2281192d5fe80c7ea76bbbe719 (patch) | |
tree | 422b4426f4a1d05d40a9f6ece892c6789cd39ac4 /llvm/lib/Analysis/Loads.cpp | |
parent | 3dcb535115e48a90886ed6cf275bd3eea14e354f (diff) | |
download | llvm-5652e192fc22ed2281192d5fe80c7ea76bbbe719.zip llvm-5652e192fc22ed2281192d5fe80c7ea76bbbe719.tar.gz llvm-5652e192fc22ed2281192d5fe80c7ea76bbbe719.tar.bz2 |
Revert "[InstCombine] convert assumes to operand bundles"
This reverts commit 5eb2e994f9b3a5aff0a156d0a1f7e6121342cc11.
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r-- | llvm/lib/Analysis/Loads.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp index af7ef98..d8f954f 100644 --- a/llvm/lib/Analysis/Loads.cpp +++ b/llvm/lib/Analysis/Loads.cpp @@ -12,7 +12,6 @@ #include "llvm/Analysis/Loads.h" #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/AssumeBundleQueries.h" #include "llvm/Analysis/CaptureTracking.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/MemoryBuiltins.h" @@ -81,31 +80,6 @@ static bool isDereferenceableAndAlignedPointer( return isAligned(V, Offset, Alignment, DL); } - if (CtxI) { - /// Look through assumes to see if both dereferencability and alignment can - /// be provent by an assume - RetainedKnowledge AlignRK; - RetainedKnowledge DerefRK; - if (getKnowledgeForValue( - V, {Attribute::Dereferenceable, Attribute::Alignment}, nullptr, - [&](RetainedKnowledge RK, Instruction *Assume, auto) { - if (!isValidAssumeForContext(Assume, CtxI)) - return false; - if (RK.AttrKind == Attribute::Alignment) - AlignRK = std::max(AlignRK, RK); - if (RK.AttrKind == Attribute::Dereferenceable) - DerefRK = std::max(DerefRK, RK); - if (AlignRK && DerefRK && AlignRK.ArgValue >= Alignment.value() && - DerefRK.ArgValue >= Size.getZExtValue()) - return true; // We have found what we needed so we stop looking - return false; // Other assumes may have better information. so - // keep looking - })) - return true; - } - /// TODO refactor this function to be able to search independently for - /// Dereferencability and Alignment requirements. - // For GEPs, determine if the indexing lands within the allocated object. if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) { const Value *Base = GEP->getPointerOperand(); |