Adding a custom keyword to avoid Custom Passes

I have written a couple of custom passes to be run during compilation,
however there are portions of the source code on which I don't want my
passes to run. My idea was to insert 2 keywords to my source, one that
symbolizes the beginning of a non-custom-pass zone, and one that symbolizes
the end of that zone. My problem is that I don't know how to make the
connection between the portion of code that should not have custom passes
run on it, and the BasicBlock object I receive in my custom pass. Could
anyone tell me if it is possible and how, to make this connection?
Thanks a lot in advance