OmniSciDB  85c2d10cdc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GroupByAndAggregate::DiamondCodegen Struct Reference

#include <GroupByAndAggregate.h>

+ Collaboration diagram for GroupByAndAggregate::DiamondCodegen:

Public Member Functions

 DiamondCodegen (llvm::Value *cond, Executor *executor, const bool chain_to_next, const std::string &label_prefix, DiamondCodegen *parent, const bool share_false_edge_with_parent)
 
void setChainToNext ()
 
void setFalseTarget (llvm::BasicBlock *cond_false)
 
 ~DiamondCodegen ()
 

Public Attributes

Executorexecutor_
 
llvm::BasicBlock * cond_true_
 
llvm::BasicBlock * cond_false_
 
llvm::BasicBlock * orig_cond_false_
 
bool chain_to_next_
 
DiamondCodegenparent_
 

Detailed Description

Definition at line 150 of file GroupByAndAggregate.h.

Constructor & Destructor Documentation

GroupByAndAggregate::DiamondCodegen::DiamondCodegen ( llvm::Value *  cond,
Executor executor,
const bool  chain_to_next,
const std::string &  label_prefix,
DiamondCodegen parent,
const bool  share_false_edge_with_parent 
)

Definition at line 904 of file GroupByAndAggregate.cpp.

References AUTOMATIC_IR_METADATA, chain_to_next_, CHECK, cond_false_, cond_true_, CUR_FUNC, executor_, LL_BUILDER, LL_CONTEXT, orig_cond_false_, and parent_.

911  : executor_(executor), chain_to_next_(chain_to_next), parent_(parent) {
912  AUTOMATIC_IR_METADATA(executor_->cgen_state_.get());
913  if (parent_) {
915  }
916  cond_true_ = llvm::BasicBlock::Create(LL_CONTEXT, label_prefix + "_true", CUR_FUNC);
917  if (share_false_edge_with_parent) {
918  CHECK(parent);
920  } else {
922  llvm::BasicBlock::Create(LL_CONTEXT, label_prefix + "_false", CUR_FUNC);
923  }
924 
925  LL_BUILDER.CreateCondBr(cond, cond_true_, cond_false_);
926  LL_BUILDER.SetInsertPoint(cond_true_);
927 }
#define LL_BUILDER
#define LL_CONTEXT
#define AUTOMATIC_IR_METADATA(CGENSTATE)
#define CHECK(condition)
Definition: Logger.h:197
#define CUR_FUNC
GroupByAndAggregate::DiamondCodegen::~DiamondCodegen ( )

Definition at line 939 of file GroupByAndAggregate.cpp.

References AUTOMATIC_IR_METADATA, GroupByAndAggregate::executor_, and LL_BUILDER.

939  {
940  AUTOMATIC_IR_METADATA(executor_->cgen_state_.get());
942  LL_BUILDER.CreateBr(parent_->cond_false_);
943  } else if (chain_to_next_) {
944  LL_BUILDER.CreateBr(cond_false_);
945  }
947  LL_BUILDER.SetInsertPoint(orig_cond_false_);
948  }
949 }
#define LL_BUILDER
#define AUTOMATIC_IR_METADATA(CGENSTATE)

Member Function Documentation

void GroupByAndAggregate::DiamondCodegen::setChainToNext ( )

Definition at line 929 of file GroupByAndAggregate.cpp.

References CHECK.

929  {
930  CHECK(!parent_);
931  chain_to_next_ = true;
932 }
#define CHECK(condition)
Definition: Logger.h:197
void GroupByAndAggregate::DiamondCodegen::setFalseTarget ( llvm::BasicBlock *  cond_false)

Definition at line 934 of file GroupByAndAggregate.cpp.

References CHECK.

Referenced by Executor::groupByColumnCodegen().

934  {
936  cond_false_ = cond_false;
937 }
#define CHECK(condition)
Definition: Logger.h:197

+ Here is the caller graph for this function:

Member Data Documentation

bool GroupByAndAggregate::DiamondCodegen::chain_to_next_

Definition at line 165 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().

llvm::BasicBlock* GroupByAndAggregate::DiamondCodegen::cond_false_

Definition at line 163 of file GroupByAndAggregate.h.

Referenced by GroupByAndAggregate::codegen(), and DiamondCodegen().

llvm::BasicBlock* GroupByAndAggregate::DiamondCodegen::cond_true_

Definition at line 162 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().

Executor* GroupByAndAggregate::DiamondCodegen::executor_

Definition at line 161 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().

llvm::BasicBlock* GroupByAndAggregate::DiamondCodegen::orig_cond_false_

Definition at line 164 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen(), and Executor::groupByColumnCodegen().

DiamondCodegen* GroupByAndAggregate::DiamondCodegen::parent_

Definition at line 166 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().


The documentation for this struct was generated from the following files: