Small cleanup: allocate storage for the full mask in the FunctionEmitContext constructor

This commit is contained in:
Matt Pharr
2011-12-10 13:33:28 -08:00
parent 034507a35b
commit f6605ee465
3 changed files with 13 additions and 11 deletions

11
ctx.cpp
View File

@@ -171,8 +171,11 @@ FunctionEmitContext::FunctionEmitContext(Function *func, Symbol *funSym,
internalMaskPointer = AllocaInst(LLVMTypes::MaskType, "internal_mask_memory");
StoreInst(LLVMMaskAllOn, internalMaskPointer);
functionMaskValue = LLVMMaskAllOn;
fullMaskPointer = NULL;
fullMaskPointer = AllocaInst(LLVMTypes::MaskType, "full_mask_memory");
StoreInst(LLVMMaskAllOn, fullMaskPointer);
loopMask = NULL;
breakLanesPtr = continueLanesPtr = NULL;
@@ -286,9 +289,9 @@ FunctionEmitContext::GetFullMask() {
}
void
FunctionEmitContext::SetMaskPointer(llvm::Value *p) {
fullMaskPointer = p;
llvm::Value *
FunctionEmitContext::GetFullMaskPointer() {
return fullMaskPointer;
}