search for: immutablepass

Displaying 20 results from an estimated 102 matches for "immutablepass".

2009 Oct 21
0
[LLVMdev] Target data question
If the TargetData pass isn't registered in the global registry, getPassInfo() returns null. Now when you add a TargetData pass, it winds up in ImmutablePasses. Any search through ImmutablePasses assumes that getPassInfo() for every member returns something other than null. So findAnalysisPass for *any* analysis pass can crash the system if the TargetData pass is lurking in the list without being registered. Since we want to be able to run opt without...
2009 Oct 21
2
[LLVMdev] Target data question
On Tue, Oct 20, 2009 at 12:50 PM, Dan Gohman <gohman at apple.com> wrote: > > On Oct 20, 2009, at 10:13 AM, Kenneth Uildriks wrote: > >> On Tue, Oct 20, 2009 at 12:08 PM, Dan Gohman <gohman at apple.com> wrote: >>> Unfortunately, yes.  See PR4542.  Progress has been made recently >>> though -- the optimizers are now ready.  The main things left to do
2014 Apr 04
3
[LLVMdev] Add a new information and preserve it in LLVM
Hello, I am trying to add some thing into LLVM, while I encountered some problems. So my situation is that I have some information W, some transform passes may change it, after these passes, I need the new W. What I did is to create an analysis pass similar to scalar-evolution or loopinfo, I can get the information by using getAnalysis<W>(); and preserve this information W by using
2006 Mar 21
3
[LLVMdev] problem loading analysis results from Inliner pass
...runOnSCC, I am instead getting the > > default, dummy version of my analysis, which should be overridden by > > the one that was brought in with -load. > > What sort of pass is it? The inliner is a ModulePass, so the only thing > it can getAnalysis<> are modulepasses and immutablepasses: functionpasses > won't work. My pass is a ModulePass, although it's actually just an interface to external data, so I suppose it could potentially be an ImmutablePass. I've been meaning to revisit that, but it wasn't a high priority as long as it was working. ...snip... >...
2006 Mar 21
0
[LLVMdev] problem loading analysis results from Inliner pass
...tting the > > > default, dummy version of my analysis, which should be overridden by > > > the one that was brought in with -load. > > > > What sort of pass is it? The inliner is a ModulePass, so the only thing > > it can getAnalysis<> are modulepasses and immutablepasses: functionpasses > > won't work. > > My pass is a ModulePass, although it's actually just an interface to > external data, so I suppose it could potentially be an ImmutablePass. > I've been meaning to revisit that, but it wasn't a high priority as > long as it...
2009 Oct 21
2
[LLVMdev] Target data question
On Wed, Oct 21, 2009 at 10:59 AM, Kenneth Uildriks <kennethuil at gmail.com> wrote: > If the TargetData pass isn't registered in the global registry, > getPassInfo() returns null. > > Now when you add a TargetData pass, it winds up in ImmutablePasses. > Any search through ImmutablePasses assumes that getPassInfo() for > every member returns something other than null.  So findAnalysisPass > for *any* analysis pass can crash the system if the TargetData pass is > lurking in the list without being registered. > > Since we want...
2012 Dec 05
1
[LLVMdev] Non-immutable alias analysis
Hi, I wrote a module pass that uses Alias Analysis. For this reason I added AU.addRequired<AliasAnalysis>() to function getAnalysisUsage and used getAnalysis<AliasAnalysis>() in my pass. I tried a few types of alias analyses and I discovered that only alias analyses which are ImmutablePasses are returned using getAnalysis<AliasAnalysis>(). Moreover, when I added both ImmutablePass and FunctionPass, getAnalysis<AliasAnalysis>() returned the ImmutablePass while the FunctionPass did not even appear in the AA chain ( I assume it is because building the chain uses getAnalysis...
2014 Apr 24
4
[LLVMdev] writing an alias analysis pass?
...de of my pass: #define DEBUG_TYPE "must-aa" #include "llvm/Pass.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Debug.h" using namespace llvm; namespace { struct EverythingMustAlias : public ImmutablePass, public AliasAnalysis { static char ID; EverythingMustAlias() : ImmutablePass(ID) {} virtual void initializePass() { DEBUG(dbgs() << "Initializing everything-must-alias\n"); InitializeAliasAnalysis(this); } virtual void getAnalysisUsage(AnalysisUsage &AU) con...
2008 Jul 21
2
[LLVMdev] Casting between address spaces and address space semantics
...e the "right" type. Index: lib/Target/TargetData.cpp =================================================================== --- lib/Target/TargetData.cpp (revision 53716) +++ lib/Target/TargetData.cpp (working copy) @@ -231,8 +231,8 @@ } } -TargetData::TargetData(const Module *M) - : ImmutablePass((intptr_t)&ID) { +TargetData::TargetData(const Module *M, const AddrspacesDescriptor &Addrspaces) + : ImmutablePass((intptr_t)&ID), Addrspaces(Addrspaces) { init(M->getDataLayout()); } @@ -604,3 +604,5 @@ unsigned TargetData::getPreferredAlignmentLog(const GlobalVariable *GV)...
2008 Jul 27
0
[LLVMdev] Analysis Passes
...pdates the analysis pass, and when the SAFECode > passes run, they get the APA information from the analysis pass. This use case is not adequately serviced by the current LLVM pass manager. I had a similar problem with the GC metadata information. Ultimately, I had to structure it as an ImmutablePass (with an explicit pass to free the contained information) because it would be invalidated by other passes at random. This is essentially the same approach used to manage the MachineFunction representation. Speaking of which, I also have also attempted to eliminate Annotatable by storing th...
2008 Jul 28
1
[LLVMdev] Analysis Passes
This seems like a separate issue. On Jul 26, 2008, at 5:56 PM, Gordon Henriksen wrote: > I had a similar problem with the GC metadata information. Ultimately, > I had to structure it as an ImmutablePass (with an explicit pass to > free the contained information) because it would be invalidated by > other passes at random. If GC metadata information is not explicitly listed as preserved and the GC metadata pass is not ImmutablePass the, of course, the pass manager will consider the info...
2007 Dec 04
0
[LLVMdev] Requiring dynamically loaded passes
...dRequiredID instead of AddRequired: char LoadablePassID = 0; ... AU.addRequiredID(lookupPassInfo((intptr_t) &LoadablePassID)); then it should work if the loadable module references the same pass ID as an extern: extern char ExternalPassID; class ThePass : public ImmutablePass { public: ThePass : ImmutablePass(&ExternalPassID) {} }; An analysis group may also be a viable option. — Gordon
2016 Dec 08
2
Issues with DummyCGSCCPass used for IPRA
...My understanding is that this > pass wraps the following passes into an SCC pass manager, so that they are > run in bottom-up order, which is necessary to enable register allocation > info from callees to be available at call sites. > > The problem I’m running into is that we have an ImmutablePass which is run > early in our pipeline (and needed in later machine code generation stages), > and for some reason, this pass gets finalized and re-run multiple times, > destroying the information we need in the process. I’m really not sure what > is happening. The pass is clearly marked...
2011 May 30
1
[LLVMdev] Segfault when trying to schedule custom ImmutablePass
I'm in a debug build with assertions turned on for llvm-2.9, and I get a segfault whenever I try to schedule one of my own immutable passes in a pass manager. It seems that one of the passes that I'm scheduling (IndVarSimplify) attempts to ask for TargetData if it's available (I'm not providing it), and that's when it segfaults. If I split that pass into it's own pass
2006 Mar 21
0
[LLVMdev] problem loading analysis results from Inliner pass
...; from within Inliner::runOnSCC, I am instead getting the > default, dummy version of my analysis, which should be overridden by > the one that was brought in with -load. What sort of pass is it? The inliner is a ModulePass, so the only thing it can getAnalysis<> are modulepasses and immutablepasses: functionpasses won't work. > I'm having a hard time debugging this, so any tips for how to track > the problem down would be appreciated. Try passing -debug-pass=Structure to opt. > I am running on Linux, and the version of LLVM I am working with is > from CVS a couple of...
2009 Oct 21
0
[LLVMdev] Target data question
...eth Uildriks wrote: > On Wed, Oct 21, 2009 at 10:59 AM, Kenneth Uildriks <kennethuil at gmail.com> wrote: >> If the TargetData pass isn't registered in the global registry, >> getPassInfo() returns null. >> >> Now when you add a TargetData pass, it winds up in ImmutablePasses. >> Any search through ImmutablePasses assumes that getPassInfo() for >> every member returns something other than null. So findAnalysisPass >> for *any* analysis pass can crash the system if the TargetData pass is >> lurking in the list without being registered. >>...
2008 Aug 07
2
[LLVMdev] Casting between address spaces and address space semantics
...gh I have the suspicion that this is mainly a question of naming, really). Additionally, the "Writing an LLVM Pass" document states: "There must be exactly one default implementation available at all times for an Analysis Group to be used. Only default implementation can derive from ImmutablePass." I'm not completely sure why there cannot be other implementations that derive from ImmutablePass. In this case, I want to have any implementation of TargetAddrspaces also derive from ImmutablePass, because it makes sense. In practice, this works as well, our custom implementeation as we...
2015 Apr 21
2
[LLVMdev] Using an alias analysis pass
...quot;NoAlias for pointers in different address spaces", false, true); > static RegisterAnalysisGroup<AliasAnalysis> aag(aasa); > > FunctionPass* createAddressSpaceAliasAnalysisPass() { > return new AddressSpaceAliasAnalysis(); > } I made it a FunctionPass instead of an ImmutablePass because InitializeAliasAnalysis now needs a DataLayout argument, and I wasn’t sure how to get that one from an ImmutablePass. The problem: I can add the pass to a `legacy::PassManager` object, and the `runOnFunction` method is called, but `alias` never is, and neither is `getAdjustedAnalysisPointe...
2008 Jul 21
0
[LLVMdev] Casting between address spaces and address space semantics
.../Target/TargetData.cpp > =================================================================== > --- lib/Target/TargetData.cpp (revision 53716) > +++ lib/Target/TargetData.cpp (working copy) > @@ -231,8 +231,8 @@ > } > } > > -TargetData::TargetData(const Module *M) > - : ImmutablePass((intptr_t)&ID) { > +TargetData::TargetData(const Module *M, const AddrspacesDescriptor > &Addrspaces) > + : ImmutablePass((intptr_t)&ID), Addrspaces(Addrspaces) { > init(M->getDataLayout()); > } > > @@ -604,3 +604,5 @@ > unsigned TargetData::getPreferredA...
2008 Jul 18
0
[LLVMdev] Casting between address spaces and address space semantics
Hi Eli, Mon Ping, > In ISO/IEC WG14 n1169 on the C extensions to support embedded > processors, any two address spaces must be disjoint, must be > equivalent, or must be nested. Ah, that standard is a lot clearer on this subject than the DSP-C one I read was. > As Eli indicated, the actual relationship is platform specific depending on > what makes the most sense for