Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3997051
transformersaturation.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 8, 5:37 PM
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, Jul 10, 5:37 PM (1 d, 10 h)
Engine
blob
Format
Raw Data
Handle
271668
Attached To
rXR Xreate
transformersaturation.h
View Options
/*
* File: transformersaturation.h
* Author: pgess <v.melnychenko@xreate.org>
*
* Created on March 25, 2017, 9:59 PM
*/
#ifndef TRANSFORMERSATURATION_H
#define TRANSFORMERSATURATION_H
#include "transformations.h"
namespace xreate { namespace compilation {
class TransformerSaturation: public Transformer{
public:
TransformerSaturation(llvm::BasicBlock* allocationBlock, TransformationsManager* manager);
~TransformerSaturation();
llvm::Value* transform(const Expression& expression, llvm::Value* raw, const Context& ctx) override;
void processBreak(const Context& ctx);
void allocateFlag(const Context& ctx);
bool insertSaturationChecks(llvm::BasicBlock* blockContinue, llvm::BasicBlock* blockExit, const Context& ctx);
private:
TransformationsManager* man;
TransformerSaturation* oldInstance = nullptr;
llvm::BasicBlock* blockAllocation;
llvm::Value* constTrue;
llvm::Value* constFalse;
llvm::Value* flagSaturation = nullptr;
};
template <>
struct TransformerInfo<TransformerSaturation> {
static const unsigned int id = 0;
};
} }
#endif /* TRANSFORMERSATURATION_H */
Event Timeline
Log In to Comment