source: icGREP/icgrep-devel/icgrep/pablo/pe_string.h @ 5350

Last change on this file since 5350 was 5283, checked in by nmedfort, 3 years ago

Optimized Symbol Generation (and fixed potential bug that could allow duplicate names being constructed); made PabloKernel? extend PabloAST (temporarily removed PabloAST::getName() to avoid diamond problem); added an internal scalar to PabloKernel? struct for each Count to avoid InOut? output scalar variable problem; allowed CodeMotionPass? to move code within the same scope but across a branch statement. Began work on separating Kernels into either Block-Oriented or Segment-Oriented kernels.

File size: 680 bytes
RevLine 
[4213]1#ifndef PE_STRING_H
2#define PE_STRING_H
3
[4244]4#include <pablo/pabloAST.h>
[4510]5#include <llvm/ADT/StringRef.h>
[4213]6
7namespace pablo {
8
[5283]9class String : public PabloAST, public llvm::StringRef {
[4416]10    friend class SymbolGenerator;
[4213]11public:
[4244]12    static inline bool classof(const PabloAST * e) {
[4213]13        return e->getClassTypeId() == ClassTypeId::String;
14    }
15    static inline bool classof(const void *) {
16        return false;
[5283]17    } 
18    virtual ~String() { }
[4213]19protected:
[5283]20    String(llvm::Type * type, const llvm::StringRef & str, Allocator & allocator) noexcept
21    : PabloAST(ClassTypeId::String, type,  allocator)
22    , llvm::StringRef(str.data(), str.size()) {
[4213]23
24    }
25};
26
27}
28
29#endif // PE_STRING_H
Note: See TracBrowser for help on using the repository browser.