-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fact-gen: support freeze instruction
- Loading branch information
1 parent
79e8394
commit 1a64af9
Showing
9 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// http://llvm.org/docs/LangRef.html#freeze-instr | ||
// keywords: instr | ||
|
||
.type FreezeInstruction <: symbol | ||
.decl freeze_instr(instr:FreezeInstruction) | ||
|
||
instr(v) :- freeze_instr(v). | ||
|
||
.decl freeze_instr_operand(instr:FreezeInstruction, val:Operand) | ||
|
||
|
||
//------------------------------------------------------------------------------ | ||
// [Constraints] | ||
// | ||
// The ‘freeze‘ instr requires that the resulting value is the same type as its | ||
// operand. | ||
//------------------------------------------------------------------------------ | ||
|
||
schema_invalid_instr(Instr, __FILE__, __LINE__) :- | ||
schema_sanity(), | ||
freeze_instr(Instr), | ||
!freeze_instr_operand(Instr, _). | ||
|
||
schema_invalid_instr(Instr, __FILE__, __LINE__) :- | ||
schema_sanity(), | ||
instr_returns_type(Instr, Type), | ||
freeze_instr_operand(Instr, Op), | ||
!operand_has_type(Op, Type). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters