projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40353ec
)
added set_all func
author
Daniel Grund
<grund@cs.uni-saarland.de>
Tue, 19 Apr 2005 10:18:45 +0000
(10:18 +0000)
committer
Daniel Grund
<grund@cs.uni-saarland.de>
Tue, 19 Apr 2005 10:18:45 +0000
(10:18 +0000)
[r5715]
ir/adt/bitset.h
patch
|
blob
|
history
diff --git
a/ir/adt/bitset.h
b/ir/adt/bitset.h
index
1f62168
..
5d86c23
100644
(file)
--- a/
ir/adt/bitset.h
+++ b/
ir/adt/bitset.h
@@
-306,6
+306,18
@@
static INLINE void bitset_clear_all(bitset_t *bs)
memset(bs->data, 0, BS_UNIT_SIZE * bs->units);
}
+/**
+ * Set the bitset.
+ * This sets all bits to one.
+ * @param bs The bitset.
+ */
+static INLINE void bitset_set_all(bitset_t *bs)
+{
+ //TODO is this correct (last unit)?
+ //TODO is -1 correct == all bits equal 1
+ memset(bs->data, -1, BS_UNIT_SIZE * bs->units);
+}
+
/**
* Check, if one bitset is contained by another.
* That is, each bit set in lhs is also set in rhs.