Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision 2c04369a0b21c0ce78ea35835ad1f3d320c8813a)
+++ src/GenPoly/Lvalue.cc	(revision 0d70e0d39fb63a683493edcb9e238a2fb21e4ea8)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Tue May 28 11:07:00 2019
-// Update Count     : 6
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Mar 17 09:11:18 2017
+// Update Count     : 5
 //
 
@@ -42,42 +42,23 @@
 namespace GenPoly {
 	namespace {
-		/// Local helper for pass visitors that need to add reference operations.
-		struct WithDerefOp {
-			FunctionDecl * dereferenceOperator = nullptr;
-
-			// TODO: fold this into the general createDeref function??
-			Expression * mkDeref( Expression * arg ) {
-				if ( dereferenceOperator ) {
-					// note: reference depth can be arbitrarily deep here, so peel off the
-					// outermost pointer/reference, not just pointer because they are effecitvely
-					// equivalent in this pass
-					VariableExpr * deref = new VariableExpr( dereferenceOperator );
-					deref->result = new PointerType( Type::Qualifiers(), deref->result );
-					Type * base = InitTweak::getPointerBase( arg->result );
-					assertf( base, "expected pointer type in dereference (type was %s)",
-						toString( arg->result ).c_str() );
-					ApplicationExpr * ret = new ApplicationExpr( deref, { arg } );
-					delete ret->result;
-					ret->result = base->clone();
-					ret->result->set_lvalue( true );
-					return ret;
-				} else {
-					return UntypedExpr::createDeref( arg );
-				}
-			}
-
-			void previsit( FunctionDecl * funcDecl ) {
-				if ( dereferenceOperator ) return;
-				if ( funcDecl->get_name() != "*?" ) return;
-				if ( funcDecl->get_linkage() == LinkageSpec::Intrinsic ) return;
-				FunctionType * ftype = funcDecl->get_functionType();
-				if ( ftype->get_parameters().size() != 1 ) return;
-				DeclarationWithType * arg0 = ftype->get_parameters().front();
-				if ( arg0->get_type()->get_qualifiers() == Type::Qualifiers() ) return;
-				dereferenceOperator = funcDecl;
-			}
-		};
-
-		struct ReferenceConversions final : public WithStmtsToAdd, public WithDerefOp {
+		// TODO: fold this into the general createDeref function??
+		Expression * mkDeref( Expression * arg ) {
+			if ( SymTab::dereferenceOperator ) {
+				// note: reference depth can be arbitrarily deep here, so peel off the outermost pointer/reference, not just pointer because they are effecitvely equivalent in this pass
+				VariableExpr * deref = new VariableExpr( SymTab::dereferenceOperator );
+				deref->result = new PointerType( Type::Qualifiers(), deref->result );
+				Type * base = InitTweak::getPointerBase( arg->result );
+				assertf( base, "expected pointer type in dereference (type was %s)", toString( arg->result ).c_str() );
+				ApplicationExpr * ret = new ApplicationExpr( deref, { arg } );
+				delete ret->result;
+				ret->result = base->clone();
+				ret->result->set_lvalue( true );
+				return ret;
+			} else {
+				return UntypedExpr::createDeref( arg );
+			}
+		}
+
+		struct ReferenceConversions final : public WithStmtsToAdd {
 			Expression * postmutate( CastExpr * castExpr );
 			Expression * postmutate( AddressExpr * addrExpr );
@@ -85,5 +66,5 @@
 
 		/// Intrinsic functions that take reference parameters don't REALLY take reference parameters -- their reference arguments must always be implicitly dereferenced.
-		struct FixIntrinsicArgs final : public WithDerefOp {
+		struct FixIntrinsicArgs final {
 			Expression * postmutate( ApplicationExpr * appExpr );
 		};
@@ -117,6 +98,5 @@
 		};
 
-		struct AddrRef final : public WithGuards, public WithVisitorRef<AddrRef>,
-				public WithShortCircuiting, public WithDerefOp {
+		struct AddrRef final : public WithGuards, public WithVisitorRef<AddrRef>, public WithShortCircuiting {
 			void premutate( AddressExpr * addrExpr );
 			Expression * postmutate( AddressExpr * addrExpr );
Index: src/SymTab/Autogen.h
===================================================================
--- src/SymTab/Autogen.h	(revision 2c04369a0b21c0ce78ea35835ad1f3d320c8813a)
+++ src/SymTab/Autogen.h	(revision 0d70e0d39fb63a683493edcb9e238a2fb21e4ea8)
@@ -9,7 +9,7 @@
 // Author           : Rob Schluntz
 // Created On       : Sun May 17 21:53:34 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Tue May 28 11:04:00 2019
-// Update Count     : 16
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Sat Jul 22 09:50:25 2017
+// Update Count     : 15
 //
 
@@ -40,4 +40,8 @@
 	/// such as in determining array dimension type
 	extern Type * SizeType;
+
+	/// intrinsic dereference operator for unqualified types - set when *? function is seen in FindSpecialDeclarations.
+	/// Useful for creating dereference ApplicationExprs without a full resolver pass.
+	extern FunctionDecl * dereferenceOperator;
 
 	// generate the type of an assignment function for paramType
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 2c04369a0b21c0ce78ea35835ad1f3d320c8813a)
+++ src/SymTab/Validate.cc	(revision 0d70e0d39fb63a683493edcb9e238a2fb21e4ea8)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 21:50:04 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Tue May 28 11:07:00 2019
-// Update Count     : 360
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon Aug 28 13:47:23 2017
+// Update Count     : 359
 //
 
@@ -288,4 +288,9 @@
 	};
 
+	FunctionDecl * dereferenceOperator = nullptr;
+	struct FindSpecialDeclarations final {
+		void previsit( FunctionDecl * funcDecl );
+	};
+
 	void validate( std::list< Declaration * > &translationUnit, __attribute__((unused)) bool doDebug ) {
 		PassVisitor<EnumAndPointerDecay> epc;
@@ -294,4 +299,5 @@
 		PassVisitor<CompoundLiteral> compoundliteral;
 		PassVisitor<ValidateGenericParameters> genericParams;
+		PassVisitor<FindSpecialDeclarations> finder;
 		PassVisitor<LabelAddressFixer> labelAddrFixer;
 		PassVisitor<HoistTypeDecls> hoistDecls;
@@ -370,4 +376,7 @@
 			Stats::Time::TimeBlock("Array Length", [&]() {
 				ArrayLength::computeLength( translationUnit );
+			});
+			Stats::Time::TimeBlock("Find Special Declarations", [&]() {
+				acceptAll( translationUnit, finder ); // xxx - remove this pass soon
 			});
 			Stats::Time::TimeBlock("Fix Label Address", [&]() {
@@ -1363,4 +1372,15 @@
 		return addrExpr;
 	}
+
+	void FindSpecialDeclarations::previsit( FunctionDecl * funcDecl ) {
+		if ( ! dereferenceOperator ) {
+			if ( funcDecl->get_name() == "*?" && funcDecl->get_linkage() == LinkageSpec::Intrinsic ) {
+				FunctionType * ftype = funcDecl->get_functionType();
+				if ( ftype->get_parameters().size() == 1 && ftype->get_parameters().front()->get_type()->get_qualifiers() == Type::Qualifiers() ) {
+					dereferenceOperator = funcDecl;
+				}
+			}
+		}
+	}
 } // namespace SymTab
 
