Commit 8c9921a1 authored by Matthias Braun's avatar Matthias Braun
Browse files

clarify some node comments

parent 52e7ec50
...@@ -31,8 +31,10 @@ class Add(Binop): ...@@ -31,8 +31,10 @@ class Add(Binop):
class Alloc(Op): class Alloc(Op):
"""allocates a block of memory. """allocates a block of memory.
It can be specified whether the variable should be allocated to the stack It can be specified whether the memory should be allocated to the stack
or to the heap.""" or to the heap.
Allocates memory for one or more objects (depending on value on count input).
"""
ins = [ ins = [
("mem", "memory dependency" ), ("mem", "memory dependency" ),
("count", "number of objects to allocate" ), ("count", "number of objects to allocate" ),
...@@ -47,7 +49,7 @@ class Alloc(Op): ...@@ -47,7 +49,7 @@ class Alloc(Op):
dict( dict(
name = "type", name = "type",
type = "ir_type*", type = "ir_type*",
comment = "type of the allocated variable", comment = "type of the objects to allocate",
), ),
dict( dict(
name = "where", name = "where",
...@@ -425,7 +427,7 @@ class Conv(Unop): ...@@ -425,7 +427,7 @@ class Conv(Unop):
attr_struct = "conv_attr" attr_struct = "conv_attr"
class CopyB(Op): class CopyB(Op):
"""Copies a block of memory""" """Copies a block of memory with statically known size/type."""
ins = [ ins = [
("mem", "memory dependency"), ("mem", "memory dependency"),
("dst", "destination address"), ("dst", "destination address"),
...@@ -503,7 +505,9 @@ class End(Op): ...@@ -503,7 +505,9 @@ class End(Op):
singleton = True singleton = True
class Eor(Binop): class Eor(Binop):
"""returns the result of a bitwise exclusive or operation of its operands""" """returns the result of a bitwise exclusive or operation of its operands.
This is also known as the Xor operation."""
flags = [ "commutative" ] flags = [ "commutative" ]
class Free(Op): class Free(Op):
...@@ -531,7 +535,10 @@ class Free(Op): ...@@ -531,7 +535,10 @@ class Free(Op):
attr_struct = "free_attr" attr_struct = "free_attr"
class Id(Op): class Id(Op):
"""Returns its operand unchanged.""" """Returns its operand unchanged.
This is mainly used when exchanging nodes. Usually you shouldn't see Id
nodes since the getters/setters for node inputs skip them automatically."""
ins = [ ins = [
("pred", "the value which is returned unchanged") ("pred", "the value which is returned unchanged")
] ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment