Skip to content

Commit

Permalink
Merge branch 'development' into liveness
Browse files Browse the repository at this point in the history
  • Loading branch information
tonghaining committed Oct 23, 2023
2 parents 24e3ec9 + a0ce1fb commit 9d2c9b5
Show file tree
Hide file tree
Showing 36 changed files with 664 additions and 197 deletions.
2 changes: 0 additions & 2 deletions cat/ptx-v7.5.cat
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ let proxy-preserved-cause-base
| vloc & (cause-base & (proxy-fence-ops^-1); cause-base; [GEN])
| vloc & ([GEN]; cause-base; cause-base & proxy-fence-ops)
| vloc & (cause-base & (proxy-fence-ops^-1); cause-base; cause-base & proxy-fence-ops)
// The alloy model does not support the constant proxy below
| loc & ([M & CON]; cause-base; [F & CON]; cause-base; [M & CON])
| loc & ([GEN]; cause-base; [F & ALIAS]; cause-base; [GEN])
| loc & (cause-base & (proxy-fence-ops^-1); cause-base; [F & ALIAS]; cause-base; [GEN])
| loc & ([GEN]; cause-base; [F & ALIAS]; cause-base; cause-base & proxy-fence-ops)
Expand Down
2 changes: 1 addition & 1 deletion cat/spirv-check.cat
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ let scbarinstIsPo = (syncbar & (po | po^-1))
flag ~empty scbarinstIsPo as checkScbarinstIsPo

// can't have two cbars where one comes first in po in one thread and second in po in another thread
let scbarinstIsPo2 = (syncbar & (po; syncbar; po) & syncbar)
let scbarinstIsPo2 = (po; syncbar; po) & syncbar
flag ~empty scbarinstIsPo2 as checkScbarinstIsPo2

// the same instance of a control barrier must have same scope, acq/rel, semantics
Expand Down
2 changes: 0 additions & 2 deletions cat/spirv-nochains.cat
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ let locord = loc &
( ([W]; (hb & avvisinc); avdv; (hb); visdv; (hb & avvisinc); [R])) // RaW (via device domain)
)

let w-locord = [W]; locord

(***********************)
(* Memory Model Axioms *)
(***********************)
Expand Down
2 changes: 0 additions & 2 deletions cat/spirv.cat
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ let locord = loc &
( ([W]; (hb & avvisinc); avdv; (hb); visdv; (hb & avvisinc); [R])) // RaW (via device domain)
)

let w-locord = [W]; locord

(***********************)
(* Memory Model Axioms *)
(***********************)
Expand Down
49 changes: 13 additions & 36 deletions dartagnan/src/main/antlr4/LitmusPTX.g4
Original file line number Diff line number Diff line change
Expand Up @@ -94,45 +94,36 @@ instruction
;

storeInstruction
: storeConstant
| storeRegister
;

storeConstant
: store Period mo (Period scope)? location Comma constant
;

storeRegister
: store Period mo (Period scope)? location Comma register
: store Period mo (Period scope)? location Comma value
;

loadInstruction
: localConstant
: localValue
| localAdd
| localSub
| localMul
| localDiv
| loadLocation
;

localConstant
: load Period mo (Period scope)? register Comma constant
localValue
: load Period mo (Period scope)? register Comma value
;

localAdd
: Add register Comma register Comma constant
: Add register Comma value Comma value
;

localSub
: Sub register Comma register Comma constant
: Sub register Comma value Comma value
;

localMul
: Mul register Comma register Comma constant
: Mul register Comma value Comma value
;

localDiv
: Div register Comma register Comma constant
: Div register Comma value Comma value
;

loadLocation
Expand Down Expand Up @@ -164,18 +155,13 @@ barrier
;

atomInstruction
: atomConstant
| atomRegister
: atomOp
| atomCAS
| atomExchange
;

atomConstant
: atom Period mo Period scope Period operation register Comma location Comma constant
;

atomRegister
: atom Period mo Period scope Period operation register Comma location Comma register
atomOp
: atom Period mo Period scope Period operation register Comma location Comma value
;

atomCAS
Expand All @@ -187,20 +173,11 @@ atomExchange
;

redInstruction
: redConstant
| redRegister
;

redConstant
: red Period mo Period scope Period operation location Comma constant
;

redRegister
: red Period mo Period scope Period operation location Comma register
: red Period mo Period scope Period operation location Comma value
;

branchCond
: cond register Comma value Comma Label
: cond value Comma value Comma Label
;

jump
Expand Down
40 changes: 30 additions & 10 deletions dartagnan/src/main/antlr4/LitmusVulkan.g4
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,49 @@ storeInstruction
;

loadInstruction
: localConstant
: localValue
| localAdd
| localSub
| localMul
| localDiv
| loadLocation
;

localConstant
: Load atomic mo? avvis? scope? storageClass storageClassSemanticList avvisSemanticList register Comma constant
localValue
: Load atomic mo? avvis? scope? storageClass storageClassSemanticList avvisSemanticList register Comma value
;

localAdd
: Add register Comma value Comma value
;

localSub
: Sub register Comma value Comma value
;

localMul
: Mul register Comma value Comma value
;

localDiv
: Div register Comma value Comma value
;

loadLocation
: Load atomic mo? avvis? scope? storageClass storageClassSemanticList avvisSemanticList register Comma location
;

rmwInstruction
: rmwExch
: rmwValue
| rmwOp
;

rmwExch
rmwValue
: RMW atomic mo? avvis? scope? storageClass storageClassSemanticList avvisSemanticList register Comma location Comma value
;

rmwOp
: RMW atomic mo? avvis? scope? storageClass storageClassSemanticList avvisSemanticList operation register Comma location Comma constant
: RMW atomic mo? avvis? scope? storageClass storageClassSemanticList avvisSemanticList operation register Comma location Comma value
;

fenceInstruction
Expand All @@ -156,7 +176,7 @@ label
;

branchCond
: cond register Comma value Comma Label
: cond value Comma value Comma Label
;

jump
Expand Down Expand Up @@ -309,9 +329,9 @@ Bgt : 'bgt';
Ble : 'ble';
Bge : 'bge';

Add : 'plus';
Sub : 'minus';
Mult : 'mult';
Add : 'add';
Sub : 'sub';
Mult : 'mul';
Div : 'div';
And : 'and';
Or : 'or';
Expand Down
Loading

0 comments on commit 9d2c9b5

Please sign in to comment.