Displaying 20 results from an estimated 45 matches for "getanalysisifavail".
2009 Dec 08
2
[LLVMdev] getAnalysisIfAvailable<>(...)
Is it consistent to have a Pass instance's run method's implementation use getAnalysisIfAvailable<AnalysisType>() (vs just using getAnalysis< AnalysisType >) when that same instance's getAnalysisUsage(AnalysisUsage &au) implementation invokes au.addRequired<AnalysisType>()?
For example in the implementation of SelectionDAGISel::runOnMachineFunction(...) (called fr...
2009 Dec 08
0
[LLVMdev] getAnalysisIfAvailable<>(...)
Hi!
If a pass is required then it makes sense to
getAnalysis<DwarfWriter>(). getAnalysisIfAvailable<>() is used for
cases where a pass want to take advantage of (or fix up) info only
*if* it is available.
If you prepare a patch to fix getAnalysisifAvailable<>() uses (e.g.
DwarfWriter requests you mention below) then I'll apply it.
-
Devang
On Tue, Dec 8, 2009 at 11:11 AM, G...
2012 Apr 04
2
[LLVMdev] Fwd: [Review Request][PATCH] Add the function "vectorizeBasicBlock"
...BBVectorize() : BasicBlockPass(ID) {
initializeBBVectorizePass(*PassRegistry::getPassRegistry());
}
+
+ BBVectorize(Pass *P) : BasicBlockPass(ID) {
+ AA = &P->getAnalysis<AliasAnalysis>();
+ SE = &P->getAnalysis<ScalarEvolution>();
+ TD = P->getAnalysisIfAvailable<TargetData>();
+ }
typedef std::pair<Value *, Value *> ValuePair;
typedef std::pair<ValuePair, size_t> ValuePairWithDepth;
@@ -280,11 +286,7 @@ namespace {
Instruction *&InsertionPt,
Instruction *I, Instruction *J);
-...
2012 Apr 04
0
[LLVMdev] [Review Request][PATCH] Add the function "vectorizeBasicBlock"
...{
> initializeBBVectorizePass(*PassRegistry::getPassRegistry());
> }
> +
> + BBVectorize(Pass *P) : BasicBlockPass(ID) {
> + AA = &P->getAnalysis<AliasAnalysis>();
> + SE = &P->getAnalysis<ScalarEvolution>();
> + TD = P->getAnalysisIfAvailable<TargetData>();
> + }
>
> typedef std::pair<Value *, Value *> ValuePair;
> typedef std::pair<ValuePair, size_t> ValuePairWithDepth;
> @@ -280,11 +286,7 @@ namespace {
> Instruction *&InsertionPt,
> I...
2016 Jul 13
2
How to get analysis in a class which is not a LLVM pass?
Hello,
I want to use ProfileSummaryInfo in a class which is not a LLVM pass like
TargetFrameLowering class (lib/CodeGen/TargetFrameLoweringImpl.cpp)
one way I know to get ProfileSummaryInfo is
getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI(M);
but I can't use this.
Is this really possible?
Sincerely,
Vivek
-------------- next part --------------
An HTML attachment was
2017 Jul 24
2
Making an analysis availble during call lowering
...dea. Another option might be to store a pointer to the SelectionDAGISel pass in SelectionDAG, so then there's a way to access the pass to get analysis directly. Is there another option?
>
> With the legacy pass manager, are you planning to schedule the analysis pass manually and then use getAnalysisIfAvailable?
>
> Thanks again,
> Hal
>
I didn’t need to do anything special. addRequired/getAnalysis work.
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170724/887a6ce7/attachment.html>
2017 Feb 14
2
addRequired() + getAnalysis() for new / non-legacy pass manager
...n the new pass manager, I haven't found a similar way of
doing this. When running opt with -O3, I encounter the following error:
>Assertion `ResultPass && "getAnalysis*() called on an analysis that was
not " "'required' by pass!"' failed.
Changing to getAnalysisIfAvailable() makes the pass not crash, but then I
assume I am not using the external analysis pass to its full extent.
So, the question is as such: in order to use the external analysis pass, do
I need to use some form of the same mechanism (addRequired() +
getAnalysis()) for the new pass manager, or sho...
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
...e SplitEdge function, but failed. Actually the third
>> parameter is a variable of type Pass and it need to be non-null. But I
>> could not figure out how to use it. Please help me out.
>
> The only reason it needs a non-NULL Pass* is to call llvm::SplitBlock which
> uses P->getAnalysisIfAvailable unconditionally. Feel free to wrap those
> calls in 'if (P) { ... }' and send us a patch.
>
> Of course, the obvious question is why aren't you doing your transforms
> inside of a Pass?
>
> Nick
>
>> Regards,
>> Chayan
>>
>> On Sat, Jul 1...
2013 Feb 09
3
[LLVMdev] Deleting LiveVariables
...4:03 PM, Cameron Zwarich <zwarich at apple.com> wrote:
> How much of the work is done here? I'd be happy to do the phi elimination part, since I basically did that for StrongPhiElimination (RIP).
Any help would be appreciated.
I did a bit of the easy stuff in 2-addr, it has a LIS = getAnalysisIfAvailable<LiveIntervals>() member that it sometimes updates. It has a lot of weird transformations, though.
I haven't touched phi-elim yet because of the 'bubble-up' approach.
If you want to help with phi-elim, you could hack -early-live-intervals to insert LiveIntervals before phi-el...
2009 Dec 08
0
[LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
Hello
> In order to avoid the set jump/long jump dependency of DLLs built under Visual C++, we're trying to build the libraries and tools under LLVM-GCC so it will use DWARF exception handling instead of SJ/LJ. The problem we're running into is that the libraries that we just finished creating cannot be found later in the build process when OPT tries to build. My partner has MinGW
2011 Dec 09
0
[LLVMdev] GetElementPtr
On Thu, Dec 8, 2011 at 6:07 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> Eli,
>
> Ok, thanks, this is a big help. So how can I use the TargetData (or get
> the TargetData) without having a DAG?
If you're writing a transformation pass, just write
"getAnalysisIfAvailable<TargetData>()" to get a TargetData*.
-Eli
2011 Dec 09
2
[LLVMdev] GetElementPtr
Eli,
Ok, thanks, this is a big help. So how can I use the TargetData (or get
the TargetData) without having a DAG?
On Thu, Dec 8, 2011 at 3:45 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Dec 8, 2011 at 3:29 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> > Ok, thanks, this makes sense. But there is no way to get the
> SelectionDAG to
> > do it
2010 Jul 18
0
[LLVMdev] How to insert a basic block in an edge
...t; I have tried to use SplitEdge function, but failed. Actually the third
> parameter is a variable of type Pass and it need to be non-null. But I
> could not figure out how to use it. Please help me out.
The only reason it needs a non-NULL Pass* is to call llvm::SplitBlock
which uses P->getAnalysisIfAvailable unconditionally. Feel free to wrap
those calls in 'if (P) { ... }' and send us a patch.
Of course, the obvious question is why aren't you doing your transforms
inside of a Pass?
Nick
> Regards,
> Chayan
>
> On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky<nicholas...
2009 Dec 03
0
[LLVMdev] Preserving ProfileInfo in several Passes
Hello,
Here are a few misc. comments on this patch.
Would it make sense to mark the ProfileInfo passes as "CFGOnly?"
If so, that would let them be automatically preserved by passes
which don't modify the CFG (and that call AU.setPreservesCFG()).
> + if (ProfileInfo* PI = getAnalysisIfAvailable<ProfileInfo>()) {
> + PI->splitEdge(OrigPreHeader, NewHeader, NewPreHeader);
> + }
> +
> // Preserve canonical loop form, which means Exit block should
> // have only one predecessor.
> SplitEdge(L->getLoopLatch(), Exit, this);
Would it make sense to...
2010 Jul 18
2
[LLVMdev] How to insert a basic block in an edge
Hi,
I have tried to use SplitEdge function, but failed. Actually the third
parameter is a variable of type Pass and it need to be non-null. But I
could not figure out how to use it. Please help me out.
Regards,
Chayan
On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi all,
>>
>> Suppose in a CFG bb1 has two
2009 Dec 03
2
[LLVMdev] Preserving ProfileInfo in several Passes
Hi all,
this (altough a big patch) is actually pretty straight forward: It
(tries) to preserve ProfileInfo in all -std-compile-opts passes and all
X86-Backend passes.
There is still some passes that have corner cases where the ProfileInfo
is not correct after the pass. Some passes are still missing...
How shall I proceed with this?
Andi
-------------- next part --------------
A non-text
2013 Feb 09
0
[LLVMdev] Deleting LiveVariables
...;zwarich at apple.com> wrote:
>
>> How much of the work is done here? I'd be happy to do the phi elimination part, since I basically did that for StrongPhiElimination (RIP).
>
> Any help would be appreciated.
>
> I did a bit of the easy stuff in 2-addr, it has a LIS = getAnalysisIfAvailable<LiveIntervals>() member that it sometimes updates. It has a lot of weird transformations, though.
>
> I haven't touched phi-elim yet because of the 'bubble-up' approach.
>
> If you want to help with phi-elim, you could hack -early-live-intervals to insert LiveInt...
2010 Jul 21
0
[LLVMdev] How to insert a basic block in an edge
..., but failed. Actually the third
>>> parameter is a variable of type Pass and it need to be non-null. But I
>>> could not figure out how to use it. Please help me out.
>>
>> The only reason it needs a non-NULL Pass* is to call llvm::SplitBlock which
>> uses P->getAnalysisIfAvailable unconditionally. Feel free to wrap those
>> calls in 'if (P) { ... }' and send us a patch.
>>
>> Of course, the obvious question is why aren't you doing your transforms
>> inside of a Pass?
>>
>> Nick
>>
>>> Regards,
>>> Ch...
2009 Oct 21
2
[LLVMdev] Target data question
...t if there isn't another TargetData
> pass in the PassManager. Should TargetData now not be considered an
> ImmutablePass? Should findAnalysisPass include a null check on the
> getPassInfo of ImmutablePasses?
>
Never mind, I got confused. Registering a pass doesn't mean that
getAnalysisIfAvailable will return it; it still has to be in the pass
manager's collection. It just means that PassInfo will be available
for it if it's there.
I think...
Anyway, my present plan of attack is to have a "-defaulttarget" option
with "none", "host", or a target st...
2011 May 30
1
[LLVMdev] Segfault when trying to schedule custom ImmutablePass
...30) at
/home/michael/LunarGLASS/LLVM/llvm-2.9/lib/VMCore/PassManager.cpp:673
#2 0x083a7f0e in llvm::PMDataManager::findAnalysisPass
(this=0x88931b8, AID=0x85eef30, SearchParent=true) at
/home/michael/LunarGLASS/LLVM/llvm-2.9/lib/VMCore/PassManager.cpp:1062
#3 0x083a8b09 in llvm::AnalysisResolver::getAnalysisIfAvailable
(this=0x876a960, ID=0x85eef30, dir=true) at
/home/michael/LunarGLASS/LLVM/llvm-2.9/lib/VMCore/PassManager.cpp:1215
#4 0x08120ee2 in llvm::Pass::getAnalysisIfAvailable<llvm::TargetData>
(this=0x860fd98) at
/home/michael/LunarGLASS/LLVM/llvm-2.9/include/llvm/PassAnalysisSupport.h:181
#5 0...