Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3998994
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
Thu, Jul 9, 1:16 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Jul 11, 1:16 AM (1 d, 7 h)
Engine
blob
Format
Raw Data
Handle
273017
Attached To
rXR Xreate
transformersaturation.h
View Options
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* 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