OmniSciDB  0264ff685a
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

◆ DiamondCodegen()

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 903 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_.

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

◆ ~DiamondCodegen()

GroupByAndAggregate::DiamondCodegen::~DiamondCodegen ( )

Definition at line 938 of file GroupByAndAggregate.cpp.

References AUTOMATIC_IR_METADATA, chain_to_next_, cond_false_, executor_, LL_BUILDER, orig_cond_false_, and parent_.

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

Member Function Documentation

◆ setChainToNext()

void GroupByAndAggregate::DiamondCodegen::setChainToNext ( )

Definition at line 928 of file GroupByAndAggregate.cpp.

References chain_to_next_, CHECK, and parent_.

928  {
929  CHECK(!parent_);
930  chain_to_next_ = true;
931 }
#define CHECK(condition)
Definition: Logger.h:197

◆ setFalseTarget()

void GroupByAndAggregate::DiamondCodegen::setFalseTarget ( llvm::BasicBlock *  cond_false)

Definition at line 933 of file GroupByAndAggregate.cpp.

References CHECK, cond_false_, orig_cond_false_, and parent_.

Referenced by Executor::groupByColumnCodegen().

933  {
935  cond_false_ = cond_false;
936 }
#define CHECK(condition)
Definition: Logger.h:197
+ Here is the caller graph for this function:

Member Data Documentation

◆ chain_to_next_

bool GroupByAndAggregate::DiamondCodegen::chain_to_next_

Definition at line 165 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen(), setChainToNext(), and ~DiamondCodegen().

◆ cond_false_

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

◆ cond_true_

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

Definition at line 162 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().

◆ executor_

◆ orig_cond_false_

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

◆ parent_

DiamondCodegen* GroupByAndAggregate::DiamondCodegen::parent_

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