summaryrefslogtreecommitdiff
path: root/Source/GPUVerify/VariableDualiser.cs
diff options
context:
space:
mode:
authorGravatar chmaria <unknown>2012-06-18 15:00:48 +0200
committerGravatar chmaria <unknown>2012-06-18 15:00:48 +0200
commit6e0e8b16609329816c07c7ef451479861ed89abe (patch)
treec6e60423355816f52b0633f2bcca5cdda5732733 /Source/GPUVerify/VariableDualiser.cs
parentc0f50ec423987b670181d13a416c1bffd279556a (diff)
parent0788f5ea2bb20f079ffa5294d52fe76b78c74fa9 (diff)
Merged with default.
Diffstat (limited to 'Source/GPUVerify/VariableDualiser.cs')
-rw-r--r--Source/GPUVerify/VariableDualiser.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/GPUVerify/VariableDualiser.cs b/Source/GPUVerify/VariableDualiser.cs
index 7f637734..63720c13 100644
--- a/Source/GPUVerify/VariableDualiser.cs
+++ b/Source/GPUVerify/VariableDualiser.cs
@@ -36,6 +36,11 @@ namespace GPUVerify
return new IdentifierExpr(node.tok, new Constant(node.tok, DualiseTypedIdent(node.Decl)));
}
+ if (CommandLineOptions.InterGroupRaceChecking && GPUVerifier.IsGroupIdConstant(node.Decl))
+ {
+ return new IdentifierExpr(node.tok, new Constant(node.tok, DualiseTypedIdent(node.Decl)));
+ }
+
return node;
}
@@ -52,7 +57,8 @@ namespace GPUVerify
public override Variable VisitVariable(Variable node)
{
- if (!(node is Constant) || GPUVerifier.IsThreadLocalIdConstant(node))
+ if (!(node is Constant) || GPUVerifier.IsThreadLocalIdConstant(node) ||
+ (CommandLineOptions.InterGroupRaceChecking && GPUVerifier.IsGroupIdConstant(node)))
{
node.TypedIdent = DualiseTypedIdent(node);
node.Name = node.Name + "$" + id;