From b5c87f605658828530ec72a9f50b5602692a2fd2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 18 May 2007 05:36:14 +0000 Subject: [PATCH] validation fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37205 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/WritingAnLLVMPass.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/WritingAnLLVMPass.html b/docs/WritingAnLLVMPass.html index f65b6791d31..ca6c4ad4519 100644 --- a/docs/WritingAnLLVMPass.html +++ b/docs/WritingAnLLVMPass.html @@ -264,7 +264,7 @@ time.

      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 @@ 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. A module pass can use function level passes (e.g. dominators) using getAnalysis interface - getAnalysis(Function).

+ getAnalysis<DominatorTree>(Function).

To write a correct ModulePass subclass, derive from ModulePass and overload the runOnModule method with the @@ -746,7 +746,7 @@ program, or false if they didn't.

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 @@ For example:

} -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 @@ places (for global resources). Although this is a simple extension, we simply 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.

+ +