[llvm] r338384 - [MemDep] Use PhiValuesAnalysis to improve alias analysis results
Mikael Holmén via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 7 22:07:20 PDT 2018
Hi,
On 08/07/2018 06:24 PM, John Brawn wrote:
> What's going on here is:
> * PhiValuesAnalysis needs to be manually invalidated when a phi or an
> operand of a phi changes, because the cached results may point to
> something invalid. (I spend some time trying to get it to cope
> automatically with this happening, but failed.)
> * BasicAA uses PhiValuesAnalysis only when available.
> * MemoryDependenceAnalysis uses PhiValuesAnalysis, but because it also
> needs to be manually invalidated in the same way we know that we can
> safely use PhiValuesAnalysis by invalidating it when
> MemoryDependenceAnalysis is invalidated.
> * The transformation passes that use MemoryDependenceAnalysis invalidate
> it, PhiValuesAnalysis, and BasicAA, which means that subsequent
> transformation passes wont accidentally pick up a BasicAA that uses
> the PhiValuesAnalysis results.
>
> The above is all fine and well, but it all assumes that analyses will only
> be run at the request of a transformation pass. This is true when running
> passes via a default pipeline like 'opt -O2', but it's perfectly possible
> to run an analysis pass explicitly like you've done here, and this causes
> everything to go wrong.
>
> I'll figure out how to fix this, but in the meantime: do you have an
> example where we get a crash _without_ an analysis pass being explicitly
> executed? I.e. where the opt command-line contains only transformation
> passes? Because that would indicate that I'm wrong about the things I
> listed above and there's something more fundamentally wrong going on.
I *think* that we've had an excplicit "-memdep" invocation every time
we've seen these crashes so you're probably right about that.
Thanks for looking into it.
Regards,
Mikael
>
> John
>
>> -----Original Message-----
>> From: Mikael Holmén [mailto:mikael.holmen at ericsson.com]
>> Sent: 07 August 2018 08:35
>> To: John Brawn
>> Cc: llvm-commits at lists.llvm.org
>> Subject: Re: [llvm] r338384 - [MemDep] Use PhiValuesAnalysis to improve
>> alias analysis results
>>
>> Hi John,
>>
>> With this commit we've seen instcombine crash in a number of different
>> ways (asserts, SEGVs). E.g. if I do the following on trunk now
>>
>> opt -S -o - bbi-16681.ll -memdep -instcombine
>>
>> I get a SEGV
>>
>> Stack dump:
>> 0. Program arguments: build-all-Debug/bin/opt -S -o - bbi-16681.ll
>> -memdep -instcombine
>> 1. Running pass 'Function Pass Manager' on module 'bbi-16681.ll'.
>> 2. Running pass 'Combine redundant instructions' on function
>> '@main'
>> build-all-
>> Debug/bin/opt(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x3c)[0x3
>> 744bcc]
>> build-all-Debug/bin/opt[0x3744d79]
>> build-all-
>> Debug/bin/opt(_ZN4llvm3sys17RunSignalHandlersEv+0x7e)[0x3742fce]
>> build-all-Debug/bin/opt[0x3745c0a]
>> /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7fce168ea330]
>> build-all-Debug/bin/opt[0xc279fc]
>> build-all-Debug/bin/opt[0xca14d5]
>> build-all-Debug/bin/opt[0x2e99c00]
>> build-all-
>> Debug/bin/opt(_ZNK4llvm5Value35stripPointerCastsAndInvariantGroupsEv+0x1
>> 5)[0x2e99bd5]
>> build-all-
>> Debug/bin/opt(_ZN4llvm13BasicAAResult10aliasCheckEPKNS_5ValueEmNS_9AAMDN
>> odesES3_mS4_S3_S3_+0x88)[0x233da08]
>> build-all-
>> Debug/bin/opt(_ZN4llvm13BasicAAResult8aliasPHIEPKNS_7PHINodeEmRKNS_9AAMD
>> NodesEPKNS_5ValueEmS6_S9_+0x945)[0x2342345]
>> build-all-
>> Debug/bin/opt(_ZN4llvm13BasicAAResult10aliasCheckEPKNS_5ValueEmNS_9AAMDN
>> odesES3_mS4_S3_S3_+0x753)[0x233e0d3]
>> build-all-
>> Debug/bin/opt(_ZN4llvm13BasicAAResult5aliasERKNS_14MemoryLocationES3_+0x
>> 1eb)[0x233d8bb]
>> build-all-Debug/bin/opt[0x231eb29]
>> build-all-
>> Debug/bin/opt(_ZN4llvm9AAResults5aliasERKNS_14MemoryLocationES3_+0x89)[0
>> x23173e9]
>> build-all-
>> Debug/bin/opt(_ZN4llvm9AAResults13getModRefInfoENS_17ImmutableCallSiteER
>> KNS_14MemoryLocationE+0x289)[0x23180d9]
>> build-all-Debug/bin/opt[0x15276ed]
>> build-all-Debug/bin/opt[0x15274c9]
>> build-all-Debug/bin/opt[0x24f5e07]
>> build-all-
>> Debug/bin/opt(_ZN4llvm25FindAvailablePtrLoadStoreEPNS_5ValueEPNS_4TypeEb
>> PNS_10BasicBlockERNS_14ilist_iteratorINS_12ilist_detail12node_optionsINS
>> _11InstructionELb1ELb0EvEELb0ELb0EEEjPNS_9AAResultsEPbPj+0x409)[0x24f597
>> 9]
>> build-all-
>> Debug/bin/opt(_ZN4llvm24FindAvailableLoadedValueEPNS_8LoadInstEPNS_10Bas
>> icBlockERNS_14ilist_iteratorINS_12ilist_detail12node_optionsINS_11Instru
>> ctionELb1ELb0EvEELb0ELb0EEEjPNS_9AAResultsEPbPj+0xa6)[0x24f5556]
>> build-all-Debug/bin/opt[0x30eef35]
>> build-all-Debug/bin/opt[0x305f898]
>> build-all-Debug/bin/opt[0x305ed8f]
>> build-all-Debug/bin/opt[0x305976c]
>> build-all-Debug/bin/opt[0x305a3e9]
>> build-all-
>> Debug/bin/opt(_ZN4llvm24InstructionCombiningPass13runOnFunctionERNS_8Fun
>> ctionE+0x15b)[0x305a66b]
>> build-all-
>> Debug/bin/opt(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x1e
>> b)[0x2dfd62b]
>> build-all-
>> Debug/bin/opt(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x75)[0x
>> 2dfd9a5]
>> build-all-Debug/bin/opt[0x2dfe20e]
>> build-all-
>> Debug/bin/opt(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x17f)[0
>> x2dfdcaf]
>> build-all-
>> Debug/bin/opt(_ZN4llvm6legacy11PassManager3runERNS_6ModuleE+0x21)[0x2dfe
>> 7a1]
>> build-all-Debug/bin/opt(main+0x2ca1)[0xc5e431]
>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fce154c4f45]
>> build-all-Debug/bin/opt[0xc1d0a9]
>> Segmentation fault
>>
>> Also, if I run valgrind on it I get tons of complaints so something
>> nasty is definitely going on.
>>
>> If I revert your commit it doesn't crash and valgrind doesn't complain
>> anymore.
>>
>> Regards,
>> Mikael
>>
>>
>> On 07/31/2018 04:19 PM, John Brawn via llvm-commits wrote:
>>> Author: john.brawn
>>> Date: Tue Jul 31 07:19:29 2018
>>> New Revision: 338384
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=338384&view=rev
>>> Log:
>>> [MemDep] Use PhiValuesAnalysis to improve alias analysis results
>>>
>>> This is being done in order to make GVN able to better optimize
>> certain inputs.
>>> MemDep doesn't use PhiValues directly, but does need to notifiy it
>> when things
>>> get invalidated.
>>>
>>> Differential Revision: https://reviews.llvm.org/D48489
>>>
>>> Modified:
>>> llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
>>> llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
>>> llvm/trunk/test/Other/new-pm-defaults.ll
>>> llvm/trunk/test/Other/new-pm-lto-defaults.ll
>>> llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
>>> llvm/trunk/test/Other/opt-O2-pipeline.ll
>>> llvm/trunk/test/Other/opt-O3-pipeline.ll
>>> llvm/trunk/test/Other/opt-Os-pipeline.ll
>>> llvm/trunk/test/Transforms/GVN/PRE/pre-after-rle.ll
>>>
>>> Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
>>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=
>> 338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
>> (original)
>>> +++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Tue
>> Jul 31 07:19:29 2018
>>> @@ -44,6 +44,7 @@ class Instruction;
>>> class LoadInst;
>>> class PHITransAddr;
>>> class TargetLibraryInfo;
>>> +class PhiValues;
>>> class Value;
>>>
>>> /// A memory dependence query can return one of three different
>> answers.
>>> @@ -360,13 +361,14 @@ private:
>>> AssumptionCache ∾
>>> const TargetLibraryInfo &TLI;
>>> DominatorTree &DT;
>>> + PhiValues &PV;
>>> PredIteratorCache PredCache;
>>>
>>> public:
>>> MemoryDependenceResults(AliasAnalysis &AA, AssumptionCache &AC,
>>> const TargetLibraryInfo &TLI,
>>> - DominatorTree &DT)
>>> - : AA(AA), AC(AC), TLI(TLI), DT(DT) {}
>>> + DominatorTree &DT, PhiValues &PV)
>>> + : AA(AA), AC(AC), TLI(TLI), DT(DT), PV(PV) {}
>>>
>>> /// Handle invalidation in the new PM.
>>> bool invalidate(Function &F, const PreservedAnalyses &PA,
>>>
>>> Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
>>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=338384&
>> r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
>>> +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Jul 31
>> 07:19:29 2018
>>> @@ -26,6 +26,7 @@
>>> #include "llvm/Analysis/MemoryLocation.h"
>>> #include "llvm/Analysis/OrderedBasicBlock.h"
>>> #include "llvm/Analysis/PHITransAddr.h"
>>> +#include "llvm/Analysis/PhiValues.h"
>>> #include "llvm/Analysis/TargetLibraryInfo.h"
>>> #include "llvm/Analysis/ValueTracking.h"
>>> #include "llvm/IR/Attributes.h"
>>> @@ -1513,6 +1514,8 @@ void MemoryDependenceResults::invalidate
>>> RemoveCachedNonLocalPointerDependencies(ValueIsLoadPair(Ptr,
>> false));
>>> // Flush load info for the pointer.
>>> RemoveCachedNonLocalPointerDependencies(ValueIsLoadPair(Ptr,
>> true));
>>> + // Invalidate phis that use the pointer.
>>> + PV.invalidateValue(Ptr);
>>> }
>>>
>>> void MemoryDependenceResults::invalidateCachedPredecessors() {
>>> @@ -1671,6 +1674,9 @@ void MemoryDependenceResults::removeInst
>>> }
>>> }
>>>
>>> + // Invalidate phis that use the removed instruction.
>>> + PV.invalidateValue(RemInst);
>>> +
>>> assert(!NonLocalDeps.count(RemInst) && "RemInst got reinserted?");
>>> LLVM_DEBUG(verifyRemoved(RemInst));
>>> }
>>> @@ -1730,7 +1736,8 @@ MemoryDependenceAnalysis::run(Function &
>>> auto &AC = AM.getResult<AssumptionAnalysis>(F);
>>> auto &TLI = AM.getResult<TargetLibraryAnalysis>(F);
>>> auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
>>> - return MemoryDependenceResults(AA, AC, TLI, DT);
>>> + auto &PV = AM.getResult<PhiValuesAnalysis>(F);
>>> + return MemoryDependenceResults(AA, AC, TLI, DT, PV);
>>> }
>>>
>>> char MemoryDependenceWrapperPass::ID = 0;
>>> @@ -1741,6 +1748,7 @@ INITIALIZE_PASS_DEPENDENCY(AssumptionCac
>>> INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
>>> INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
>>> INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
>>> +INITIALIZE_PASS_DEPENDENCY(PhiValuesWrapperPass)
>>> INITIALIZE_PASS_END(MemoryDependenceWrapperPass, "memdep",
>>> "Memory Dependence Analysis", false, true)
>>>
>>> @@ -1758,6 +1766,7 @@ void MemoryDependenceWrapperPass::getAna
>>> AU.setPreservesAll();
>>> AU.addRequired<AssumptionCacheTracker>();
>>> AU.addRequired<DominatorTreeWrapperPass>();
>>> + AU.addRequired<PhiValuesWrapperPass>();
>>> AU.addRequiredTransitive<AAResultsWrapperPass>();
>>> AU.addRequiredTransitive<TargetLibraryInfoWrapperPass>();
>>> }
>>> @@ -1773,7 +1782,8 @@ bool MemoryDependenceResults::invalidate
>>> // Check whether the analyses we depend on became invalid for any
>> reason.
>>> if (Inv.invalidate<AAManager>(F, PA) ||
>>> Inv.invalidate<AssumptionAnalysis>(F, PA) ||
>>> - Inv.invalidate<DominatorTreeAnalysis>(F, PA))
>>> + Inv.invalidate<DominatorTreeAnalysis>(F, PA) ||
>>> + Inv.invalidate<PhiValuesAnalysis>(F, PA))
>>> return true;
>>>
>>> // Otherwise this analysis result remains valid.
>>> @@ -1789,6 +1799,7 @@ bool MemoryDependenceWrapperPass::runOnF
>>> auto &AC =
>> getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
>>> auto &TLI = getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
>>> auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
>>> - MemDep.emplace(AA, AC, TLI, DT);
>>> + auto &PV = getAnalysis<PhiValuesWrapperPass>().getResult();
>>> + MemDep.emplace(AA, AC, TLI, DT, PV);
>>> return false;
>>> }
>>>
>>> Modified: llvm/trunk/test/Other/new-pm-defaults.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-
>> defaults.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Other/new-pm-defaults.ll (original)
>>> +++ llvm/trunk/test/Other/new-pm-defaults.ll Tue Jul 31 07:19:29 2018
>>> @@ -170,17 +170,22 @@
>>> ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-Os-NEXT: Running pass: GVN
>>> ; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-Os-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-Oz-NEXT: Running pass: GVN
>>> ; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-Oz-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-O2-NEXT: Running pass: GVN
>>> ; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-O3-NEXT: Running pass: GVN
>>> ; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O3-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O-NEXT: Running pass: MemCpyOptPass
>>> ; CHECK-O1-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O1-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O-NEXT: Running pass: SCCPPass
>>> ; CHECK-O-NEXT: Running pass: BDCEPass
>>> ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
>>>
>>> Modified: llvm/trunk/test/Other/new-pm-lto-defaults.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-
>> lto-defaults.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Other/new-pm-lto-defaults.ll (original)
>>> +++ llvm/trunk/test/Other/new-pm-lto-defaults.ll Tue Jul 31 07:19:29
>> 2018
>>> @@ -81,6 +81,7 @@
>>> ; CHECK-O2-NEXT: Running pass:
>> ModuleToPostOrderCGSCCPassAdaptor<{{.*}}PostOrderFunctionAttrsPass>
>>> ; CHECK-O2-NEXT: Running pass:
>> ModuleToFunctionPassAdaptor<{{.*}}PassManager{{.*}}>
>>> ; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O2-NEXT: Running analysis: DemandedBitsAnalysis
>>> ; CHECK-O2-NEXT: Running pass: CrossDSOCFIPass
>>> ; CHECK-O2-NEXT: Running pass: LowerTypeTestsPass
>>>
>>> Modified: llvm/trunk/test/Other/new-pm-thinlto-defaults.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-
>> thinlto-defaults.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Other/new-pm-thinlto-defaults.ll (original)
>>> +++ llvm/trunk/test/Other/new-pm-thinlto-defaults.ll Tue Jul 31
>> 07:19:29 2018
>>> @@ -152,17 +152,22 @@
>>> ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-Os-NEXT: Running pass: GVN
>>> ; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-Os-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-Oz-NEXT: Running pass: GVN
>>> ; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-Oz-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-O2-NEXT: Running pass: GVN
>>> ; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
>>> ; CHECK-O3-NEXT: Running pass: GVN
>>> ; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O3-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O-NEXT: Running pass: MemCpyOptPass
>>> ; CHECK-O1-NEXT: Running analysis: MemoryDependenceAnalysis
>>> +; CHECK-O1-NEXT: Running analysis: PhiValuesAnalysis
>>> ; CHECK-O-NEXT: Running pass: SCCPPass
>>> ; CHECK-O-NEXT: Running pass: BDCEPass
>>> ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
>>>
>>> Modified: llvm/trunk/test/Other/opt-O2-pipeline.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-O2-
>> pipeline.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Other/opt-O2-pipeline.ll (original)
>>> +++ llvm/trunk/test/Other/opt-O2-pipeline.ll Tue Jul 31 07:19:29 2018
>>> @@ -121,6 +121,7 @@
>>> ; CHECK-NEXT: Delete dead loops
>>> ; CHECK-NEXT: Unroll loops
>>> ; CHECK-NEXT: MergedLoadStoreMotion
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> @@ -128,6 +129,7 @@
>>> ; CHECK-NEXT: Lazy Block Frequency Analysis
>>> ; CHECK-NEXT: Optimization Remark Emitter
>>> ; CHECK-NEXT: Global Value Numbering
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> @@ -147,6 +149,7 @@
>>> ; CHECK-NEXT: Value Propagation
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> ; CHECK-NEXT: Dead Store Elimination
>>> ; CHECK-NEXT: Natural Loop Information
>>>
>>> Modified: llvm/trunk/test/Other/opt-O3-pipeline.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-O3-
>> pipeline.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Other/opt-O3-pipeline.ll (original)
>>> +++ llvm/trunk/test/Other/opt-O3-pipeline.ll Tue Jul 31 07:19:29 2018
>>> @@ -125,6 +125,7 @@
>>> ; CHECK-NEXT: Delete dead loops
>>> ; CHECK-NEXT: Unroll loops
>>> ; CHECK-NEXT: MergedLoadStoreMotion
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> @@ -132,6 +133,7 @@
>>> ; CHECK-NEXT: Lazy Block Frequency Analysis
>>> ; CHECK-NEXT: Optimization Remark Emitter
>>> ; CHECK-NEXT: Global Value Numbering
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> @@ -151,6 +153,7 @@
>>> ; CHECK-NEXT: Value Propagation
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> ; CHECK-NEXT: Dead Store Elimination
>>> ; CHECK-NEXT: Natural Loop Information
>>>
>>> Modified: llvm/trunk/test/Other/opt-Os-pipeline.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-Os-
>> pipeline.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Other/opt-Os-pipeline.ll (original)
>>> +++ llvm/trunk/test/Other/opt-Os-pipeline.ll Tue Jul 31 07:19:29 2018
>>> @@ -108,6 +108,7 @@
>>> ; CHECK-NEXT: Delete dead loops
>>> ; CHECK-NEXT: Unroll loops
>>> ; CHECK-NEXT: MergedLoadStoreMotion
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> @@ -115,6 +116,7 @@
>>> ; CHECK-NEXT: Lazy Block Frequency Analysis
>>> ; CHECK-NEXT: Optimization Remark Emitter
>>> ; CHECK-NEXT: Global Value Numbering
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> @@ -134,6 +136,7 @@
>>> ; CHECK-NEXT: Value Propagation
>>> ; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
>>> ; CHECK-NEXT: Function Alias Analysis Results
>>> +; CHECK-NEXT: Phi Values Analysis
>>> ; CHECK-NEXT: Memory Dependence Analysis
>>> ; CHECK-NEXT: Dead Store Elimination
>>> ; CHECK-NEXT: Natural Loop Information
>>>
>>> Modified: llvm/trunk/test/Transforms/GVN/PRE/pre-after-rle.ll
>>> URL: http://llvm.org/viewvc/llvm-
>> project/llvm/trunk/test/Transforms/GVN/PRE/pre-after-
>> rle.ll?rev=338384&r1=338383&r2=338384&view=diff
>>>
>> ========================================================================
>> ======
>>> --- llvm/trunk/test/Transforms/GVN/PRE/pre-after-rle.ll (original)
>>> +++ llvm/trunk/test/Transforms/GVN/PRE/pre-after-rle.ll Tue Jul 31
>> 07:19:29 2018
>>> @@ -63,10 +63,12 @@ preheader:
>>> %cmp = icmp slt i32 1, %h
>>> br i1 %cmp, label %body, label %exit
>>>
>>> -; Alias analysis currently can't figure out %width doesn't alias %s,
>> so just
>>> -; check that the redundant load has been removed.
>>> +; CHECK-LABEL: preheader.body_crit_edge:
>>> +; CHECK: load i32, i32* %width, align 8
>>> +
>>> ; CHECK-LABEL: body:
>>> ; CHECK-NOT: load i32*, i32** %start, align 8
>>> +; CHECK-NOT: load i32, i32* %width, align 8
>>> body:
>>> %j = phi i32 [ 0, %preheader ], [ %j.next, %body ]
>>> %s = load i32*, i32** %start, align 8
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
More information about the llvm-commits
mailing list