source: icGREP/icgrep-devel/icgrep/re/re_nullable.h @ 5678

Last change on this file since 5678 was 5646, checked in by nmedfort, 2 years ago

Minor clean up. Bug fix for object cache when the same cached kernel is used twice in a single run. Improvement to RE Minimizer.

File size: 849 bytes
Line 
1#ifndef RE_NULLABLE_H
2#define RE_NULLABLE_H
3
4#include <llvm/Support/Compiler.h>
5
6namespace re { class RE; }
7namespace re { class Vector; }
8
9namespace re {
10
11class RE_Nullable {
12public:
13    static RE * removeNullablePrefix(RE * re) LLVM_ATTRIBUTE_UNUSED_RESULT;
14    static RE * removeNullableSuffix(RE * re) LLVM_ATTRIBUTE_UNUSED_RESULT;
15    static RE * removeNullableAssertion(RE * re) LLVM_ATTRIBUTE_UNUSED_RESULT;
16    static RE * removeNullableAfterAssertion(RE * re) LLVM_ATTRIBUTE_UNUSED_RESULT;
17    static bool isNullable(const RE * re);
18    static bool hasNullablePrefix(const RE * re);
19    static bool hasNullableSuffix(const RE * re);
20private:
21    static bool isNullableAfterAssertion(const RE * re);
22    static RE * removeNullableAfterAssertion_helper(RE * re);
23    static bool isNullable(const Vector * vec);
24};
25
26}
27
28#endif // RE_NULLABLE_H
Note: See TracBrowser for help on using the repository browser.