OmniSciDB  c07336695a
GroupByAndAggregate::DiamondCodegen Struct Reference
+ 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 154 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 846 of file GroupByAndAggregate.cpp.

References chain_to_next_, CHECK, cond_false_, cond_true_, LL_BUILDER, LL_CONTEXT, orig_cond_false_, parent_, and ROW_FUNC.

853  : executor_(executor), chain_to_next_(chain_to_next), parent_(parent) {
854  if (parent_) {
856  }
857  cond_true_ = llvm::BasicBlock::Create(LL_CONTEXT, label_prefix + "_true", ROW_FUNC);
858  if (share_false_edge_with_parent) {
859  CHECK(parent);
861  } else {
863  llvm::BasicBlock::Create(LL_CONTEXT, label_prefix + "_false", ROW_FUNC);
864  }
865 
866  LL_BUILDER.CreateCondBr(cond, cond_true_, cond_false_);
867  LL_BUILDER.SetInsertPoint(cond_true_);
868 }
#define ROW_FUNC
#define LL_BUILDER
#define LL_CONTEXT
#define CHECK(condition)
Definition: Logger.h:187

◆ ~DiamondCodegen()

GroupByAndAggregate::DiamondCodegen::~DiamondCodegen ( )

Definition at line 880 of file GroupByAndAggregate.cpp.

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

880  {
882  LL_BUILDER.CreateBr(parent_->cond_false_);
883  } else if (chain_to_next_) {
884  LL_BUILDER.CreateBr(cond_false_);
885  }
887  LL_BUILDER.SetInsertPoint(orig_cond_false_);
888  }
889 }
#define LL_BUILDER

Member Function Documentation

◆ setChainToNext()

void GroupByAndAggregate::DiamondCodegen::setChainToNext ( )

Definition at line 870 of file GroupByAndAggregate.cpp.

References chain_to_next_, CHECK, and parent_.

870  {
871  CHECK(!parent_);
872  chain_to_next_ = true;
873 }
#define CHECK(condition)
Definition: Logger.h:187

◆ setFalseTarget()

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

Definition at line 875 of file GroupByAndAggregate.cpp.

References CHECK, cond_false_, orig_cond_false_, and parent_.

Referenced by Executor::groupByColumnCodegen().

875  {
877  cond_false_ = cond_false;
878 }
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

Member Data Documentation

◆ chain_to_next_

bool GroupByAndAggregate::DiamondCodegen::chain_to_next_

Definition at line 169 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 166 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: