Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 5710e27

Browse files
authored
Merge branch 'master' into feature/clangformat_hunks
2 parents c4a8b4e + cbf4b89 commit 5710e27

36 files changed

+633
-777
lines changed

src/catalog/manager.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@
2121
namespace peloton {
2222
namespace catalog {
2323

24-
std::shared_ptr<storage::TileGroup> Manager::empty_tile_group_;
25-
2624
std::shared_ptr<storage::IndirectionArray> Manager::empty_indirection_array_;
2725

28-
Manager::Manager() : tile_group_locator_(DEFAULT_LOCATOR_SIZE) {}
29-
3026
Manager &Manager::GetInstance() {
3127
static Manager manager;
3228
return manager;
@@ -36,28 +32,6 @@ Manager &Manager::GetInstance() {
3632
// OBJECT MAP
3733
//===--------------------------------------------------------------------===//
3834

39-
void Manager::AddTileGroup(const oid_t oid,
40-
std::shared_ptr<storage::TileGroup> location) {
41-
// add/update the catalog reference to the tile group
42-
tile_group_locator_.Upsert(oid, location);
43-
}
44-
45-
void Manager::DropTileGroup(const oid_t oid) {
46-
// drop the catalog reference to the tile group
47-
tile_group_locator_.Erase(oid);
48-
}
49-
50-
std::shared_ptr<storage::TileGroup> Manager::GetTileGroup(const oid_t oid) {
51-
std::shared_ptr<storage::TileGroup> location;
52-
if (tile_group_locator_.Find(oid, location)) {
53-
return location;
54-
}
55-
return empty_tile_group_;
56-
}
57-
58-
// used for logging test
59-
void Manager::ClearTileGroup() { tile_group_locator_.Clear(); }
60-
6135
void Manager::AddIndirectionArray(
6236
const oid_t oid, std::shared_ptr<storage::IndirectionArray> location) {
6337
// add/update the catalog reference to the indirection array

src/codegen/codegen.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,19 @@ llvm::Value *CodeGen::AllocateVariable(llvm::Type *type,
9191
// matter where we insert it.
9292

9393
auto *entry_block = code_context_.GetCurrentFunction()->GetEntryBlock();
94+
#if LLVM_VERSION_GE(5, 0)
95+
if (entry_block->empty()) {
96+
return new llvm::AllocaInst(type, 0, name, entry_block);
97+
} else {
98+
return new llvm::AllocaInst(type, 0, name, &entry_block->front());
99+
}
100+
#else
94101
if (entry_block->empty()) {
95102
return new llvm::AllocaInst(type, name, entry_block);
96103
} else {
97104
return new llvm::AllocaInst(type, name, &entry_block->front());
98105
}
106+
#endif
99107
}
100108

101109
llvm::Value *CodeGen::AllocateBuffer(llvm::Type *element_type,

src/codegen/function_builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ FunctionBuilder::~FunctionBuilder() {
143143
// Here, we just need to iterate over the arguments in the function to find a
144144
// match. The names of the arguments were provided and set at construction time.
145145
llvm::Value *FunctionBuilder::GetArgumentByName(std::string name) {
146-
for (auto &arg : func_->getArgumentList()) {
146+
for (auto &arg : func_->args()) {
147147
if (arg.getName().equals(name)) {
148148
return &arg;
149149
}

src/codegen/transaction_runtime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ uint32_t TransactionRuntime::PerformVectorizedRead(
5656
ItemPointer location{tile_group_idx, selection_vector[idx]};
5757

5858
// Perform the read
59-
bool can_read = txn_manager.PerformRead(&txn, location);
59+
bool can_read = txn_manager.PerformRead(&txn, location, tile_group_header, false);
6060

6161
// Update the selection vector and output position
6262
selection_vector[out_idx] = selection_vector[idx];

0 commit comments

Comments
 (0)