[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-06-20 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.62 -> 1.63
---
Log message:

Update AnalysisGroup documentation to document restriction that allows 
only one ImmutablePass in a group.


---
Diffs of the changes:  (+4 -3)

 WritingAnLLVMPass.html |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.62 
llvm/docs/WritingAnLLVMPass.html:1.63
--- llvm/docs/WritingAnLLVMPass.html:1.62   Thu Jun  7 11:44:52 2007
+++ llvm/docs/WritingAnLLVMPass.htmlWed Jun 20 13:51:14 2007
@@ -1308,8 +1308,9 @@
 Here we show how the default implementation is specified (using the extra
 argument to the RegisterAnalysisGroup template).  There must be 
exactly
 one default implementation available at all times for an Analysis Group to be
-used.  Here we declare that the http://llvm.org/doxygen/structBasicAliasAnalysis.html";>BasicAliasAnalysis
+used.  Only default implementation can derive from ImmutablePass. 
+Here we declare that the
+ http://llvm.org/doxygen/structBasicAliasAnalysis.html";>BasicAliasAnalysis
 pass is the default implementation for the interface.
 
 
@@ -1809,7 +1810,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/06/07 16:44:52 $
+  Last modified: $Date: 2007/06/20 18:51:14 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-06-07 Thread Tanya Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.61 -> 1.62
---
Log message:

Correct typo. Should be "not allowed"


---
Diffs of the changes:  (+2 -2)

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.61 
llvm/docs/WritingAnLLVMPass.html:1.62
--- llvm/docs/WritingAnLLVMPass.html:1.61   Fri May 18 00:38:44 2007
+++ llvm/docs/WritingAnLLVMPass.htmlThu Jun  7 11:44:52 2007
@@ -537,7 +537,7 @@
 ... not allowed to modify any Functions that are not in
 the current SCC.
 
-... allowed to inspect any Function's other than those in the
+... not allowed to inspect any Function's other than those in the
 current SCC and the direct callees of the SCC.
 
 ... required to preserve the current CallGraph object, updating it
@@ -1809,7 +1809,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/05/18 05:38:44 $
+  Last modified: $Date: 2007/06/07 16:44:52 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-05-17 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.60 -> 1.61
---
Log message:

validation fix


---
Diffs of the changes:  (+2 -2)

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.60 
llvm/docs/WritingAnLLVMPass.html:1.61
--- llvm/docs/WritingAnLLVMPass.html:1.60   Fri May 18 00:36:14 2007
+++ llvm/docs/WritingAnLLVMPass.htmlFri May 18 00:38:44 2007
@@ -312,7 +312,7 @@
   struct Hello : public FunctionPass 
{
 
 static char ID;
-Hello() : FunctionPass((intptr_t)&ID) {}
+Hello() : FunctionPass((intptr_t)&ID) {}
 
 virtual bool runOnFunction(Function 
&F) {
   llvm::cerr << "Hello: " << F.getName() << "\n";
@@ -1809,7 +1809,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/05/18 05:36:14 $
+  Last modified: $Date: 2007/05/18 05:38:44 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-05-17 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.59 -> 1.60
---
Log message:

validation fixes


---
Diffs of the changes:  (+7 -5)

 WritingAnLLVMPass.html |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.59 
llvm/docs/WritingAnLLVMPass.html:1.60
--- llvm/docs/WritingAnLLVMPass.html:1.59   Wed May  2 20:11:53 2007
+++ llvm/docs/WritingAnLLVMPass.htmlFri May 18 00:36:14 2007
@@ -264,7 +264,7 @@
 
 
  static char ID;
- Hello() : FunctionPass((intptr_t)&ID) {}
+ Hello() : FunctionPass((intptr_t)&ID) {}
 
 
  This declares pass identifier used by LLVM to identify pass. This allows 
LLVM to
@@ -485,7 +485,7 @@
 functions.  Because nothing is known about the behavior of ModulePass
 subclasses, no optimization can be done for their execution. A module pass
 can use function level passes (e.g. dominators) using getAnalysis interface
- getAnalysis(Function).  
+ getAnalysis(Function).  
 
 To write a correct ModulePass subclass, derive from
 ModulePass and overload the runOnModule method with the
@@ -746,7 +746,7 @@
   virtual bool doInitialization(Loop *, LPPassManager &LPM);
 
 
-The doInitialization method is designed to do simple initialization 
+The doInitialization method is designed to do simple 
initialization 
 type of stuff that does not depend on the functions being processed.  The 
 doInitialization method call is not scheduled to overlap with any 
 other pass executions (thus it should be very fast). LPPassManager 
@@ -1159,7 +1159,7 @@
}
 
 
-In above example, runOnFunction for DominatorTree is called by pass manager
+In above example, runOnFunction for DominatorTree is called by pass manager
 before returning a reference to the desired pass.
 
 
@@ -1797,6 +1797,8 @@
 haven't had time (or multiprocessor machines, thus a reason) to implement this.
 Despite that, we have kept the LLVM passes SMP ready, and you should too.
 
+
+
 
 
 
@@ -1807,7 +1809,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/05/03 01:11:53 $
+  Last modified: $Date: 2007/05/18 05:36:14 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-05-02 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.58 -> 1.59
---
Log message:

Drop 'const'


---
Diffs of the changes:  (+4 -4)

 WritingAnLLVMPass.html |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.58 
llvm/docs/WritingAnLLVMPass.html:1.59
--- llvm/docs/WritingAnLLVMPass.html:1.58   Wed May  2 16:39:18 2007
+++ llvm/docs/WritingAnLLVMPass.htmlWed May  2 20:11:53 2007
@@ -263,7 +263,7 @@
 time.
 
 
- static const char ID;
+ static char ID;
  Hello() : FunctionPass((intptr_t)&ID) {}
 
 
@@ -285,7 +285,7 @@
 function.
 
 
-  const char Hello::ID = 0;
+  char Hello::ID = 0;
 
 
  We initialize pass ID here. LLVM uses ID's address to identify pass so 
@@ -311,7 +311,7 @@
 namespace {
   struct Hello : public FunctionPass 
{
 
-static const char ID;
+static char ID;
 Hello() : FunctionPass((intptr_t)&ID) {}
 
 virtual bool runOnFunction(Function 
&F) {
@@ -1807,7 +1807,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/05/02 21:39:18 $
+  Last modified: $Date: 2007/05/03 01:11:53 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-05-02 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.57 -> 1.58
---
Log message:

Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces 
static const int, which defauts PassID based pass identification.


---
Diffs of the changes:  (+4 -4)

 WritingAnLLVMPass.html |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.57 
llvm/docs/WritingAnLLVMPass.html:1.58
--- llvm/docs/WritingAnLLVMPass.html:1.57   Tue May  1 15:55:38 2007
+++ llvm/docs/WritingAnLLVMPass.htmlWed May  2 16:39:18 2007
@@ -263,7 +263,7 @@
 time.
 
 
- static const int ID;
+ static const char ID;
  Hello() : FunctionPass((intptr_t)&ID) {}
 
 
@@ -285,7 +285,7 @@
 function.
 
 
-  const int Hello::ID = 0;
+  const char Hello::ID = 0;
 
 
  We initialize pass ID here. LLVM uses ID's address to identify pass so 
@@ -311,7 +311,7 @@
 namespace {
   struct Hello : public FunctionPass 
{
 
-static const int ID;
+static const char ID;
 Hello() : FunctionPass((intptr_t)&ID) {}
 
 virtual bool runOnFunction(Function 
&F) {
@@ -1807,7 +1807,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/05/01 20:55:38 $
+  Last modified: $Date: 2007/05/02 21:39:18 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-05-01 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.56 -> 1.57
---
Log message:

Update doc to reflect changes I am about to install to fix PR 888: 
http://llvm.org/PR888 .


---
Diffs of the changes:  (+20 -1)

 WritingAnLLVMPass.html |   21 -
 1 files changed, 20 insertions(+), 1 deletion(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.56 
llvm/docs/WritingAnLLVMPass.html:1.57
--- llvm/docs/WritingAnLLVMPass.html:1.56   Mon Apr 16 19:17:11 2007
+++ llvm/docs/WritingAnLLVMPass.htmlTue May  1 15:55:38 2007
@@ -263,6 +263,14 @@
 time.
 
 
+ static const int ID;
+ Hello() : FunctionPass((intptr_t)&ID) {}
+
+
+ This declares pass identifier used by LLVM to identify pass. This allows 
LLVM to
+avoid using expensive C++ runtime information.
+
+
 virtual bool runOnFunction(Function 
&F) {
   llvm::cerr << "Hello: " << F.getName() << "\n";
   return false;
@@ -277,6 +285,13 @@
 function.
 
 
+  const int Hello::ID = 0;
+
+
+ We initialize pass ID here. LLVM uses ID's address to identify pass so 
+initialization value is not important.
+
+
   RegisterPass X("hello", "Hello World Pass");
 }  // end of anonymous namespace
 
@@ -295,6 +310,10 @@
 
 namespace {
   struct Hello : public FunctionPass 
{
+
+static const int ID;
+Hello() : FunctionPass((intptr_t)&ID) {}
+
 virtual bool runOnFunction(Function 
&F) {
   llvm::cerr << "Hello: " << F.getName() << "\n";
   return false;
@@ -1788,7 +1807,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/04/17 00:17:11 $
+  Last modified: $Date: 2007/05/01 20:55:38 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-04-16 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.55 -> 1.56
---
Log message:

Remove "ModulePasses requiring FunctionPasses" from the list of future
extensions.


---
Diffs of the changes:  (+2 -29)

 WritingAnLLVMPass.html |   31 ++-
 1 files changed, 2 insertions(+), 29 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.55 
llvm/docs/WritingAnLLVMPass.html:1.56
--- llvm/docs/WritingAnLLVMPass.html:1.55   Mon Apr 16 16:28:14 2007
+++ llvm/docs/WritingAnLLVMPass.htmlMon Apr 16 19:17:11 2007
@@ -103,8 +103,6 @@
   Future extensions planned
 
 Multithreaded LLVM
-ModulePasses requiring 
-FunctionPasses
 
 
 
@@ -1137,7 +1135,7 @@
 
bool ModuleLevelPass::runOnModule(Module &M) {
  ...
- DominatorTree &DT = getAnalysis(Function &F);
+ DominatorTree &DT = getAnalysis(Func);
  ...
}
 
@@ -1780,31 +1778,6 @@
 haven't had time (or multiprocessor machines, thus a reason) to implement this.
 Despite that, we have kept the LLVM passes SMP ready, and you should too.
 
-
-
-
-
-ModulePasses requiring 
FunctionPasses
-
-
-
-
-Currently it is illegal for a ModulePass
-to require a FunctionPass.  This is 
because
-there is only one instance of the FunctionPass object ever created, thus 
nowhere
-to store information for all of the functions in the program at the same time.
-Although this has come up a couple of times before, this has always been worked
-around by factoring one big complicated pass into a global and an
-interprocedural part, both of which are distinct.  In the future, it would be
-nice to have this though.
-
-Note that it is no problem for a FunctionPass to require the results of a ModulePass, only the other way around.
-
-
-
 
 
 
@@ -1815,7 +1788,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/04/16 21:28:14 $
+  Last modified: $Date: 2007/04/17 00:17:11 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-04-16 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.54 -> 1.55
---
Log message:

Document how, module pass can require function pass.


---
Diffs of the changes:  (+19 -3)

 WritingAnLLVMPass.html |   22 +++---
 1 files changed, 19 insertions(+), 3 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.54 
llvm/docs/WritingAnLLVMPass.html:1.55
--- llvm/docs/WritingAnLLVMPass.html:1.54   Mon Mar 19 17:21:25 2007
+++ llvm/docs/WritingAnLLVMPass.htmlMon Apr 16 16:28:14 2007
@@ -466,7 +466,9 @@
 ModulePass indicates that your pass uses the entire program as a unit,
 refering to function bodies in no predictable order, or adding and removing
 functions.  Because nothing is known about the behavior of ModulePass
-subclasses, no optimization can be done for their execution.
+subclasses, no optimization can be done for their execution. A module pass
+can use function level passes (e.g. dominators) using getAnalysis interface
+ getAnalysis(Function).  
 
 To write a correct ModulePass subclass, derive from
 ModulePass and overload the runOnModule method with the
@@ -1127,7 +1129,21 @@
 declare as required in your getAnalysisUsage implementation.  This
 method can be called by your run* method implementation, or by any
-other local method invoked by your run* method.
+other local method invoked by your run* method.
+
+A module level pass can use function level analysis info using this interface.
+For example:
+
+
+   bool ModuleLevelPass::runOnModule(Module &M) {
+ ...
+ DominatorTree &DT = getAnalysis(Function &F);
+ ...
+   }
+
+
+In above example, runOnFunction for DominatorTree is called by pass manager
+before returning a reference to the desired pass.
 
 
 If your pass is capable of updating analyses if they exist (e.g.,
@@ -1799,7 +1815,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/03/19 22:21:25 $
+  Last modified: $Date: 2007/04/16 21:28:14 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-03-19 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.53 -> 1.54
---
Log message:

Document LoopPass.


---
Diffs of the changes:  (+89 -1)

 WritingAnLLVMPass.html |   90 -
 1 files changed, 89 insertions(+), 1 deletion(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.53 
llvm/docs/WritingAnLLVMPass.html:1.54
--- llvm/docs/WritingAnLLVMPass.html:1.53   Wed Mar 14 14:32:21 2007
+++ llvm/docs/WritingAnLLVMPass.htmlMon Mar 19 17:21:25 2007
@@ -43,6 +43,14 @@
 The doFinalization(Module
 &) method
 
+ The LoopPass class
+
+The doInitialization(Loop *,
+LPPassManager &) 
method
+The runOnLoop method
+The doFinalization()
+ method
+
  The BasicBlockPass class
 
 The doInitialization(Function
@@ -126,6 +134,7 @@
 the ModulePass, CallGraphSCCPass, FunctionPass, or LoopPass, or BasicBlockPass classes, which gives the system
 more information about what your pass does, and how it can be combined with
 other passes.  One of the main features of the LLVM Pass Framework is that it
@@ -689,6 +698,85 @@
 
 
 
+  The LoopPass class 
+
+
+
+
+ All LoopPass execute on each loop in the function independent of
+all of the other loops in the function. LoopPass processes loops in
+loop nest order such that outer most loop is processed last. 
+
+ LoopPass subclasses are allowed to update loop nest using
+LPPassManager interface. Implementing a loop pass is usually
+straightforward. Looppass's may overload three virtual methods to
+do their work. All these methods should return true if they modified the 
+program, or false if they didn't. 
+
+
+
+
+  The doInitialization(Loop *,
+ LPPassManager &)
+  method
+
+
+
+
+
+  virtual bool doInitialization(Loop *, LPPassManager &LPM);
+
+
+The doInitialization method is designed to do simple initialization 
+type of stuff that does not depend on the functions being processed.  The 
+doInitialization method call is not scheduled to overlap with any 
+other pass executions (thus it should be very fast). LPPassManager 
+interface should be used to access Function or Module level analysis
+information.
+
+
+
+
+
+
+  The runOnLoop method
+
+
+
+
+
+  virtual bool runOnLoop(Loop *, LPPassManager &LPM) = 0;
+
+
+The runOnLoop method must be implemented by your subclass to do
+the transformation or analysis work of your pass.  As usual, a true value 
should
+be returned if the function is modified. LPPassManager interface
+should be used to update loop nest.
+
+
+
+
+
+  The doFinalization() method
+
+
+
+
+
+  virtual bool doFinalization();
+
+
+The doFinalization method is an infrequently used method that is
+called when the pass framework has finished calling runOnLoop for every loop in the
+program being compiled. 
+
+
+
+
+
+
+
   The BasicBlockPass class
 
 
@@ -1711,7 +1799,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/03/14 19:32:21 $
+  Last modified: $Date: 2007/03/19 22:21:25 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-03-14 Thread Jim Laskey


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.52 -> 1.53
---
Log message:

Change e-mail address.

---
Diffs of the changes:  (+2 -2)

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.52 
llvm/docs/WritingAnLLVMPass.html:1.53
--- llvm/docs/WritingAnLLVMPass.html:1.52   Tue Jan 23 16:56:28 2007
+++ llvm/docs/WritingAnLLVMPass.htmlWed Mar 14 14:32:21 2007
@@ -102,7 +102,7 @@
 
 
   Written by mailto:[EMAIL PROTECTED]">Chris Lattner and
-  mailto:[EMAIL PROTECTED]">Jim Laskey
+  mailto:[EMAIL PROTECTED]">Jim Laskey
 
 
 
@@ -1711,7 +1711,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/01/23 22:56:28 $
+  Last modified: $Date: 2007/03/14 19:32:21 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2007-01-23 Thread Devang Patel


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.51 -> 1.52
---
Log message:

Fix cut-n-pasto.


---
Diffs of the changes:  (+7 -7)

 WritingAnLLVMPass.html |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.51 
llvm/docs/WritingAnLLVMPass.html:1.52
--- llvm/docs/WritingAnLLVMPass.html:1.51   Thu Dec  7 14:04:41 2006
+++ llvm/docs/WritingAnLLVMPass.htmlTue Jan 23 16:56:28 2007
@@ -29,10 +29,10 @@
 
  The CallGraphSCCPass class
 
-The doInitialization(Module
+The doInitialization(CallGraph
&) method
 The runOnSCC method
-The doFinalization(Module
+The doFinalization(CallGraph
&) method
 
  The FunctionPass class
@@ -534,14 +534,14 @@
 
 
 
-  The doInitialization(Module &)
+  The doInitialization(CallGraph &)
   method
 
 
 
 
 
-  virtual bool doInitialization(Module &M);
+  virtual bool doInitialization(CallGraph &CG);
 
 
 The doIninitialize method is allowed to do most of the things that
@@ -573,14 +573,14 @@
 
 
 
-  The doFinalization(Module
+  The doFinalization(CallGraph
&) method
 
 
 
 
 
-  virtual bool doFinalization(Module &M);
+  virtual bool doFinalization(CallGraph &CG);
 
 
 The doFinalization method is an infrequently used method that is
@@ -1711,7 +1711,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/12/07 20:04:41 $
+  Last modified: $Date: 2007/01/23 22:56:28 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-09-28 Thread Reid Spencer


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.49 -> 1.50
---
Log message:

Provide a gdb usage fix provided by Zhongzing Xu.


---
Diffs of the changes:  (+2 -2)

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.49 
llvm/docs/WritingAnLLVMPass.html:1.50
--- llvm/docs/WritingAnLLVMPass.html:1.49   Sun Aug 27 19:45:38 2006
+++ llvm/docs/WritingAnLLVMPass.htmlThu Sep 28 11:53:47 2006
@@ -1593,7 +1593,7 @@
 want:
 
 
-(gdb) break PassManager::run
+(gdb) break llvm::PassManager::run
 Breakpoint 1 at 0x2413bc: file Pass.cpp, line 70.
 (gdb) run test.bc -load $(LLVMTOP)/llvm/Debug/lib/[libname].so 
-[passoption]
 Starting program: opt test.bc -load $(LLVMTOP)/llvm/Debug/lib/[libname].so 
-[passoption]
@@ -1711,7 +1711,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/08/28 00:45:38 $
+  Last modified: $Date: 2006/09/28 16:53:47 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-08-27 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.48 -> 1.49
---
Log message:

Update to match changes in RegisterAnalysisGroup usage


---
Diffs of the changes:  (+3 -3)

 WritingAnLLVMPass.html |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.48 
llvm/docs/WritingAnLLVMPass.html:1.49
--- llvm/docs/WritingAnLLVMPass.html:1.48   Sun Aug 27 18:18:52 2006
+++ llvm/docs/WritingAnLLVMPass.htmlSun Aug 27 19:45:38 2006
@@ -1162,7 +1162,7 @@
   B("somefancyaa", "A more complex alias analysis 
implementation");
 
   // Declare that we implement the AliasAnalysis interface
-  RegisterAnalysisGroupAliasAnalysis,
 FancyAA> C;
+  RegisterAnalysisGroupAliasAnalysis>
 C(B);
 }
 
 
@@ -1180,7 +1180,7 @@
   D("basicaa", "Basic Alias Analysis (default AA impl)");
 
   // Declare that we implement the AliasAnalysis interface
-  RegisterAnalysisGroupAliasAnalysis,
 http://llvm.org/doxygen/structBasicAliasAnalysis.html";>BasicAliasAnalysis,
 true> E;
+  RegisterAnalysisGroupAliasAnalysis,
 true> E(D);
 }
 
 
@@ -1711,7 +1711,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/08/27 23:18:52 $
+  Last modified: $Date: 2006/08/28 00:45:38 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-08-27 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.47 -> 1.48
---
Log message:

update doc: analyze is gone and passes should just use RegisterPass


---
Diffs of the changes:  (+20 -43)

 WritingAnLLVMPass.html |   63 +++--
 1 files changed, 20 insertions(+), 43 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.47 
llvm/docs/WritingAnLLVMPass.html:1.48
--- llvm/docs/WritingAnLLVMPass.html:1.47   Fri Aug 11 11:37:02 2006
+++ llvm/docs/WritingAnLLVMPass.htmlSun Aug 27 18:18:52 2006
@@ -18,8 +18,7 @@
 
 Setting up the build environment
 Basic code required
-Running a pass with opt
- or analyze
+Running a pass with opt
 
   Pass classes and requirements
  
@@ -194,7 +193,7 @@
 This makefile specifies that all of the .cpp files in the current
 directory are to be compiled and linked together into a
 Debug/lib/Hello.so shared object that can be dynamically loaded by
-the opt or analyze tools via their -load options.  
+the opt or bugpoint tools via their -load options.  
 If your operating system uses a suffix other than .so (such as windows or 
 Mac OS/X), the appropriate extension will be used.
 
@@ -271,15 +270,13 @@
 function.
 
 
-  RegisterOpt X("hello", "Hello World Pass");
+  RegisterPass X("hello", "Hello World Pass");
 }  // end of anonymous namespace
 
 
-Lastly, we register our class Hello, giving it a command line
-argument "hello", and a name "Hello World Pass".  There are
-several different ways of registering your pass,
-depending on what it is to be used for.  For "optimizations" we use the
-RegisterOpt template.
+Lastly, we register our class Hello, 
+giving it a command line
+argument "hello", and a name "Hello World Pass".
 
 As a whole, the .cpp file looks like:
 
@@ -297,7 +294,7 @@
 }
   };
   
-  RegisterOpt X("hello", "Hello World Pass");
+  RegisterPass X("hello", "Hello World Pass");
 }
 
 
@@ -312,14 +309,14 @@
 
 
 
-  Running a pass with opt or analyze
+  Running a pass with opt
 
 
 
 
 Now that you have a brand new shiny shared object file, we can use the
 opt command to run an LLVM program through your pass.  Because you
-registered your pass with the RegisterOpt template, you will be able 
to
+registered your pass with the RegisterPass template, you will be able 
to
 use the opt tool to access it, once loaded.
 
 To test it, follow the example at the end of the 
 
-Passes can be registered in several different ways.  Depending on the 
general
-classification of the pass, you should use one of the following templates to
-register the pass:
-
-
-RegisterOpt - This template should be used when you are
-registering a pass that logically should be available for use in the
-'opt' utility.
-
-RegisterAnalysis - This template should be used when you 
are
-registering a pass that logically should be available for use in the
-'analyze' utility.
-
-RegisterPass - This is the generic form of the
-Register* templates that should be used if you want your pass listed 
by
-multiple or no utilities.  This template takes an extra third argument that
-specifies which tools it should be listed in.  See the http://llvm.org/doxygen/PassSupport_8h-source.html";>PassSupport.h
-file for more information.
-
-
-
-Regardless of how you register your pass, you must specify at least two
+As we saw above, passes are registered with the RegisterPass
+template, which requires you to pass at least two
 parameters.  The first parameter is the name of the pass that is to be used on
 the command line to specify that the pass should be added to a program (for
-example opt or analyze).  The second argument is the name of
-the pass, which is to be used for the --help output of programs, as
+example, with opt or bugpoint).  The second argument is the
+name of the pass, which is to be used for the --help output of
+programs, as
 well as for debug output generated by the --debug-pass option.
 
-If a pass is registered to be used by the analyze utility, you
-should implement the virtual print method:
+If you want your pass to be easily dumpable, you should 
+implement the virtual print method:
 
 
 
@@ -892,7 +869,7 @@
 The print method must be implemented by "analyses" in order to 
print
 a human readable version of the analysis results.  This is useful for debugging
 an analysis itself, as well as for other people to figure out how an analysis
-works.  The analyze tool uses this method to generate its output.
+works.  Use the opt -analyze argument to invoke this method.
 
 The ostream parameter specifies the stream to write the results on,
 and the Module parameter gives a pointer to the top level module of 
the
@@ -1181,7 +1158,7 @@
 
 namespace {
   // Analysis Group implementations must be registered 
normally...
-  RegisterOpt
+  RegisterPass
   B("somefancyaa", "A more complex alias analysis 
implementatio

[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-08-11 Thread Chris Lattner


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.46 -> 1.47
---
Log message:

Minor cleanups


---
Diffs of the changes:  (+5 -5)

 WritingAnLLVMPass.html |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.46 
llvm/docs/WritingAnLLVMPass.html:1.47
--- llvm/docs/WritingAnLLVMPass.html:1.46   Mon Aug  7 20:48:17 2006
+++ llvm/docs/WritingAnLLVMPass.htmlFri Aug 11 11:37:02 2006
@@ -102,7 +102,7 @@
 
 
 
-  Written by mailto:[EMAIL PROTECTED]">Chris Lattner, 
+  Written by mailto:[EMAIL PROTECTED]">Chris Lattner and
   mailto:[EMAIL PROTECTED]">Jim Laskey
 
 
@@ -1484,7 +1484,7 @@
 .cpp file add the following include;
 
 
-  #include ""llvm/CodeGen/RegAllocRegistry.h""
+  #include "llvm/CodeGen/RegAllocRegistry.h"
 
 
 Also in your register allocator .cpp file, define a creator function in the
@@ -1522,8 +1522,8 @@
 
 And that's it.  The user is now free to use -regalloc=myregalloc as
 an option.  Registering instruction schedulers is similar except use the
-RegisterRegAlloc class.  Note that the
-RegisterRegAlloc::FunctionPassCtor is significantly different from
+RegisterScheduler class.  Note that the
+RegisterScheduler::FunctionPassCtor is significantly different from
 RegisterRegAlloc::FunctionPassCtor.
 
 To force the load/linking of your register allocator into the llc/lli tools,
@@ -1734,7 +1734,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/08/08 01:48:17 $
+  Last modified: $Date: 2006/08/11 16:37:02 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-08-07 Thread Reid Spencer


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.45 -> 1.46
---
Log message:

Update the instructions for writing a pass as a loadable module per the
new definition in MakefileGuilde.html and Makefile.rules.


---
Diffs of the changes:  (+6 -4)

 WritingAnLLVMPass.html |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.45 
llvm/docs/WritingAnLLVMPass.html:1.46
--- llvm/docs/WritingAnLLVMPass.html:1.45   Fri Aug  4 13:10:12 2006
+++ llvm/docs/WritingAnLLVMPass.htmlMon Aug  7 20:48:17 2006
@@ -178,13 +178,15 @@
 # Name of the library to build
 LIBRARYNAME = Hello
 
-# Build a dynamically linkable shared object
-SHARED_LIBRARY = 1
-
 # Make the shared library become a loadable module so the tools can 
 # dlopen/dlsym on the resulting library.
 LOADABLE_MODULE = 1
 
+# Tell the build system which LLVM libraries your pass needs. You'll probably
+# need at least LLVMSystem.a, LLVMSupport.a, LLVMCore.a but possibly several
+# others too.
+LLVMLIBS = LLVMCore.a LLVMSupport.a LLVMSystem.a
+
 # Include the makefile implementation stuff
 include $(LEVEL)/Makefile.common
 
@@ -1732,7 +1734,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2006/08/04 18:10:12 $
+  Last modified: $Date: 2006/08/08 01:48:17 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-08-04 Thread Jim Laskey


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.44 -> 1.45
---
Log message:

Added how to add machine passes to command line options.


---
Diffs of the changes:  (+217 -78)

 WritingAnLLVMPass.html |  295 -
 1 files changed, 217 insertions(+), 78 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.44 
llvm/docs/WritingAnLLVMPass.html:1.45
--- llvm/docs/WritingAnLLVMPass.html:1.44   Mon Mar 13 23:39:39 2006
+++ llvm/docs/WritingAnLLVMPass.htmlFri Aug  4 13:10:12 2006
@@ -83,6 +83,11 @@
 
 The releaseMemory method
 
+  Registering dynamically loaded passes
+
+  Using existing registries
+  Creating new registries
+
   Using GDB with dynamically loaded passes
 
 Setting a breakpoint in your pass
@@ -97,7 +102,8 @@
 
 
 
-  Written by mailto:[EMAIL PROTECTED]">Chris Lattner
+  Written by mailto:[EMAIL PROTECTED]">Chris Lattner, 
+  mailto:[EMAIL PROTECTED]">Jim Laskey
 
 
 
@@ -163,7 +169,7 @@
   copy the following into Makefile:
   
 
-
+
 # Makefile for hello pass
 
 # Path to top level of LLVM heirarchy
@@ -181,7 +187,7 @@
 
 # Include the makefile implementation stuff
 include $(LEVEL)/Makefile.common
-
+
 
 This makefile specifies that all of the .cpp files in the current
 directory are to be compiled and linked together into a
@@ -205,10 +211,10 @@
 Now that we have a way to compile our new pass, we just have to write it.
 Start out with:
 
-
+
 #include "http://llvm.org/doxygen/Pass_8h-source.html";>llvm/Pass.h"
 #include "http://llvm.org/doxygen/Function_8h-source.html";>llvm/Function.h"
-
+
 
 Which are needed because we are writing a http://llvm.org/doxygen/classllvm_1_1Pass.html";>Pass, and
@@ -216,18 +222,18 @@
 
href="http://llvm.org/doxygen/classllvm_1_1Function.html";>Function's.
 
 Next we have:
-
+
 using namespace llvm;
-
+
 ... which is required because the functions from the include files 
 live in the llvm namespace.
 
 
 Next we have:
 
-
+
 namespace {
-
+
 
 ... which starts out an anonymous namespace.  Anonymous namespaces are to 
C++
 what the "static" keyword is to C (at global scope).  It makes the
@@ -237,9 +243,9 @@
 
 Next, we declare our pass itself:
 
-
+
   struct Hello : public FunctionPass 
{
-
+
 
 This declares a "Hello" class that is a subclass of http://llvm.org/doxygen/classllvm_1_1FunctionPass.html";>FunctionPass.
@@ -248,13 +254,13 @@
 href="#FunctionPass">FunctionPass's operate a function at a
 time.
 
-
+
 virtual bool runOnFunction(Function 
&F) {
   std::cerr << "Hello: " << F.getName() << "\n";
   return false;
 }
   };  // end of struct Hello
-
+
 
 We declare a "runOnFunction" method,
 which overloads an abstract virtual method inherited from 
 
-
+
   RegisterOpt X("hello", "Hello World Pass");
 }  // end of anonymous namespace
-
+
 
 Lastly, we register our class Hello, giving it a command line
 argument "hello", and a name "Hello World Pass".  There are
@@ -275,7 +281,7 @@
 
 As a whole, the .cpp file looks like:
 
-
+
 #include "http://llvm.org/doxygen/Pass_8h-source.html";>llvm/Pass.h"
 #include "http://llvm.org/doxygen/Function_8h-source.html";>llvm/Function.h"
 
@@ -291,7 +297,7 @@
   
   RegisterOpt X("hello", "Hello World Pass");
 }
-
+
 
 Now that it's all together, compile the file with a simple "gmake"
 command in the local directory and you should get a new
@@ -320,12 +326,12 @@
 through our transformation like this (or course, any bytecode file will
 work):
 
-
+
 $ opt -load ../../../Debug/lib/Hello.so -hello < hello.bc > /dev/null
 Hello: __main
 Hello: puts
 Hello: main
-
+
 
 The '-load' option specifies that 'opt' should load your
 pass as a shared object, which makes '-hello' a valid command line
@@ -337,7 +343,7 @@
 To see what happened to the other string you registered, try running
 opt with the --help option:
 
-
+
 $ opt -load ../../../Debug/lib/Hello.so --help
 OVERVIEW: llvm .bc -> .bc modular optimizer
 
@@ -354,7 +360,7 @@
 -inline - Function Integration/Inlining
 -instcombine- Combine redundant instructions
 ...
-
+
 
 The pass name get added as the information string for your pass, giving some
 documentation to users of opt.  Now that you have a working pass, you
@@ -365,7 +371,7 @@
 the execution time of your pass along with the other passes you queue up.  For
 example:
 
-
+
 $ opt -load ../../../Debug/lib/Hello.so -hello -time-passes < hello.bc > 
/dev/null
 Hello: __main
 Hello: puts
@@ -381,7 +387,7 @@
0. (  0.0%)   0. (  0.0%)   0. (  0.0%)   0.0013 (  2.7%)  
Module Verifier
0. (  0.0%)   0. (  0.0%)   0. (  0.0%)   0.0033 (  6.9%)  
Hello World Pass
0.0100 (100.0%)   0.0100 (100.0%)   0.0200 (100.0%)   0.0479 (100.0%)  TOTAL
-
+
 
 As you can see, our implementation above is pretty fast :).  The additional
 passes listed are automatically inserted by the 'opt' tool to verify
@@ -46

[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2006-01-06 Thread Robert L. Bocchino Jr.


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.42 -> 1.43
---
Log message:

Fixed a typo; "= 1" was missing.


---
Diffs of the changes:  (+2 -2)

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.42 
llvm/docs/WritingAnLLVMPass.html:1.43
--- llvm/docs/WritingAnLLVMPass.html:1.42   Mon Nov 28 17:25:41 2005
+++ llvm/docs/WritingAnLLVMPass.htmlFri Jan  6 16:49:23 2006
@@ -177,7 +177,7 @@
 
 # Make the shared library become a loadable module so the tools can 
 # dlopen/dlsym on the resulting library.
-LOADABLE_MODULE
+LOADABLE_MODULE = 1
 
 # Include the makefile implementation stuff
 include $(LEVEL)/Makefile.common
@@ -1593,7 +1593,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.cs.uiuc.edu";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2005/11/28 23:25:41 $
+  Last modified: $Date: 2006/01/06 22:49:23 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/WritingAnLLVMPass.html

2005-11-28 Thread John Criswell


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.41 -> 1.42
---
Log message:

Fixed a punctuation error.


---
Diffs of the changes:  (+2 -2)

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.41 
llvm/docs/WritingAnLLVMPass.html:1.42
--- llvm/docs/WritingAnLLVMPass.html:1.41   Fri Jul 15 14:25:12 2005
+++ llvm/docs/WritingAnLLVMPass.htmlMon Nov 28 17:25:41 2005
@@ -1217,7 +1217,7 @@
 
 The http://llvm.cs.uiuc.edu/doxygen/Statistic_8h-source.html";>Statistic
-class, is designed to be an easy way to expose various success
+class is designed to be an easy way to expose various success
 metrics from passes.  These statistics are printed at the end of a
 run, when the -stats command line option is enabled on the command
 line. See the http://llvm.org/docs/ProgrammersManual.html#Statistic";>Statistics 
section in the Programmer's Manual for details. 
@@ -1593,7 +1593,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.cs.uiuc.edu";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2005/07/15 19:25:12 $
+  Last modified: $Date: 2005/11/28 23:25:41 $
 
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits