OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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 862 of file GroupByAndAggregate.cpp.

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

869  : executor_(executor), chain_to_next_(chain_to_next), parent_(parent) {
870  if (parent_) {
872  }
873  cond_true_ = llvm::BasicBlock::Create(LL_CONTEXT, label_prefix + "_true", ROW_FUNC);
874  if (share_false_edge_with_parent) {
875  CHECK(parent);
877  } else {
879  llvm::BasicBlock::Create(LL_CONTEXT, label_prefix + "_false", ROW_FUNC);
880  }
881 
882  LL_BUILDER.CreateCondBr(cond, cond_true_, cond_false_);
883  LL_BUILDER.SetInsertPoint(cond_true_);
884 }
#define ROW_FUNC
#define LL_BUILDER
#define LL_CONTEXT
CHECK(cgen_state)

+ Here is the call graph for this function:

GroupByAndAggregate::DiamondCodegen::~DiamondCodegen ( )

Definition at line 896 of file GroupByAndAggregate.cpp.

References LL_BUILDER.

896  {
898  LL_BUILDER.CreateBr(parent_->cond_false_);
899  } else if (chain_to_next_) {
900  LL_BUILDER.CreateBr(cond_false_);
901  }
903  LL_BUILDER.SetInsertPoint(orig_cond_false_);
904  }
905 }
#define LL_BUILDER

Member Function Documentation

void GroupByAndAggregate::DiamondCodegen::setChainToNext ( )

Definition at line 886 of file GroupByAndAggregate.cpp.

References CHECK().

886  {
887  CHECK(!parent_);
888  chain_to_next_ = true;
889 }
CHECK(cgen_state)

+ Here is the call graph for this function:

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

Definition at line 891 of file GroupByAndAggregate.cpp.

References CHECK().

Referenced by Executor::groupByColumnCodegen().

891  {
893  cond_false_ = cond_false;
894 }
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool GroupByAndAggregate::DiamondCodegen::chain_to_next_

Definition at line 169 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().

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

Definition at line 167 of file GroupByAndAggregate.h.

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

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

Definition at line 166 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().

Executor* GroupByAndAggregate::DiamondCodegen::executor_

Definition at line 165 of file GroupByAndAggregate.h.

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

Definition at line 168 of file GroupByAndAggregate.h.

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

DiamondCodegen* GroupByAndAggregate::DiamondCodegen::parent_

Definition at line 170 of file GroupByAndAggregate.h.

Referenced by DiamondCodegen().


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