cloud9_root/src/cloud9/lib/Core/CacheSideChannel.cpp
// generate tag inequality constraints for <symbolic,symbolic> constraint pairs
generate tag inequality constraints for  constraint pairs
generate tag inequality constraints for constraint pairs
ref<Expr> CacheChannel::generateTagCnstrSS(ref<Expr>& addressI, ref<Expr>& addressJ) {
	pairT tagPair(addressI, addressJ);
	ref<Expr> tagAddrI, tagAddrJ;
	atomicCnstr++;
	{
		if (tagPairCache.count(tagPair)) {
#ifdef _CACHE_CHANNEL_DEBUG
			fprintf(stdout, "cached result found.....\n");
			fflush(stdout);
#endif
			return tagPairCache[tagPair];
		}
	}
	if (tagCache.count(addressI)) tagAddrI = tagCache[addressI];
	else {
		tagAddrI = LShrExpr::create(addressI, ConstantExpr::alloc(log_base2(line) + log_base2(nset), addressI->getWidth()));
		tagCache[addressI] = tagAddrI;
	}
	if (tagCache.count(addressJ)) tagAddrJ = tagCache[addressJ];
	else {
		ref<Expr> tagAddrJ = LShrExpr::create(addressJ, ConstantExpr::alloc(log_base2(line) + log_base2(nset), addressJ->getWidth()));
		tagCache[addressJ] = tagAddrJ;
	}
	ref<Expr> eqExpr = EqExpr::create(tagAddrI, tagAddrJ);
	tagPairCache[tagPair] = NotExpr::create(eqExpr);
	return tagPairCache[tagPair];
}
ref < Expr > CacheChannel :: generateTagCnstrSS ( ref < Expr > & addressI , ref < Expr > & addressJ ) { pairT tagPair ( addressI , addressJ ) ; ref < Expr > tagAddrI , tagAddrJ ; atomicCnstr ++ ; { if ( tagPairCache . count ( tagPair ) ) { #ifdef _CACHE_CHANNEL_DEBUG fprintf ( stdout , " \n " ) ; fflush ( stdout ) ; #endif return tagPairCache [ tagPair ] ; } } if ( tagCache . count ( addressI ) ) tagAddrI = tagCache [ addressI ] ; else { tagAddrI = LShrExpr :: create ( addressI , ConstantExpr :: alloc ( log_base2 ( line ) + log_base2 ( nset ) , addressI -> getWidth ( ) ) ) ; tagCache [ addressI ] = tagAddrI ; } if ( tagCache . count ( addressJ ) ) tagAddrJ = tagCache [ addressJ ] ; else { ref < Expr > tagAddrJ = LShrExpr :: create ( addressJ , ConstantExpr :: alloc ( log_base2 ( line ) + log_base2 ( nset ) , addressJ -> getWidth ( ) ) ) ; tagCache [ addressJ ] = tagAddrJ ; } ref < Expr > eqExpr = EqExpr :: create ( tagAddrI , tagAddrJ ) ; tagPairCache [ tagPair ] = NotExpr :: create ( eqExpr ) ; return tagPairCache [ tagPair ] ; }
generate tag inequality constraints for <symbolic,symbolic> constraint pairs
generate tag inequality constraints for <symbolic symbolic > constraint pairs
/* optimization to reduce memory consumption */ /* end optimization branch */ /* more optimization */ /* more optimization ends */