From c758209153ca0f6da6737f25ada269c573fba456 Mon Sep 17 00:00:00 2001
From: Devang Patel
- RegisterPass<Hello> X("hello", "Hello World Pass"); + RegisterPass<Hello> X("hello", "Hello World Pass", + false /* Only looks at CFG */, + false /* Analysis Pass */); } // end of anonymous namespace
Lastly, we register our class Hello, giving it a command line -argument "hello", and a name "Hello World Pass".
+argument "hello", and a name "Hello World Pass". +Last two RegisterPass arguments are optional. Their default value is false. +If a pass walks CFG without modifying it then third argument is set to true. +If a pass is an analysis pass, for example dominator tree pass, then true +is supplied as fourth argument.As a whole, the .cpp file looks like:
-- cgit v1.1