Abstract llvm::Value usage.

Bug swiftshader:10

Change-Id: Ide80a6d97f67ae04d9118307984235f8f4c2e3ad
Reviewed-on: https://swiftshader-review.googlesource.com/7277
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Reactor/Nucleus.cpp b/src/Reactor/Nucleus.cpp
index ee854e4..b7cbfbe 100644
--- a/src/Reactor/Nucleus.cpp
+++ b/src/Reactor/Nucleus.cpp
@@ -76,6 +76,7 @@
 	Optimization optimization[10] = {InstructionCombining, Disabled};
 
 	class Type : public llvm::Type {};
+	class Value : public llvm::Value {};
 	class Constant : public llvm::Constant {};
 	class BasicBlock : public llvm::BasicBlock {};
 
@@ -84,6 +85,11 @@
 		return reinterpret_cast<Type*>(t);
 	}
 
+	inline Value *V(llvm::Value *t)
+	{
+		return reinterpret_cast<Value*>(t);
+	}
+
 	inline std::vector<llvm::Type*> &T(std::vector<Type*> &t)
 	{
 		return reinterpret_cast<std::vector<llvm::Type*>&>(t);
@@ -175,7 +181,7 @@
 			}
 			else
 			{
-				createRet(UndefValue::get(type));
+				createRet(V(UndefValue::get(type)));
 			}
 		}
 
@@ -265,7 +271,7 @@
 
 		entryBlock.getInstList().push_front(declaration);
 
-		return declaration;
+		return V(declaration);
 	}
 
 	BasicBlock *Nucleus::createBasicBlock()
@@ -298,7 +304,7 @@
 		::builder->SetInsertPoint(BasicBlock::Create(*::context, "", ::function));
 	}
 
-	llvm::Value *Nucleus::getArgument(unsigned int index)
+	Value *Nucleus::getArgument(unsigned int index)
 	{
 		llvm::Function::arg_iterator args = ::function->arg_begin();
 
@@ -308,401 +314,401 @@
 			index--;
 		}
 
-		return &*args;
+		return V(&*args);
 	}
 
 	Value *Nucleus::createRetVoid()
 	{
 		x86::emms();
 
-		return ::builder->CreateRetVoid();
+		return V(::builder->CreateRetVoid());
 	}
 
-	Value *Nucleus::createRet(Value *V)
+	Value *Nucleus::createRet(Value *v)
 	{
 		x86::emms();
 
-		return ::builder->CreateRet(V);
+		return V(::builder->CreateRet(v));
 	}
 
 	Value *Nucleus::createBr(BasicBlock *dest)
 	{
-		return ::builder->CreateBr(dest);
+		return V(::builder->CreateBr(dest));
 	}
 
 	Value *Nucleus::createCondBr(Value *cond, BasicBlock *ifTrue, BasicBlock *ifFalse)
 	{
-		return ::builder->CreateCondBr(cond, ifTrue, ifFalse);
+		return V(::builder->CreateCondBr(cond, ifTrue, ifFalse));
 	}
 
 	Value *Nucleus::createAdd(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateAdd(lhs, rhs);
+		return V(::builder->CreateAdd(lhs, rhs));
 	}
 
 	Value *Nucleus::createSub(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateSub(lhs, rhs);
+		return V(::builder->CreateSub(lhs, rhs));
 	}
 
 	Value *Nucleus::createMul(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateMul(lhs, rhs);
+		return V(::builder->CreateMul(lhs, rhs));
 	}
 
 	Value *Nucleus::createUDiv(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateUDiv(lhs, rhs);
+		return V(::builder->CreateUDiv(lhs, rhs));
 	}
 
 	Value *Nucleus::createSDiv(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateSDiv(lhs, rhs);
+		return V(::builder->CreateSDiv(lhs, rhs));
 	}
 
 	Value *Nucleus::createFAdd(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFAdd(lhs, rhs);
+		return V(::builder->CreateFAdd(lhs, rhs));
 	}
 
 	Value *Nucleus::createFSub(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFSub(lhs, rhs);
+		return V(::builder->CreateFSub(lhs, rhs));
 	}
 
 	Value *Nucleus::createFMul(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFMul(lhs, rhs);
+		return V(::builder->CreateFMul(lhs, rhs));
 	}
 
 	Value *Nucleus::createFDiv(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFDiv(lhs, rhs);
+		return V(::builder->CreateFDiv(lhs, rhs));
 	}
 
 	Value *Nucleus::createURem(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateURem(lhs, rhs);
+		return V(::builder->CreateURem(lhs, rhs));
 	}
 
 	Value *Nucleus::createSRem(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateSRem(lhs, rhs);
+		return V(::builder->CreateSRem(lhs, rhs));
 	}
 
 	Value *Nucleus::createFRem(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFRem(lhs, rhs);
+		return V(::builder->CreateFRem(lhs, rhs));
 	}
 
 	Value *Nucleus::createShl(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateShl(lhs, rhs);
+		return V(::builder->CreateShl(lhs, rhs));
 	}
 
 	Value *Nucleus::createLShr(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateLShr(lhs, rhs);
+		return V(::builder->CreateLShr(lhs, rhs));
 	}
 
 	Value *Nucleus::createAShr(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateAShr(lhs, rhs);
+		return V(::builder->CreateAShr(lhs, rhs));
 	}
 
 	Value *Nucleus::createAnd(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateAnd(lhs, rhs);
+		return V(::builder->CreateAnd(lhs, rhs));
 	}
 
 	Value *Nucleus::createOr(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateOr(lhs, rhs);
+		return V(::builder->CreateOr(lhs, rhs));
 	}
 
 	Value *Nucleus::createXor(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateXor(lhs, rhs);
+		return V(::builder->CreateXor(lhs, rhs));
 	}
 
-	Value *Nucleus::createNeg(Value *V)
+	Value *Nucleus::createNeg(Value *v)
 	{
-		return ::builder->CreateNeg(V);
+		return V(::builder->CreateNeg(v));
 	}
 
-	Value *Nucleus::createFNeg(Value *V)
+	Value *Nucleus::createFNeg(Value *v)
 	{
-		return ::builder->CreateFNeg(V);
+		return V(::builder->CreateFNeg(v));
 	}
 
-	Value *Nucleus::createNot(Value *V)
+	Value *Nucleus::createNot(Value *v)
 	{
-		return ::builder->CreateNot(V);
+		return V(::builder->CreateNot(v));
 	}
 
 	Value *Nucleus::createLoad(Value *ptr, bool isVolatile, unsigned int align)
 	{
-		return ::builder->Insert(new LoadInst(ptr, "", isVolatile, align));
+		return V(::builder->Insert(new LoadInst(ptr, "", isVolatile, align)));
 	}
 
 	Value *Nucleus::createStore(Value *value, Value *ptr, bool isVolatile, unsigned int align)
 	{
-		return ::builder->Insert(new StoreInst(value, ptr, isVolatile, align));
+		return V(::builder->Insert(new StoreInst(value, ptr, isVolatile, align)));
 	}
 
 	Value *Nucleus::createStore(Constant *constant, Value *ptr, bool isVolatile, unsigned int align)
 	{
-		return ::builder->Insert(new StoreInst(constant, ptr, isVolatile, align));
+		return V(::builder->Insert(new StoreInst(constant, ptr, isVolatile, align)));
 	}
 
 	Value *Nucleus::createGEP(Value *ptr, Value *index)
 	{
-		return ::builder->CreateGEP(ptr, index);
+		return V(::builder->CreateGEP(ptr, index));
 	}
 
 	Value *Nucleus::createAtomicAdd(Value *ptr, Value *value)
 	{
-		return ::builder->CreateAtomicRMW(AtomicRMWInst::Add, ptr, value, SequentiallyConsistent);
+		return V(::builder->CreateAtomicRMW(AtomicRMWInst::Add, ptr, value, SequentiallyConsistent));
 	}
 
-	Value *Nucleus::createTrunc(Value *V, Type *destType)
+	Value *Nucleus::createTrunc(Value *v, Type *destType)
 	{
-		return ::builder->CreateTrunc(V, destType);
+		return V(::builder->CreateTrunc(v, destType));
 	}
 
-	Value *Nucleus::createZExt(Value *V, Type *destType)
+	Value *Nucleus::createZExt(Value *v, Type *destType)
 	{
-		return ::builder->CreateZExt(V, destType);
+		return V(::builder->CreateZExt(v, destType));
 	}
 
-	Value *Nucleus::createSExt(Value *V, Type *destType)
+	Value *Nucleus::createSExt(Value *v, Type *destType)
 	{
-		return ::builder->CreateSExt(V, destType);
+		return V(::builder->CreateSExt(v, destType));
 	}
 
-	Value *Nucleus::createFPToSI(Value *V, Type *destType)
+	Value *Nucleus::createFPToSI(Value *v, Type *destType)
 	{
-		return ::builder->CreateFPToSI(V, destType);
+		return V(::builder->CreateFPToSI(v, destType));
 	}
 
-	Value *Nucleus::createUIToFP(Value *V, Type *destType)
+	Value *Nucleus::createUIToFP(Value *v, Type *destType)
 	{
-		return ::builder->CreateUIToFP(V, destType);
+		return V(::builder->CreateUIToFP(v, destType));
 	}
 
-	Value *Nucleus::createSIToFP(Value *V, Type *destType)
+	Value *Nucleus::createSIToFP(Value *v, Type *destType)
 	{
-		return ::builder->CreateSIToFP(V, destType);
+		return V(::builder->CreateSIToFP(v, destType));
 	}
 
-	Value *Nucleus::createFPTrunc(Value *V, Type *destType)
+	Value *Nucleus::createFPTrunc(Value *v, Type *destType)
 	{
-		return ::builder->CreateFPTrunc(V, destType);
+		return V(::builder->CreateFPTrunc(v, destType));
 	}
 
-	Value *Nucleus::createFPExt(Value *V, Type *destType)
+	Value *Nucleus::createFPExt(Value *v, Type *destType)
 	{
-		return ::builder->CreateFPExt(V, destType);
+		return V(::builder->CreateFPExt(v, destType));
 	}
 
-	Value *Nucleus::createPtrToInt(Value *V, Type *destType)
+	Value *Nucleus::createPtrToInt(Value *v, Type *destType)
 	{
-		return ::builder->CreatePtrToInt(V, destType);
+		return V(::builder->CreatePtrToInt(v, destType));
 	}
 
-	Value *Nucleus::createIntToPtr(Value *V, Type *destType)
+	Value *Nucleus::createIntToPtr(Value *v, Type *destType)
 	{
-		return ::builder->CreateIntToPtr(V, destType);
+		return V(::builder->CreateIntToPtr(v, destType));
 	}
 
-	Value *Nucleus::createBitCast(Value *V, Type *destType)
+	Value *Nucleus::createBitCast(Value *v, Type *destType)
 	{
-		return ::builder->CreateBitCast(V, destType);
+		return V(::builder->CreateBitCast(v, destType));
 	}
 
-	Value *Nucleus::createIntCast(Value *V, Type *destType, bool isSigned)
+	Value *Nucleus::createIntCast(Value *v, Type *destType, bool isSigned)
 	{
-		return ::builder->CreateIntCast(V, destType, isSigned);
+		return V(::builder->CreateIntCast(v, destType, isSigned));
 	}
 
 	Value *Nucleus::createICmpEQ(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpEQ(lhs, rhs);
+		return V(::builder->CreateICmpEQ(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpNE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpNE(lhs, rhs);
+		return V(::builder->CreateICmpNE(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpUGT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpUGT(lhs, rhs);
+		return V(::builder->CreateICmpUGT(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpUGE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpUGE(lhs, rhs);
+		return V(::builder->CreateICmpUGE(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpULT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpULT(lhs, rhs);
+		return V(::builder->CreateICmpULT(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpULE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpULE(lhs, rhs);
+		return V(::builder->CreateICmpULE(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpSGT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpSGT(lhs, rhs);
+		return V(::builder->CreateICmpSGT(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpSGE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpSGE(lhs, rhs);
+		return V(::builder->CreateICmpSGE(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpSLT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpSLT(lhs, rhs);
+		return V(::builder->CreateICmpSLT(lhs, rhs));
 	}
 
 	Value *Nucleus::createICmpSLE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateICmpSLE(lhs, rhs);
+		return V(::builder->CreateICmpSLE(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpOEQ(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpOEQ(lhs, rhs);
+		return V(::builder->CreateFCmpOEQ(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpOGT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpOGT(lhs, rhs);
+		return V(::builder->CreateFCmpOGT(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpOGE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpOGE(lhs, rhs);
+		return V(::builder->CreateFCmpOGE(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpOLT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpOLT(lhs, rhs);
+		return V(::builder->CreateFCmpOLT(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpOLE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpOLE(lhs, rhs);
+		return V(::builder->CreateFCmpOLE(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpONE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpONE(lhs, rhs);
+		return V(::builder->CreateFCmpONE(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpORD(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpORD(lhs, rhs);
+		return V(::builder->CreateFCmpORD(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpUNO(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpUNO(lhs, rhs);
+		return V(::builder->CreateFCmpUNO(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpUEQ(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpUEQ(lhs, rhs);
+		return V(::builder->CreateFCmpUEQ(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpUGT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpUGT(lhs, rhs);
+		return V(::builder->CreateFCmpUGT(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpUGE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpUGE(lhs, rhs);
+		return V(::builder->CreateFCmpUGE(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpULT(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpULT(lhs, rhs);
+		return V(::builder->CreateFCmpULT(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpULE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpULE(lhs, rhs);
+		return V(::builder->CreateFCmpULE(lhs, rhs));
 	}
 
 	Value *Nucleus::createFCmpUNE(Value *lhs, Value *rhs)
 	{
-		return ::builder->CreateFCmpULE(lhs, rhs);
+		return V(::builder->CreateFCmpULE(lhs, rhs));
 	}
 
 	Value *Nucleus::createCall(Value *callee)
 	{
-		return ::builder->CreateCall(callee);
+		return V(::builder->CreateCall(callee));
 	}
 
 	Value *Nucleus::createCall(Value *callee, Value *arg)
 	{
-		return ::builder->CreateCall(callee, arg);
+		return V(::builder->CreateCall(callee, arg));
 	}
 
 	Value *Nucleus::createCall(Value *callee, Value *arg1, Value *arg2)
 	{
-		return ::builder->CreateCall2(callee, arg1, arg2);
+		return V(::builder->CreateCall2(callee, arg1, arg2));
 	}
 
 	Value *Nucleus::createCall(Value *callee, Value *arg1, Value *arg2, Value *arg3)
 	{
-		return ::builder->CreateCall3(callee, arg1, arg2, arg3);
+		return V(::builder->CreateCall3(callee, arg1, arg2, arg3));
 	}
 
 	Value *Nucleus::createCall(Value *callee, Value *arg1, Value *arg2, Value *arg3, Value *arg4)
 	{
-		return ::builder->CreateCall4(callee, arg1, arg2, arg3, arg4);
+		return V(::builder->CreateCall4(callee, arg1, arg2, arg3, arg4));
 	}
 
 	Value *Nucleus::createExtractElement(Value *vector, int index)
 	{
-		return ::builder->CreateExtractElement(vector, createConstantInt(index));
+		return V(::builder->CreateExtractElement(vector, createConstantInt(index)));
 	}
 
 	Value *Nucleus::createInsertElement(Value *vector, Value *element, int index)
 	{
-		return ::builder->CreateInsertElement(vector, element, createConstantInt(index));
+		return V(::builder->CreateInsertElement(vector, element, createConstantInt(index)));
 	}
 
 	Value *Nucleus::createShuffleVector(Value *V1, Value *V2, Value *mask)
 	{
-		return ::builder->CreateShuffleVector(V1, V2, mask);
+		return V(::builder->CreateShuffleVector(V1, V2, mask));
 	}
 
 	Value *Nucleus::createSelect(Value *C, Value *ifTrue, Value *ifFalse)
 	{
-		return ::builder->CreateSelect(C, ifTrue, ifFalse);
+		return V(::builder->CreateSelect(C, ifTrue, ifFalse));
 	}
 
-	Value *Nucleus::createSwitch(llvm::Value *V, BasicBlock *Dest, unsigned NumCases)
+	Value *Nucleus::createSwitch(Value *v, BasicBlock *Dest, unsigned NumCases)
 	{
-		return ::builder->CreateSwitch(V, Dest, NumCases);
+		return V(::builder->CreateSwitch(v, Dest, NumCases));
 	}
 
-	void Nucleus::addSwitchCase(llvm::Value *Switch, int Case, BasicBlock *Branch)
+	void Nucleus::addSwitchCase(Value *Switch, int Case, BasicBlock *Branch)
 	{
-		static_cast<SwitchInst*>(Switch)->addCase(llvm::ConstantInt::get(Type::getInt32Ty(*::context), Case, true), Branch);
+		reinterpret_cast<SwitchInst*>(Switch)->addCase(llvm::ConstantInt::get(Type::getInt32Ty(*::context), Case, true), Branch);
 	}
 
 	Value *Nucleus::createUnreachable()
 	{
-		return ::builder->CreateUnreachable();
+		return V(::builder->CreateUnreachable());
 	}
 
 	Value *Nucleus::createSwizzle(Value *val, unsigned char select)
@@ -713,7 +719,7 @@
 		swizzle[2] = Nucleus::createConstantInt((select >> 4) & 0x03);
 		swizzle[3] = Nucleus::createConstantInt((select >> 6) & 0x03);
 
-		Value *shuffle = Nucleus::createShuffleVector(val, UndefValue::get(val->getType()), Nucleus::createConstantVector(swizzle, 4));
+		Value *shuffle = Nucleus::createShuffleVector(val, V(UndefValue::get(val->getType())), V(Nucleus::createConstantVector(swizzle, 4)));
 
 		return shuffle;
 	}
@@ -733,7 +739,7 @@
 		swizzle[2] = Nucleus::createConstantInt(mask[2] ? 6 : 2);
 		swizzle[3] = Nucleus::createConstantInt(mask[3] ? 7 : 3);
 
-		Value *shuffle = Nucleus::createShuffleVector(lhs, rhs, Nucleus::createConstantVector(swizzle, 4));
+		Value *shuffle = Nucleus::createShuffleVector(lhs, rhs, V(Nucleus::createConstantVector(swizzle, 4)));
 
 		return shuffle;
 	}
@@ -831,22 +837,22 @@
 		address = Nucleus::allocateStackVariable(type, arraySize);
 	}
 
-	llvm::Value *LValue::loadValue(unsigned int alignment) const
+	Value *LValue::loadValue(unsigned int alignment) const
 	{
 		return Nucleus::createLoad(address, false, alignment);
 	}
 
-	llvm::Value *LValue::storeValue(llvm::Value *value, unsigned int alignment) const
+	Value *LValue::storeValue(Value *value, unsigned int alignment) const
 	{
 		return Nucleus::createStore(value, address, false, alignment);
 	}
 
-	llvm::Value *LValue::storeValue(Constant *constant, unsigned int alignment) const
+	Value *LValue::storeValue(Constant *constant, unsigned int alignment) const
 	{
 		return Nucleus::createStore(constant, address, false, alignment);
 	}
 
-	llvm::Value *LValue::getAddress(llvm::Value *index) const
+	Value *LValue::getAddress(Value *index) const
 	{
 		return Nucleus::createGEP(address, index);
 	}
@@ -1135,7 +1141,7 @@
 	{
 		RValue<Byte> res = val;
 
-		Value *inc = Nucleus::createAdd(res.value, Nucleus::createConstantByte((unsigned char)1));
+		Value *inc = Nucleus::createAdd(res.value, V(Nucleus::createConstantByte((unsigned char)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1143,7 +1149,7 @@
 
 	const Byte &operator++(const Byte &val)   // Pre-increment
 	{
-		Value *inc = Nucleus::createAdd(val.loadValue(), Nucleus::createConstantByte((unsigned char)1));
+		Value *inc = Nucleus::createAdd(val.loadValue(), V(Nucleus::createConstantByte((unsigned char)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1153,7 +1159,7 @@
 	{
 		RValue<Byte> res = val;
 
-		Value *inc = Nucleus::createSub(res.value, Nucleus::createConstantByte((unsigned char)1));
+		Value *inc = Nucleus::createSub(res.value, V(Nucleus::createConstantByte((unsigned char)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1161,7 +1167,7 @@
 
 	const Byte &operator--(const Byte &val)   // Pre-decrement
 	{
-		Value *inc = Nucleus::createSub(val.loadValue(), Nucleus::createConstantByte((unsigned char)1));
+		Value *inc = Nucleus::createSub(val.loadValue(), V(Nucleus::createConstantByte((unsigned char)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1389,7 +1395,7 @@
 	{
 		RValue<SByte> res = val;
 
-		Value *inc = Nucleus::createAdd(res.value, Nucleus::createConstantByte((signed char)1));
+		Value *inc = Nucleus::createAdd(res.value, V(Nucleus::createConstantByte((signed char)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1397,7 +1403,7 @@
 
 	const SByte &operator++(const SByte &val)   // Pre-increment
 	{
-		Value *inc = Nucleus::createAdd(val.loadValue(), Nucleus::createConstantByte((signed char)1));
+		Value *inc = Nucleus::createAdd(val.loadValue(), V(Nucleus::createConstantByte((signed char)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1407,7 +1413,7 @@
 	{
 		RValue<SByte> res = val;
 
-		Value *inc = Nucleus::createSub(res.value, Nucleus::createConstantByte((signed char)1));
+		Value *inc = Nucleus::createSub(res.value, V(Nucleus::createConstantByte((signed char)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1415,7 +1421,7 @@
 
 	const SByte &operator--(const SByte &val)   // Pre-decrement
 	{
-		Value *inc = Nucleus::createSub(val.loadValue(), Nucleus::createConstantByte((signed char)1));
+		Value *inc = Nucleus::createSub(val.loadValue(), V(Nucleus::createConstantByte((signed char)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1636,7 +1642,7 @@
 	{
 		RValue<Short> res = val;
 
-		Value *inc = Nucleus::createAdd(res.value, Nucleus::createConstantShort((short)1));
+		Value *inc = Nucleus::createAdd(res.value, V(Nucleus::createConstantShort((short)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1644,7 +1650,7 @@
 
 	const Short &operator++(const Short &val)   // Pre-increment
 	{
-		Value *inc = Nucleus::createAdd(val.loadValue(), Nucleus::createConstantShort((short)1));
+		Value *inc = Nucleus::createAdd(val.loadValue(), V(Nucleus::createConstantShort((short)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1654,7 +1660,7 @@
 	{
 		RValue<Short> res = val;
 
-		Value *inc = Nucleus::createSub(res.value, Nucleus::createConstantShort((short)1));
+		Value *inc = Nucleus::createSub(res.value, V(Nucleus::createConstantShort((short)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1662,7 +1668,7 @@
 
 	const Short &operator--(const Short &val)   // Pre-decrement
 	{
-		Value *inc = Nucleus::createSub(val.loadValue(), Nucleus::createConstantShort((short)1));
+		Value *inc = Nucleus::createSub(val.loadValue(), V(Nucleus::createConstantShort((short)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1890,7 +1896,7 @@
 	{
 		RValue<UShort> res = val;
 
-		Value *inc = Nucleus::createAdd(res.value, Nucleus::createConstantShort((unsigned short)1));
+		Value *inc = Nucleus::createAdd(res.value, V(Nucleus::createConstantShort((unsigned short)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1898,7 +1904,7 @@
 
 	const UShort &operator++(const UShort &val)   // Pre-increment
 	{
-		Value *inc = Nucleus::createAdd(val.loadValue(), Nucleus::createConstantShort((unsigned short)1));
+		Value *inc = Nucleus::createAdd(val.loadValue(), V(Nucleus::createConstantShort((unsigned short)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1908,7 +1914,7 @@
 	{
 		RValue<UShort> res = val;
 
-		Value *inc = Nucleus::createSub(res.value, Nucleus::createConstantShort((unsigned short)1));
+		Value *inc = Nucleus::createSub(res.value, V(Nucleus::createConstantShort((unsigned short)1)));
 		val.storeValue(inc);
 
 		return res;
@@ -1916,7 +1922,7 @@
 
 	const UShort &operator--(const UShort &val)   // Pre-decrement
 	{
-		Value *inc = Nucleus::createSub(val.loadValue(), Nucleus::createConstantShort((unsigned short)1));
+		Value *inc = Nucleus::createSub(val.loadValue(), V(Nucleus::createConstantShort((unsigned short)1)));
 		val.storeValue(inc);
 
 		return val;
@@ -1993,7 +1999,7 @@
 		constantVector[5] = Nucleus::createConstantByte(x5);
 		constantVector[6] = Nucleus::createConstantByte(x6);
 		constantVector[7] = Nucleus::createConstantByte(x7);
-		Value *vector = Nucleus::createConstantVector(constantVector, 8);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 8));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -2011,7 +2017,7 @@
 		constantVector[5] = Nucleus::createConstantByte((unsigned char)(x >> 40));
 		constantVector[6] = Nucleus::createConstantByte((unsigned char)(x >> 48));
 		constantVector[7] = Nucleus::createConstantByte((unsigned char)(x >> 56));
-		Value *vector = Nucleus::createConstantVector(constantVector, 8);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 8));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -2231,7 +2237,7 @@
 
 	RValue<Short4> Unpack(RValue<Byte4> x)
 	{
-		Value *int2 = Nucleus::createInsertElement(UndefValue::get(VectorType::get(Int::getType(), 2)), x.value, 0);
+		Value *int2 = Nucleus::createInsertElement(V(UndefValue::get(VectorType::get(Int::getType(), 2))), x.value, 0);
 		Value *byte8 = Nucleus::createBitCast(int2, Byte8::getType());
 
 		return UnpackLow(RValue<Byte8>(byte8), RValue<Byte8>(byte8));
@@ -2255,7 +2261,7 @@
 			shuffle[6] = Nucleus::createConstantInt(3);
 			shuffle[7] = Nucleus::createConstantInt(11);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 8));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 8)));
 
 			return RValue<Short4>(Nucleus::createBitCast(packed, Short4::getType()));
 		}
@@ -2279,7 +2285,7 @@
 			shuffle[6] = Nucleus::createConstantInt(7);
 			shuffle[7] = Nucleus::createConstantInt(15);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 8));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 8)));
 
 			return RValue<Short4>(Nucleus::createBitCast(packed, Short4::getType()));
 		}
@@ -2330,7 +2336,7 @@
 		constantVector[5] = Nucleus::createConstantByte(x5);
 		constantVector[6] = Nucleus::createConstantByte(x6);
 		constantVector[7] = Nucleus::createConstantByte(x7);
-		Value *vector = Nucleus::createConstantVector(constantVector, 8);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 8));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -2348,7 +2354,7 @@
 		constantVector[5] = Nucleus::createConstantByte((unsigned char)(x >> 40));
 		constantVector[6] = Nucleus::createConstantByte((unsigned char)(x >> 48));
 		constantVector[7] = Nucleus::createConstantByte((unsigned char)(x >> 56));
-		Value *vector = Nucleus::createConstantVector(constantVector, 8);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 8));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -2563,7 +2569,7 @@
 			shuffle[6] = Nucleus::createConstantInt(3);
 			shuffle[7] = Nucleus::createConstantInt(11);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 8));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 8)));
 
 			return RValue<Short4>(Nucleus::createBitCast(packed, Short4::getType()));
 		}
@@ -2587,7 +2593,7 @@
 			shuffle[6] = Nucleus::createConstantInt(7);
 			shuffle[7] = Nucleus::createConstantInt(15);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 8));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 8)));
 
 			return RValue<Short4>(Nucleus::createBitCast(packed, Short4::getType()));
 		}
@@ -2722,8 +2728,8 @@
 				pshufhw[6] = Nucleus::createConstantInt(4);
 				pshufhw[7] = Nucleus::createConstantInt(6);
 
-				Value *shuffle1 = Nucleus::createShuffleVector(short8, UndefValue::get(Short8::getType()), Nucleus::createConstantVector(pshuflw, 8));
-				Value *shuffle2 = Nucleus::createShuffleVector(shuffle1, UndefValue::get(Short8::getType()), Nucleus::createConstantVector(pshufhw, 8));
+				Value *shuffle1 = Nucleus::createShuffleVector(short8, V(UndefValue::get(Short8::getType())), V(Nucleus::createConstantVector(pshuflw, 8)));
+				Value *shuffle2 = Nucleus::createShuffleVector(shuffle1, V(UndefValue::get(Short8::getType())), V(Nucleus::createConstantVector(pshufhw, 8)));
 				Value *int4 = Nucleus::createBitCast(shuffle2, Int4::getType());
 				packed = Nucleus::createSwizzle(int4, 0x88);
 			}
@@ -2748,7 +2754,7 @@
 				pshufb[15] = Nucleus::createConstantInt(13);
 
 				Value *byte16 = Nucleus::createBitCast(cast.value, Byte16::getType());
-				packed = Nucleus::createShuffleVector(byte16, UndefValue::get(Byte16::getType()), Nucleus::createConstantVector(pshufb, 16));
+				packed = Nucleus::createShuffleVector(byte16, V(UndefValue::get(Byte16::getType())), V(Nucleus::createConstantVector(pshufb, 16)));
 			}
 
 			#if 0   // FIXME: No optimal instruction selection
@@ -2790,7 +2796,7 @@
 		constantVector[1] = Nucleus::createConstantShort(xyzw);
 		constantVector[2] = Nucleus::createConstantShort(xyzw);
 		constantVector[3] = Nucleus::createConstantShort(xyzw);
-		Value *vector = Nucleus::createConstantVector(constantVector, 4);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 4));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -2804,7 +2810,7 @@
 		constantVector[1] = Nucleus::createConstantShort(y);
 		constantVector[2] = Nucleus::createConstantShort(z);
 		constantVector[3] = Nucleus::createConstantShort(w);
-		Value *vector = Nucleus::createConstantVector(constantVector, 4);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 4));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -3155,7 +3161,7 @@
 			shuffle[2] = Nucleus::createConstantInt(1);
 			shuffle[3] = Nucleus::createConstantInt(5);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 4));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 4)));
 
 			return RValue<Int2>(Nucleus::createBitCast(packed, Int2::getType()));
 		}
@@ -3175,7 +3181,7 @@
 			shuffle[2] = Nucleus::createConstantInt(3);
 			shuffle[3] = Nucleus::createConstantInt(7);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 4));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 4)));
 
 			return RValue<Int2>(Nucleus::createBitCast(packed, Int2::getType()));
 		}
@@ -3290,7 +3296,7 @@
 		constantVector[1] = Nucleus::createConstantShort(xyzw);
 		constantVector[2] = Nucleus::createConstantShort(xyzw);
 		constantVector[3] = Nucleus::createConstantShort(xyzw);
-		Value *vector = Nucleus::createConstantVector(constantVector, 4);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 4));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -3304,7 +3310,7 @@
 		constantVector[1] = Nucleus::createConstantShort(y);
 		constantVector[2] = Nucleus::createConstantShort(z);
 		constantVector[3] = Nucleus::createConstantShort(w);
-		Value *vector = Nucleus::createConstantVector(constantVector, 4);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 4));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -3581,7 +3587,7 @@
 		Value *loLong = Nucleus::createBitCast(lo.value, Long::getType());
 		Value *hiLong = Nucleus::createBitCast(hi.value, Long::getType());
 
-		Value *long2 = UndefValue::get(Long2::getType());
+		Value *long2 = V(UndefValue::get(Long2::getType()));
 		long2 = Nucleus::createInsertElement(long2, loLong, 0);
 		long2 = Nucleus::createInsertElement(long2, hiLong, 1);
 		Value *short8 = Nucleus::createBitCast(long2, Short8::getType());
@@ -3674,7 +3680,7 @@
 		Value *loLong = Nucleus::createBitCast(lo.value, Long::getType());
 		Value *hiLong = Nucleus::createBitCast(hi.value, Long::getType());
 
-		Value *long2 = UndefValue::get(Long2::getType());
+		Value *long2 = V(UndefValue::get(Long2::getType()));
 		long2 = Nucleus::createInsertElement(long2, loLong, 0);
 		long2 = Nucleus::createInsertElement(long2, hiLong, 1);
 		Value *short8 = Nucleus::createBitCast(long2, Short8::getType());
@@ -3761,7 +3767,7 @@
 		pshufb[15] = Nucleus::createConstantInt(select7 + 1);
 
 		Value *byte16 = Nucleus::createBitCast(x.value, Byte16::getType());
-		Value *shuffle = Nucleus::createShuffleVector(byte16, UndefValue::get(Byte16::getType()), Nucleus::createConstantVector(pshufb, 16));
+		Value *shuffle = Nucleus::createShuffleVector(byte16, V(UndefValue::get(Byte16::getType())), V(Nucleus::createConstantVector(pshufb, 16)));
 		Value *short8 = Nucleus::createBitCast(shuffle, UShort8::getType());
 
 		return RValue<UShort8>(short8);
@@ -4069,7 +4075,7 @@
 	{
 		RValue<Int> res = val;
 
-		Value *inc = Nucleus::createAdd(res.value, Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createAdd(res.value, V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return res;
@@ -4077,7 +4083,7 @@
 
 	const Int &operator++(const Int &val)   // Pre-increment
 	{
-		Value *inc = Nucleus::createAdd(val.loadValue(), Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createAdd(val.loadValue(), V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return val;
@@ -4087,7 +4093,7 @@
 	{
 		RValue<Int> res = val;
 
-		Value *inc = Nucleus::createSub(res.value, Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createSub(res.value, V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return res;
@@ -4095,7 +4101,7 @@
 
 	const Int &operator--(const Int &val)   // Pre-decrement
 	{
-		Value *inc = Nucleus::createSub(val.loadValue(), Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createSub(val.loadValue(), V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return val;
@@ -4241,8 +4247,8 @@
 
 	Long1::Long1(const RValue<UInt> cast)
 	{
-		Value *undefCast = Nucleus::createInsertElement(UndefValue::get(VectorType::get(Int::getType(), 2)), cast.value, 0);
-		Value *zeroCast = Nucleus::createInsertElement(undefCast, Nucleus::createConstantInt(0), 1);
+		Value *undefCast = Nucleus::createInsertElement(V(UndefValue::get(VectorType::get(Int::getType(), 2))), cast.value, 0);
+		Value *zeroCast = Nucleus::createInsertElement(undefCast, V(Nucleus::createConstantInt(0)), 1);
 
 		storeValue(Nucleus::createBitCast(zeroCast, Long1::getType()));
 	}
@@ -4270,7 +4276,7 @@
 		shuffle[0] = Nucleus::createConstantInt(1);
 		shuffle[1] = Nucleus::createConstantInt(3);
 
-		Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 2));
+		Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 2)));
 
 		return RValue<Long2>(packed);
 	}
@@ -4536,7 +4542,7 @@
 	{
 		RValue<UInt> res = val;
 
-		Value *inc = Nucleus::createAdd(res.value, Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createAdd(res.value, V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return res;
@@ -4544,7 +4550,7 @@
 
 	const UInt &operator++(const UInt &val)   // Pre-increment
 	{
-		Value *inc = Nucleus::createAdd(val.loadValue(), Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createAdd(val.loadValue(), V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return val;
@@ -4554,7 +4560,7 @@
 	{
 		RValue<UInt> res = val;
 
-		Value *inc = Nucleus::createSub(res.value, Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createSub(res.value, V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return res;
@@ -4562,7 +4568,7 @@
 
 	const UInt &operator--(const UInt &val)   // Pre-decrement
 	{
-		Value *inc = Nucleus::createSub(val.loadValue(), Nucleus::createConstantInt(1));
+		Value *inc = Nucleus::createSub(val.loadValue(), V(Nucleus::createConstantInt(1)));
 		val.storeValue(inc);
 
 		return val;
@@ -4660,7 +4666,7 @@
 		Constant *constantVector[2];
 		constantVector[0] = Nucleus::createConstantInt(x);
 		constantVector[1] = Nucleus::createConstantInt(y);
-		Value *vector = Nucleus::createConstantVector(constantVector, 2);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 2));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -4703,7 +4709,7 @@
 			shuffle[0] = Nucleus::createConstantInt(0);
 			shuffle[1] = Nucleus::createConstantInt(1);
 
-			Value *packed = Nucleus::createShuffleVector(Nucleus::createBitCast(lo.value, T(VectorType::get(Int::getType(), 1))), Nucleus::createBitCast(hi.value, T(VectorType::get(Int::getType(), 1))), Nucleus::createConstantVector(shuffle, 2));
+			Value *packed = Nucleus::createShuffleVector(Nucleus::createBitCast(lo.value, T(VectorType::get(Int::getType(), 1))), Nucleus::createBitCast(hi.value, T(VectorType::get(Int::getType(), 1))), V(Nucleus::createConstantVector(shuffle, 2)));
 
 			storeValue(Nucleus::createBitCast(packed, Int2::getType()));
 		}
@@ -4929,7 +4935,7 @@
 			shuffle[0] = Nucleus::createConstantInt(0);
 			shuffle[1] = Nucleus::createConstantInt(2);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 2));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 2)));
 
 			return RValue<Long1>(Nucleus::createBitCast(packed, Long1::getType()));
 		}
@@ -4947,7 +4953,7 @@
 			shuffle[0] = Nucleus::createConstantInt(1);
 			shuffle[1] = Nucleus::createConstantInt(3);
 
-			Value *packed = Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 2));
+			Value *packed = Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 2)));
 
 			return RValue<Long1>(Nucleus::createBitCast(packed, Long1::getType()));
 		}
@@ -5003,7 +5009,7 @@
 		Constant *constantVector[2];
 		constantVector[0] = Nucleus::createConstantInt(x);
 		constantVector[1] = Nucleus::createConstantInt(y);
-		Value *vector = Nucleus::createConstantVector(constantVector, 2);
+		Value *vector = V(Nucleus::createConstantVector(constantVector, 2));
 
 		storeValue(Nucleus::createBitCast(vector, getType()));
 	}
@@ -5254,7 +5260,7 @@
 	Int4::Int4(RValue<Byte4> cast)
 	{
 		Value *x = Nucleus::createBitCast(cast.value, Int::getType());
-		Value *a = Nucleus::createInsertElement(UndefValue::get(Int4::getType()), x, 0);
+		Value *a = Nucleus::createInsertElement(V(UndefValue::get(Int4::getType())), x, 0);
 
 		Value *e;
 
@@ -5283,7 +5289,7 @@
 			swizzle[15] = Nucleus::createConstantInt(23);
 
 			Value *b = Nucleus::createBitCast(a, Byte16::getType());
-			Value *c = Nucleus::createShuffleVector(b, Nucleus::createNullValue(Byte16::getType()), Nucleus::createConstantVector(swizzle, 16));
+			Value *c = Nucleus::createShuffleVector(b, V(Nucleus::createNullValue(Byte16::getType())), V(Nucleus::createConstantVector(swizzle, 16)));
 
 			Constant *swizzle2[8];
 			swizzle2[0] = Nucleus::createConstantInt(0);
@@ -5296,7 +5302,7 @@
 			swizzle2[7] = Nucleus::createConstantInt(11);
 
 			Value *d = Nucleus::createBitCast(c, Short8::getType());
-			e = Nucleus::createShuffleVector(d, Nucleus::createNullValue(Short8::getType()), Nucleus::createConstantVector(swizzle2, 8));
+			e = Nucleus::createShuffleVector(d, V(Nucleus::createNullValue(Short8::getType())), V(Nucleus::createConstantVector(swizzle2, 8)));
 		}
 
 		Value *f = Nucleus::createBitCast(e, Int4::getType());
@@ -5306,7 +5312,7 @@
 	Int4::Int4(RValue<SByte4> cast)
 	{
 		Value *x = Nucleus::createBitCast(cast.value, Int::getType());
-		Value *a = Nucleus::createInsertElement(UndefValue::get(Int4::getType()), x, 0);
+		Value *a = Nucleus::createInsertElement(V(UndefValue::get(Int4::getType())), x, 0);
 
 		Value *g;
 
@@ -5335,7 +5341,7 @@
 			swizzle[15] = Nucleus::createConstantInt(7);
 
 			Value *b = Nucleus::createBitCast(a, Byte16::getType());
-			Value *c = Nucleus::createShuffleVector(b, b, Nucleus::createConstantVector(swizzle, 16));
+			Value *c = Nucleus::createShuffleVector(b, b, V(Nucleus::createConstantVector(swizzle, 16)));
 
 			Constant *swizzle2[8];
 			swizzle2[0] = Nucleus::createConstantInt(0);
@@ -5348,7 +5354,7 @@
 			swizzle2[7] = Nucleus::createConstantInt(3);
 
 			Value *d = Nucleus::createBitCast(c, Short8::getType());
-			Value *e = Nucleus::createShuffleVector(d, d, Nucleus::createConstantVector(swizzle2, 8));
+			Value *e = Nucleus::createShuffleVector(d, d, V(Nucleus::createConstantVector(swizzle2, 8)));
 
 			Value *f = Nucleus::createBitCast(e, Int4::getType());
 			//	g = Nucleus::createAShr(f, Nucleus::createConstantInt(24));
@@ -5369,7 +5375,7 @@
 
 	Int4::Int4(RValue<Short4> cast)
 	{
-		Value *long2 = UndefValue::get(Long2::getType());
+		Value *long2 = V(UndefValue::get(Long2::getType()));
 		Value *element = Nucleus::createBitCast(cast.value, Long::getType());
 		long2 = Nucleus::createInsertElement(long2, element, 0);
 		RValue<Int4> vector = RValue<Int4>(Nucleus::createBitCast(long2, Int4::getType()));
@@ -5392,7 +5398,7 @@
 			swizzle[6] = Nucleus::createConstantInt(3);
 			swizzle[7] = Nucleus::createConstantInt(3);
 
-			Value *c = Nucleus::createShuffleVector(b, b, Nucleus::createConstantVector(swizzle, 8));
+			Value *c = Nucleus::createShuffleVector(b, b, V(Nucleus::createConstantVector(swizzle, 8)));
 			Value *d = Nucleus::createBitCast(c, Int4::getType());
 			storeValue(d);
 
@@ -5406,7 +5412,7 @@
 
 	Int4::Int4(RValue<UShort4> cast)
 	{
-		Value *long2 = UndefValue::get(Long2::getType());
+		Value *long2 = V(UndefValue::get(Long2::getType()));
 		Value *element = Nucleus::createBitCast(cast.value, Long::getType());
 		long2 = Nucleus::createInsertElement(long2, element, 0);
 		RValue<Int4> vector = RValue<Int4>(Nucleus::createBitCast(long2, Int4::getType()));
@@ -5429,7 +5435,7 @@
 			swizzle[6] = Nucleus::createConstantInt(3);
 			swizzle[7] = Nucleus::createConstantInt(11);
 
-			Value *c = Nucleus::createShuffleVector(b, Nucleus::createNullValue(Short8::getType()), Nucleus::createConstantVector(swizzle, 8));
+			Value *c = Nucleus::createShuffleVector(b, V(Nucleus::createNullValue(Short8::getType())), V(Nucleus::createConstantVector(swizzle, 8)));
 			Value *d = Nucleus::createBitCast(c, Int4::getType());
 			storeValue(d);
 		}
@@ -5526,7 +5532,7 @@
 		Value *loLong = Nucleus::createBitCast(lo.value, Long::getType());
 		Value *hiLong = Nucleus::createBitCast(hi.value, Long::getType());
 
-		Value *long2 = UndefValue::get(Long2::getType());
+		Value *long2 = V(UndefValue::get(Long2::getType()));
 		long2 = Nucleus::createInsertElement(long2, loLong, 0);
 		long2 = Nucleus::createInsertElement(long2, hiLong, 1);
 		Value *int4 = Nucleus::createBitCast(long2, Int4::getType());
@@ -5547,7 +5553,7 @@
 		swizzle[2] = Nucleus::createConstantInt(0);
 		swizzle[3] = Nucleus::createConstantInt(0);
 
-		Value *replicate = Nucleus::createShuffleVector(insert, UndefValue::get(Int4::getType()), Nucleus::createConstantVector(swizzle, 4));
+		Value *replicate = Nucleus::createShuffleVector(insert, V(UndefValue::get(Int4::getType())), V(Nucleus::createConstantVector(swizzle, 4)));
 
 		storeValue(replicate);
 	}
@@ -5924,7 +5930,7 @@
 		Value *loLong = Nucleus::createBitCast(lo.value, Long::getType());
 		Value *hiLong = Nucleus::createBitCast(hi.value, Long::getType());
 
-		Value *long2 = UndefValue::get(Long2::getType());
+		Value *long2 = V(UndefValue::get(Long2::getType()));
 		long2 = Nucleus::createInsertElement(long2, loLong, 0);
 		long2 = Nucleus::createInsertElement(long2, hiLong, 1);
 		Value *uint4 = Nucleus::createBitCast(long2, Int4::getType());
@@ -6425,9 +6431,9 @@
 			Value *f32x = Nucleus::createUIToFP(i8x, Float::getType());
 			Value *x = Nucleus::createInsertElement(vector, f32x, 0);
 
-			Value *i8y = Nucleus::createExtractElement(cast.value, Nucleus::createConstantInt(1));
+			Value *i8y = Nucleus::createExtractElement(cast.value, V(Nucleus::createConstantInt(1)));
 			Value *f32y = Nucleus::createUIToFP(i8y, Float::getType());
-			Value *xy = Nucleus::createInsertElement(x, f32y, Nucleus::createConstantInt(1));
+			Value *xy = Nucleus::createInsertElement(x, f32y, V(Nucleus::createConstantInt(1)));
 
 			Value *i8z = Nucleus::createExtractElement(cast.value, Nucleus::createConstantInt(2));
 			Value *f32z = Nucleus::createUIToFP(i8z, Float::getType());
@@ -6457,9 +6463,9 @@
 			Value *f32x = Nucleus::createSIToFP(i8x, Float::getType());
 			Value *x = Nucleus::createInsertElement(vector, f32x, 0);
 
-			Value *i8y = Nucleus::createExtractElement(cast.value, Nucleus::createConstantInt(1));
+			Value *i8y = Nucleus::createExtractElement(cast.value, V(Nucleus::createConstantInt(1)));
 			Value *f32y = Nucleus::createSIToFP(i8y, Float::getType());
-			Value *xy = Nucleus::createInsertElement(x, f32y, Nucleus::createConstantInt(1));
+			Value *xy = Nucleus::createInsertElement(x, f32y, V(Nucleus::createConstantInt(1)));
 
 			Value *i8z = Nucleus::createExtractElement(cast.value, Nucleus::createConstantInt(2));
 			Value *f32z = Nucleus::createSIToFP(i8z, Float::getType());
@@ -6584,7 +6590,7 @@
 		swizzle[2] = Nucleus::createConstantInt(0);
 		swizzle[3] = Nucleus::createConstantInt(0);
 
-		Value *replicate = Nucleus::createShuffleVector(insert, UndefValue::get(Float4::getType()), Nucleus::createConstantVector(swizzle, 4));
+		Value *replicate = Nucleus::createShuffleVector(insert, V(UndefValue::get(Float4::getType())), V(Nucleus::createConstantVector(swizzle, 4)));
 
 		storeValue(replicate);
 	}
@@ -6716,7 +6722,7 @@
 		constantVector[2] = Nucleus::createConstantInt(0x7FFFFFFF);
 		constantVector[3] = Nucleus::createConstantInt(0x7FFFFFFF);
 
-		Value *result = Nucleus::createAnd(vector, Nucleus::createConstantVector(constantVector, 4));
+		Value *result = Nucleus::createAnd(vector, V(Nucleus::createConstantVector(constantVector, 4)));
 
 		return RValue<Float4>(Nucleus::createBitCast(result, Float4::getType()));
 	}
@@ -6757,8 +6763,8 @@
 
 	RValue<Float4> Insert(const Float4 &val, RValue<Float> element, int i)
 	{
-		llvm::Value *value = val.loadValue();
-		llvm::Value *insert = Nucleus::createInsertElement(value, element.value, i);
+		Value *value = val.loadValue();
+		Value *insert = Nucleus::createInsertElement(value, element.value, i);
 
 		val = RValue<Float4>(insert);
 
@@ -6783,7 +6789,7 @@
 		shuffle[2] = Nucleus::createConstantInt(((imm >> 4) & 0x03) + 4);
 		shuffle[3] = Nucleus::createConstantInt(((imm >> 6) & 0x03) + 4);
 
-		return RValue<Float4>(Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 4)));
+		return RValue<Float4>(Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 4))));
 	}
 
 	RValue<Float4> UnpackLow(RValue<Float4> x, RValue<Float4> y)
@@ -6794,7 +6800,7 @@
 		shuffle[2] = Nucleus::createConstantInt(1);
 		shuffle[3] = Nucleus::createConstantInt(5);
 
-		return RValue<Float4>(Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 4)));
+		return RValue<Float4>(Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 4))));
 	}
 
 	RValue<Float4> UnpackHigh(RValue<Float4> x, RValue<Float4> y)
@@ -6805,7 +6811,7 @@
 		shuffle[2] = Nucleus::createConstantInt(3);
 		shuffle[3] = Nucleus::createConstantInt(7);
 
-		return RValue<Float4>(Nucleus::createShuffleVector(x.value, y.value, Nucleus::createConstantVector(shuffle, 4)));
+		return RValue<Float4>(Nucleus::createShuffleVector(x.value, y.value, V(Nucleus::createConstantVector(shuffle, 4))));
 	}
 
 	RValue<Float4> Mask(Float4 &lhs, RValue<Float4> rhs, unsigned char select)
@@ -6927,7 +6933,7 @@
 
 	RValue<Pointer<Byte>> operator+(RValue<Pointer<Byte>> lhs, int offset)
 	{
-		return RValue<Pointer<Byte>>(Nucleus::createGEP(lhs.value, Nucleus::createConstantInt(offset)));
+		return RValue<Pointer<Byte>>(Nucleus::createGEP(lhs.value, V(Nucleus::createConstantInt(offset))));
 	}
 
 	RValue<Pointer<Byte>> operator+(RValue<Pointer<Byte>> lhs, RValue<Int> offset)
@@ -6994,7 +7000,7 @@
 
 	void Return(bool ret)
 	{
-		Nucleus::createRet(Nucleus::createConstantBool(ret));
+		Nucleus::createRet(V(Nucleus::createConstantBool(ret)));
 		Nucleus::setInsertBlock(Nucleus::createBasicBlock());
 		Nucleus::createUnreachable();
 	}
@@ -7036,7 +7042,7 @@
 	{
 		llvm::Function *rdtsc = Intrinsic::getDeclaration(::module, Intrinsic::readcyclecounter);
 
-		return RValue<Long>(Nucleus::createCall(rdtsc));
+		return RValue<Long>(Nucleus::createCall(V(rdtsc)));
 	}
 }
 
@@ -7051,21 +7057,21 @@
 			Float4 vector;
 			vector.x = val;
 
-			return RValue<Int>(Nucleus::createCall(cvtss2si, RValue<Float4>(vector).value));
+			return RValue<Int>(Nucleus::createCall(V(cvtss2si), RValue<Float4>(vector).value));
 		}
 
 		RValue<Int2> cvtps2pi(RValue<Float4> val)
 		{
 			llvm::Function *cvtps2pi = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_cvtps2pi);
 
-			return RValue<Int2>(Nucleus::createCall(cvtps2pi, val.value));
+			return RValue<Int2>(Nucleus::createCall(V(cvtps2pi), val.value));
 		}
 
 		RValue<Int2> cvttps2pi(RValue<Float4> val)
 		{
 			llvm::Function *cvttps2pi = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_cvttps2pi);
 
-			return RValue<Int2>(Nucleus::createCall(cvttps2pi, val.value));
+			return RValue<Int2>(Nucleus::createCall(V(cvttps2pi), val.value));
 		}
 
 		RValue<Int4> cvtps2dq(RValue<Float4> val)
@@ -7074,7 +7080,7 @@
 			{
 				llvm::Function *cvtps2dq = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_cvtps2dq);
 
-				return RValue<Int4>(Nucleus::createCall(cvtps2dq, val.value));
+				return RValue<Int4>(Nucleus::createCall(V(cvtps2dq), val.value));
 			}
 			else
 			{
@@ -7089,72 +7095,72 @@
 		{
 			llvm::Function *rcpss = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_rcp_ss);
 
-			Value *vector = Nucleus::createInsertElement(UndefValue::get(Float4::getType()), val.value, 0);
+			Value *vector = Nucleus::createInsertElement(V(UndefValue::get(Float4::getType())), val.value, 0);
 
-			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(rcpss, vector), 0));
+			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(V(rcpss), vector), 0));
 		}
 
 		RValue<Float> sqrtss(RValue<Float> val)
 		{
 			llvm::Function *sqrtss = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_sqrt_ss);
 
-			Value *vector = Nucleus::createInsertElement(UndefValue::get(Float4::getType()), val.value, 0);
+			Value *vector = Nucleus::createInsertElement(V(UndefValue::get(Float4::getType())), val.value, 0);
 
-			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(sqrtss, vector), 0));
+			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(V(sqrtss), vector), 0));
 		}
 
 		RValue<Float> rsqrtss(RValue<Float> val)
 		{
 			llvm::Function *rsqrtss = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_rsqrt_ss);
 
-			Value *vector = Nucleus::createInsertElement(UndefValue::get(Float4::getType()), val.value, 0);
+			Value *vector = Nucleus::createInsertElement(V(UndefValue::get(Float4::getType())), val.value, 0);
 
-			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(rsqrtss, vector), 0));
+			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(V(rsqrtss), vector), 0));
 		}
 
 		RValue<Float4> rcpps(RValue<Float4> val)
 		{
 			llvm::Function *rcpps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_rcp_ps);
 
-			return RValue<Float4>(Nucleus::createCall(rcpps, val.value));
+			return RValue<Float4>(Nucleus::createCall(V(rcpps), val.value));
 		}
 
 		RValue<Float4> sqrtps(RValue<Float4> val)
 		{
 			llvm::Function *sqrtps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_sqrt_ps);
 
-			return RValue<Float4>(Nucleus::createCall(sqrtps, val.value));
+			return RValue<Float4>(Nucleus::createCall(V(sqrtps), val.value));
 		}
 
 		RValue<Float4> rsqrtps(RValue<Float4> val)
 		{
 			llvm::Function *rsqrtps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_rsqrt_ps);
 
-			return RValue<Float4>(Nucleus::createCall(rsqrtps, val.value));
+			return RValue<Float4>(Nucleus::createCall(V(rsqrtps), val.value));
 		}
 
 		RValue<Float4> maxps(RValue<Float4> x, RValue<Float4> y)
 		{
 			llvm::Function *maxps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_max_ps);
 
-			return RValue<Float4>(Nucleus::createCall(maxps, x.value, y.value));
+			return RValue<Float4>(Nucleus::createCall(V(maxps), x.value, y.value));
 		}
 
 		RValue<Float4> minps(RValue<Float4> x, RValue<Float4> y)
 		{
 			llvm::Function *minps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_min_ps);
 
-			return RValue<Float4>(Nucleus::createCall(minps, x.value, y.value));
+			return RValue<Float4>(Nucleus::createCall(V(minps), x.value, y.value));
 		}
 
 		RValue<Float> roundss(RValue<Float> val, unsigned char imm)
 		{
 			llvm::Function *roundss = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_round_ss);
 
-			Value *undef = UndefValue::get(Float4::getType());
+			Value *undef = V(UndefValue::get(Float4::getType()));
 			Value *vector = Nucleus::createInsertElement(undef, val.value, 0);
 
-			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(roundss, undef, vector, Nucleus::createConstantInt(imm)), 0));
+			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(V(roundss), undef, vector, V(Nucleus::createConstantInt(imm))), 0));
 		}
 
 		RValue<Float> floorss(RValue<Float> val)
@@ -7171,7 +7177,7 @@
 		{
 			llvm::Function *roundps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_round_ps);
 
-			return RValue<Float4>(Nucleus::createCall(roundps, val.value, Nucleus::createConstantInt(imm)));
+			return RValue<Float4>(Nucleus::createCall(V(roundps), val.value, V(Nucleus::createConstantInt(imm))));
 		}
 
 		RValue<Float4> floorps(RValue<Float4> val)
@@ -7188,7 +7194,7 @@
 		{
 			llvm::Function *cmpps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_cmp_ps);
 
-			return RValue<Float4>(Nucleus::createCall(cmpps, x.value, y.value, Nucleus::createConstantByte(imm)));
+			return RValue<Float4>(Nucleus::createCall(V(cmpps), x.value, y.value, V(Nucleus::createConstantByte(imm))));
 		}
 
 		RValue<Float4> cmpeqps(RValue<Float4> x, RValue<Float4> y)
@@ -7235,10 +7241,10 @@
 		{
 			llvm::Function *cmpss = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_cmp_ss);
 
-			Value *vector1 = Nucleus::createInsertElement(UndefValue::get(Float4::getType()), x.value, 0);
-			Value *vector2 = Nucleus::createInsertElement(UndefValue::get(Float4::getType()), y.value, 0);
+			Value *vector1 = Nucleus::createInsertElement(V(UndefValue::get(Float4::getType())), x.value, 0);
+			Value *vector2 = Nucleus::createInsertElement(V(UndefValue::get(Float4::getType())), y.value, 0);
 
-			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(cmpss, vector1, vector2, Nucleus::createConstantByte(imm)), 0));
+			return RValue<Float>(Nucleus::createExtractElement(Nucleus::createCall(V(cmpss), vector1, vector2, V(Nucleus::createConstantByte(imm))), 0));
 		}
 
 		RValue<Float> cmpeqss(RValue<Float> x, RValue<Float> y)
@@ -7285,252 +7291,252 @@
 		{
 			llvm::Function *pabsd = Intrinsic::getDeclaration(::module, Intrinsic::x86_ssse3_pabs_d_128);
 
-			return RValue<Int4>(Nucleus::createCall(pabsd, x.value));
+			return RValue<Int4>(Nucleus::createCall(V(pabsd), x.value));
 		}
 
 		RValue<Short4> paddsw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *paddsw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_padds_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(paddsw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(paddsw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> psubsw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *psubsw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psubs_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(psubsw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(psubsw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<UShort4> paddusw(RValue<UShort4> x, RValue<UShort4> y)
 		{
 			llvm::Function *paddusw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_paddus_w);
 
-			return As<UShort4>(RValue<MMX>(Nucleus::createCall(paddusw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<UShort4>(RValue<MMX>(Nucleus::createCall(V(paddusw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<UShort4> psubusw(RValue<UShort4> x, RValue<UShort4> y)
 		{
 			llvm::Function *psubusw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psubus_w);
 
-			return As<UShort4>(RValue<MMX>(Nucleus::createCall(psubusw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<UShort4>(RValue<MMX>(Nucleus::createCall(V(psubusw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<SByte8> paddsb(RValue<SByte8> x, RValue<SByte8> y)
 		{
 			llvm::Function *paddsb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_padds_b);
 
-			return As<SByte8>(RValue<MMX>(Nucleus::createCall(paddsb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<SByte8>(RValue<MMX>(Nucleus::createCall(V(paddsb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<SByte8> psubsb(RValue<SByte8> x, RValue<SByte8> y)
 		{
 			llvm::Function *psubsb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psubs_b);
 
-			return As<SByte8>(RValue<MMX>(Nucleus::createCall(psubsb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<SByte8>(RValue<MMX>(Nucleus::createCall(V(psubsb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> paddusb(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *paddusb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_paddus_b);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(paddusb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(paddusb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> psubusb(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *psubusb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psubus_b);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(psubusb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(psubusb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> paddw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *paddw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_padd_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(paddw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(paddw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> psubw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *psubw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psub_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(psubw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(psubw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pmullw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pmullw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmull_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pmullw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pmullw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pand(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pand = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pand);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pand, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pand), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> por(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *por = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_por);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(por, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(por), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pxor(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pxor = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pxor);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pxor, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pxor), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pshufw(RValue<Short4> x, unsigned char y)
 		{
 			llvm::Function *pshufw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_pshuf_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pshufw, As<MMX>(x).value, Nucleus::createConstantByte(y))));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pshufw), As<MMX>(x).value, V(Nucleus::createConstantByte(y)))));
 		}
 
 		RValue<Int2> punpcklwd(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *punpcklwd = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_punpcklwd);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(punpcklwd, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(punpcklwd), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int2> punpckhwd(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *punpckhwd = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_punpckhwd);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(punpckhwd, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(punpckhwd), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pinsrw(RValue<Short4> x, RValue<Int> y, unsigned int i)
 		{
 			llvm::Function *pinsrw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pinsr_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pinsrw, As<MMX>(x).value, y.value, Nucleus::createConstantInt(i))));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pinsrw), As<MMX>(x).value, y.value, V(Nucleus::createConstantInt(i)))));
 		}
 
 		RValue<Int> pextrw(RValue<Short4> x, unsigned int i)
 		{
 			llvm::Function *pextrw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pextr_w);
 
-			return RValue<Int>(Nucleus::createCall(pextrw, As<MMX>(x).value, Nucleus::createConstantInt(i)));
+			return RValue<Int>(Nucleus::createCall(V(pextrw), As<MMX>(x).value, V(Nucleus::createConstantInt(i))));
 		}
 
 		RValue<Long1> punpckldq(RValue<Int2> x, RValue<Int2> y)
 		{
 			llvm::Function *punpckldq = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_punpckldq);
 
-			return As<Long1>(RValue<MMX>(Nucleus::createCall(punpckldq, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Long1>(RValue<MMX>(Nucleus::createCall(V(punpckldq), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Long1> punpckhdq(RValue<Int2> x, RValue<Int2> y)
 		{
 			llvm::Function *punpckhdq = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_punpckhdq);
 
-			return As<Long1>(RValue<MMX>(Nucleus::createCall(punpckhdq, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Long1>(RValue<MMX>(Nucleus::createCall(V(punpckhdq), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> punpcklbw(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *punpcklbw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_punpcklbw);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(punpcklbw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(punpcklbw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> punpckhbw(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *punpckhbw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_punpckhbw);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(punpckhbw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(punpckhbw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> paddb(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *paddb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_padd_b);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(paddb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(paddb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> psubb(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *psubb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psub_b);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(psubb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(psubb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int2> paddd(RValue<Int2> x, RValue<Int2> y)
 		{
 			llvm::Function *paddd = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_padd_d);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(paddd, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(paddd), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int2> psubd(RValue<Int2> x, RValue<Int2> y)
 		{
 			llvm::Function *psubd = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psub_d);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(psubd, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(psubd), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<UShort4> pavgw(RValue<UShort4> x, RValue<UShort4> y)
 		{
 			llvm::Function *pavgw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pavg_w);
 
-			return As<UShort4>(RValue<MMX>(Nucleus::createCall(pavgw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<UShort4>(RValue<MMX>(Nucleus::createCall(V(pavgw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pmaxsw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pmaxsw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmaxs_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pmaxsw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pmaxsw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pminsw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pminsw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmins_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pminsw,  As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pminsw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pcmpgtw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pcmpgtw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pcmpgt_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pcmpgtw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pcmpgtw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> pcmpeqw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pcmpeqw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pcmpeq_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pcmpeqw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pcmpeqw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> pcmpgtb(RValue<SByte8> x, RValue<SByte8> y)
 		{
 			llvm::Function *pcmpgtb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pcmpgt_b);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(pcmpgtb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(pcmpgtb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> pcmpeqb(RValue<Byte8> x, RValue<Byte8> y)
 		{
 			llvm::Function *pcmpeqb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pcmpeq_b);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(pcmpeqb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(pcmpeqb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> packssdw(RValue<Int2> x, RValue<Int2> y)
 		{
 			llvm::Function *packssdw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_packssdw);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(packssdw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(packssdw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short8> packssdw(RValue<Int4> x, RValue<Int4> y)
@@ -7539,7 +7545,7 @@
 			{
 				llvm::Function *packssdw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_packssdw_128);
 
-				return RValue<Short8>(Nucleus::createCall(packssdw, x.value, y.value));
+				return RValue<Short8>(Nucleus::createCall(V(packssdw), x.value, y.value));
 			}
 			else
 			{
@@ -7560,14 +7566,14 @@
 		{
 			llvm::Function *packsswb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_packsswb);
 
-			return As<SByte8>(RValue<MMX>(Nucleus::createCall(packsswb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<SByte8>(RValue<MMX>(Nucleus::createCall(V(packsswb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Byte8> packuswb(RValue<UShort4> x, RValue<UShort4> y)
 		{
 			llvm::Function *packuswb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_packuswb);
 
-			return As<Byte8>(RValue<MMX>(Nucleus::createCall(packuswb, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Byte8>(RValue<MMX>(Nucleus::createCall(V(packuswb), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<UShort8> packusdw(RValue<UInt4> x, RValue<UInt4> y)
@@ -7576,7 +7582,7 @@
 			{
 				llvm::Function *packusdw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_packusdw);
 
-				return RValue<UShort8>(Nucleus::createCall(packusdw, x.value, y.value));
+				return RValue<UShort8>(Nucleus::createCall(V(packusdw), x.value, y.value));
 			}
 			else
 			{
@@ -7589,49 +7595,49 @@
 		{
 			llvm::Function *psrlw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psrli_w);
 
-			return As<UShort4>(RValue<MMX>(Nucleus::createCall(psrlw, As<MMX>(x).value, Nucleus::createConstantInt(y))));
+			return As<UShort4>(RValue<MMX>(Nucleus::createCall(V(psrlw), As<MMX>(x).value, V(Nucleus::createConstantInt(y)))));
 		}
 
 		RValue<UShort8> psrlw(RValue<UShort8> x, unsigned char y)
 		{
 			llvm::Function *psrlw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_psrli_w);
 
-			return RValue<UShort8>(Nucleus::createCall(psrlw, x.value, Nucleus::createConstantInt(y)));
+			return RValue<UShort8>(Nucleus::createCall(V(psrlw), x.value, V(Nucleus::createConstantInt(y))));
 		}
 
 		RValue<Short4> psraw(RValue<Short4> x, unsigned char y)
 		{
 			llvm::Function *psraw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psrai_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(psraw, As<MMX>(x).value, Nucleus::createConstantInt(y))));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(psraw), As<MMX>(x).value, V(Nucleus::createConstantInt(y)))));
 		}
 
 		RValue<Short8> psraw(RValue<Short8> x, unsigned char y)
 		{
 			llvm::Function *psraw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_psrai_w);
 
-			return RValue<Short8>(Nucleus::createCall(psraw, x.value, Nucleus::createConstantInt(y)));
+			return RValue<Short8>(Nucleus::createCall(V(psraw), x.value, V(Nucleus::createConstantInt(y))));
 		}
 
 		RValue<Short4> psllw(RValue<Short4> x, unsigned char y)
 		{
 			llvm::Function *psllw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pslli_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(psllw, As<MMX>(x).value, Nucleus::createConstantInt(y))));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(psllw), As<MMX>(x).value, V(Nucleus::createConstantInt(y)))));
 		}
 
 		RValue<Short8> psllw(RValue<Short8> x, unsigned char y)
 		{
 			llvm::Function *psllw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_pslli_w);
 
-			return RValue<Short8>(Nucleus::createCall(psllw, x.value, Nucleus::createConstantInt(y)));
+			return RValue<Short8>(Nucleus::createCall(V(psllw), x.value, V(Nucleus::createConstantInt(y))));
 		}
 
 		RValue<Int2> pslld(RValue<Int2> x, unsigned char y)
 		{
 			llvm::Function *pslld = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pslli_d);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(pslld, As<MMX>(x).value, Nucleus::createConstantInt(y))));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(pslld), As<MMX>(x).value, V(Nucleus::createConstantInt(y)))));
 		}
 
 		RValue<Int4> pslld(RValue<Int4> x, unsigned char y)
@@ -7640,7 +7646,7 @@
 			{
 				llvm::Function *pslld = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_pslli_d);
 
-				return RValue<Int4>(Nucleus::createCall(pslld, x.value, Nucleus::createConstantInt(y)));
+				return RValue<Int4>(Nucleus::createCall(V(pslld), x.value, V(Nucleus::createConstantInt(y))));
 			}
 			else
 			{
@@ -7658,7 +7664,7 @@
 		{
 			llvm::Function *psrad = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psrai_d);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(psrad, As<MMX>(x).value, Nucleus::createConstantInt(y))));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(psrad), As<MMX>(x).value, V(Nucleus::createConstantInt(y)))));
 		}
 
 		RValue<Int4> psrad(RValue<Int4> x, unsigned char y)
@@ -7667,7 +7673,7 @@
 			{
 				llvm::Function *psrad = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_psrai_d);
 
-				return RValue<Int4>(Nucleus::createCall(psrad, x.value, Nucleus::createConstantInt(y)));
+				return RValue<Int4>(Nucleus::createCall(V(psrad), x.value, V(Nucleus::createConstantInt(y))));
 			}
 			else
 			{
@@ -7685,7 +7691,7 @@
 		{
 			llvm::Function *psrld = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psrli_d);
 
-			return As<UInt2>(RValue<MMX>(Nucleus::createCall(psrld, As<MMX>(x).value, Nucleus::createConstantInt(y))));
+			return As<UInt2>(RValue<MMX>(Nucleus::createCall(V(psrld), As<MMX>(x).value, V(Nucleus::createConstantInt(y)))));
 		}
 
 		RValue<UInt4> psrld(RValue<UInt4> x, unsigned char y)
@@ -7694,7 +7700,7 @@
 			{
 				llvm::Function *psrld = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_psrli_d);
 
-				return RValue<UInt4>(Nucleus::createCall(psrld, x.value, Nucleus::createConstantInt(y)));
+				return RValue<UInt4>(Nucleus::createCall(V(psrld), x.value, V(Nucleus::createConstantInt(y))));
 			}
 			else
 			{
@@ -7712,126 +7718,126 @@
 		{
 			llvm::Function *psrlw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psrl_w);
 
-			return As<UShort4>(RValue<MMX>(Nucleus::createCall(psrlw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<UShort4>(RValue<MMX>(Nucleus::createCall(V(psrlw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> psraw(RValue<Short4> x, RValue<Long1> y)
 		{
 			llvm::Function *psraw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psra_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(psraw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(psraw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short4> psllw(RValue<Short4> x, RValue<Long1> y)
 		{
 			llvm::Function *psllw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psll_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(psllw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(psllw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int2> pslld(RValue<Int2> x, RValue<Long1> y)
 		{
 			llvm::Function *pslld = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psll_d);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(pslld, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(pslld), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<UInt2> psrld(RValue<UInt2> x, RValue<Long1> y)
 		{
 			llvm::Function *psrld = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psrl_d);
 
-			return As<UInt2>(RValue<MMX>(Nucleus::createCall(psrld, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<UInt2>(RValue<MMX>(Nucleus::createCall(V(psrld), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int2> psrad(RValue<Int2> x, RValue<Long1> y)
 		{
 			llvm::Function *psrld = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_psra_d);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(psrld, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(psrld), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int4> pmaxsd(RValue<Int4> x, RValue<Int4> y)
 		{
 			llvm::Function *pmaxsd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pmaxsd);
 
-			return RValue<Int4>(Nucleus::createCall(pmaxsd, x.value, y.value));
+			return RValue<Int4>(Nucleus::createCall(V(pmaxsd), x.value, y.value));
 		}
 
 		RValue<Int4> pminsd(RValue<Int4> x, RValue<Int4> y)
 		{
 			llvm::Function *pminsd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pminsd);
 
-			return RValue<Int4>(Nucleus::createCall(pminsd, x.value, y.value));
+			return RValue<Int4>(Nucleus::createCall(V(pminsd), x.value, y.value));
 		}
 
 		RValue<UInt4> pmaxud(RValue<UInt4> x, RValue<UInt4> y)
 		{
 			llvm::Function *pmaxud = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pmaxud);
 
-			return RValue<UInt4>(Nucleus::createCall(pmaxud, x.value, y.value));
+			return RValue<UInt4>(Nucleus::createCall(V(pmaxud), x.value, y.value));
 		}
 
 		RValue<UInt4> pminud(RValue<UInt4> x, RValue<UInt4> y)
 		{
 			llvm::Function *pminud = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pminud);
 
-			return RValue<UInt4>(Nucleus::createCall(pminud, x.value, y.value));
+			return RValue<UInt4>(Nucleus::createCall(V(pminud), x.value, y.value));
 		}
 
 		RValue<Short4> pmulhw(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pmulhw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmulh_w);
 
-			return As<Short4>(RValue<MMX>(Nucleus::createCall(pmulhw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Short4>(RValue<MMX>(Nucleus::createCall(V(pmulhw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<UShort4> pmulhuw(RValue<UShort4> x, RValue<UShort4> y)
 		{
 			llvm::Function *pmulhuw = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmulhu_w);
 
-			return As<UShort4>(RValue<MMX>(Nucleus::createCall(pmulhuw, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<UShort4>(RValue<MMX>(Nucleus::createCall(V(pmulhuw), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Int2> pmaddwd(RValue<Short4> x, RValue<Short4> y)
 		{
 			llvm::Function *pmaddwd = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmadd_wd);
 
-			return As<Int2>(RValue<MMX>(Nucleus::createCall(pmaddwd, As<MMX>(x).value, As<MMX>(y).value)));
+			return As<Int2>(RValue<MMX>(Nucleus::createCall(V(pmaddwd), As<MMX>(x).value, As<MMX>(y).value)));
 		}
 
 		RValue<Short8> pmulhw(RValue<Short8> x, RValue<Short8> y)
 		{
 			llvm::Function *pmulhw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_pmulh_w);
 
-			return RValue<Short8>(Nucleus::createCall(pmulhw, x.value, y.value));
+			return RValue<Short8>(Nucleus::createCall(V(pmulhw), x.value, y.value));
 		}
 
 		RValue<UShort8> pmulhuw(RValue<UShort8> x, RValue<UShort8> y)
 		{
 			llvm::Function *pmulhuw = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_pmulhu_w);
 
-			return RValue<UShort8>(Nucleus::createCall(pmulhuw, x.value, y.value));
+			return RValue<UShort8>(Nucleus::createCall(V(pmulhuw), x.value, y.value));
 		}
 
 		RValue<Int4> pmaddwd(RValue<Short8> x, RValue<Short8> y)
 		{
 			llvm::Function *pmaddwd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse2_pmadd_wd);
 
-			return RValue<Int4>(Nucleus::createCall(pmaddwd, x.value, y.value));
+			return RValue<Int4>(Nucleus::createCall(V(pmaddwd), x.value, y.value));
 		}
 
 		RValue<Int> movmskps(RValue<Float4> x)
 		{
 			llvm::Function *movmskps = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse_movmsk_ps);
 
-			return RValue<Int>(Nucleus::createCall(movmskps, x.value));
+			return RValue<Int>(Nucleus::createCall(V(movmskps), x.value));
 		}
 
 		RValue<Int> pmovmskb(RValue<Byte8> x)
 		{
 			llvm::Function *pmovmskb = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_pmovmskb);
 
-			return RValue<Int>(Nucleus::createCall(pmovmskb, As<MMX>(x).value));
+			return RValue<Int>(Nucleus::createCall(V(pmovmskb), As<MMX>(x).value));
 		}
 
 		//RValue<Int2> movd(RValue<Pointer<Int>> x)
@@ -7858,35 +7864,35 @@
 		{
 			llvm::Function *pmovzxbd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pmovzxbd);
 
-			return RValue<Int4>(Nucleus::createCall(pmovzxbd, Nucleus::createBitCast(x.value, Byte16::getType())));
+			return RValue<Int4>(Nucleus::createCall(V(pmovzxbd), Nucleus::createBitCast(x.value, Byte16::getType())));
 		}
 
 		RValue<Int4> pmovsxbd(RValue<Int4> x)
 		{
 			llvm::Function *pmovsxbd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pmovsxbd);
 
-			return RValue<Int4>(Nucleus::createCall(pmovsxbd, Nucleus::createBitCast(x.value, SByte16::getType())));
+			return RValue<Int4>(Nucleus::createCall(V(pmovsxbd), Nucleus::createBitCast(x.value, SByte16::getType())));
 		}
 
 		RValue<Int4> pmovzxwd(RValue<Int4> x)
 		{
 			llvm::Function *pmovzxwd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pmovzxwd);
 
-			return RValue<Int4>(Nucleus::createCall(pmovzxwd, Nucleus::createBitCast(x.value, UShort8::getType())));
+			return RValue<Int4>(Nucleus::createCall(V(pmovzxwd), Nucleus::createBitCast(x.value, UShort8::getType())));
 		}
 
 		RValue<Int4> pmovsxwd(RValue<Int4> x)
 		{
 			llvm::Function *pmovsxwd = Intrinsic::getDeclaration(::module, Intrinsic::x86_sse41_pmovsxwd);
 
-			return RValue<Int4>(Nucleus::createCall(pmovsxwd, Nucleus::createBitCast(x.value, Short8::getType())));
+			return RValue<Int4>(Nucleus::createCall(V(pmovsxwd), Nucleus::createBitCast(x.value, Short8::getType())));
 		}
 
 		void emms()
 		{
 			llvm::Function *emms = Intrinsic::getDeclaration(::module, Intrinsic::x86_mmx_emms);
 
-			Nucleus::createCall(emms);
+			Nucleus::createCall(V(emms));
 		}
 	}
 }
diff --git a/src/Reactor/Nucleus.hpp b/src/Reactor/Nucleus.hpp
index 94b1488..14a7e07 100644
--- a/src/Reactor/Nucleus.hpp
+++ b/src/Reactor/Nucleus.hpp
@@ -28,14 +28,10 @@
 #undef min
 #undef Bool
 
-namespace llvm
-{
-	class Value;
-}
-
 namespace sw
 {
 	class Type;
+	class Value;
 	class Constant;
 	class BasicBlock;
 
@@ -70,114 +66,114 @@
 
 		Routine *acquireRoutine(const wchar_t *name, bool runOptimizations = true);
 
-		static llvm::Value *allocateStackVariable(Type *type, int arraySize = 0);
+		static Value *allocateStackVariable(Type *type, int arraySize = 0);
 		static BasicBlock *createBasicBlock();
 		static BasicBlock *getInsertBlock();
 		static void setInsertBlock(BasicBlock *basicBlock);
 		static BasicBlock *getPredecessor(BasicBlock *basicBlock);
 
 		static void createFunction(Type *ReturnType, std::vector<Type*> &Params);
-		static llvm::Value *getArgument(unsigned int index);
+		static Value *getArgument(unsigned int index);
 
 		// Terminators
-		static llvm::Value *createRetVoid();
-		static llvm::Value *createRet(llvm::Value *V);
-		static llvm::Value *createBr(BasicBlock *dest);
-		static llvm::Value *createCondBr(llvm::Value *cond, BasicBlock *ifTrue, BasicBlock *ifFalse);
+		static Value *createRetVoid();
+		static Value *createRet(Value *V);
+		static Value *createBr(BasicBlock *dest);
+		static Value *createCondBr(Value *cond, BasicBlock *ifTrue, BasicBlock *ifFalse);
 
 		// Binary operators
-		static llvm::Value *createAdd(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createSub(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createMul(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createUDiv(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createSDiv(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFAdd(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFSub(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFMul(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFDiv(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createURem(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createSRem(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFRem(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createShl(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createLShr(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createAShr(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createAnd(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createOr(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createXor(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createNeg(llvm::Value *V);
-		static llvm::Value *createFNeg(llvm::Value *V);
-		static llvm::Value *createNot(llvm::Value *V);
+		static Value *createAdd(Value *lhs, Value *rhs);
+		static Value *createSub(Value *lhs, Value *rhs);
+		static Value *createMul(Value *lhs, Value *rhs);
+		static Value *createUDiv(Value *lhs, Value *rhs);
+		static Value *createSDiv(Value *lhs, Value *rhs);
+		static Value *createFAdd(Value *lhs, Value *rhs);
+		static Value *createFSub(Value *lhs, Value *rhs);
+		static Value *createFMul(Value *lhs, Value *rhs);
+		static Value *createFDiv(Value *lhs, Value *rhs);
+		static Value *createURem(Value *lhs, Value *rhs);
+		static Value *createSRem(Value *lhs, Value *rhs);
+		static Value *createFRem(Value *lhs, Value *rhs);
+		static Value *createShl(Value *lhs, Value *rhs);
+		static Value *createLShr(Value *lhs, Value *rhs);
+		static Value *createAShr(Value *lhs, Value *rhs);
+		static Value *createAnd(Value *lhs, Value *rhs);
+		static Value *createOr(Value *lhs, Value *rhs);
+		static Value *createXor(Value *lhs, Value *rhs);
+		static Value *createNeg(Value *V);
+		static Value *createFNeg(Value *V);
+		static Value *createNot(Value *V);
 
 		// Memory instructions
-		static llvm::Value *createLoad(llvm::Value *ptr, bool isVolatile = false, unsigned int align = 0);
-		static llvm::Value *createStore(llvm::Value *value, llvm::Value *ptr, bool isVolatile = false, unsigned int align = 0);
-		static llvm::Value *createStore(Constant *constant, llvm::Value *ptr, bool isVolatile = false, unsigned int align = 0);
-		static llvm::Value *createGEP(llvm::Value *ptr, llvm::Value *index);
+		static Value *createLoad(Value *ptr, bool isVolatile = false, unsigned int align = 0);
+		static Value *createStore(Value *value, Value *ptr, bool isVolatile = false, unsigned int align = 0);
+		static Value *createStore(Constant *constant, Value *ptr, bool isVolatile = false, unsigned int align = 0);
+		static Value *createGEP(Value *ptr, Value *index);
 
 		// Atomic instructions
-		static llvm::Value *createAtomicAdd(llvm::Value *ptr, llvm::Value *value);
+		static Value *createAtomicAdd(Value *ptr, Value *value);
 
 		// Cast/Conversion Operators
-		static llvm::Value *createTrunc(llvm::Value *V, Type *destType);
-		static llvm::Value *createZExt(llvm::Value *V, Type *destType);
-		static llvm::Value *createSExt(llvm::Value *V, Type *destType);
-		static llvm::Value *createFPToSI(llvm::Value *V, Type *destType);
-		static llvm::Value *createUIToFP(llvm::Value *V, Type *destType);
-		static llvm::Value *createSIToFP(llvm::Value *V, Type *destType);
-		static llvm::Value *createFPTrunc(llvm::Value *V, Type *destType);
-		static llvm::Value *createFPExt(llvm::Value *V, Type *destType);
-		static llvm::Value *createPtrToInt(llvm::Value *V, Type *destType);
-		static llvm::Value *createIntToPtr(llvm::Value *V, Type *destType);
-		static llvm::Value *createBitCast(llvm::Value *V, Type *destType);
-		static llvm::Value *createIntCast(llvm::Value *V, Type *destType, bool isSigned);
+		static Value *createTrunc(Value *V, Type *destType);
+		static Value *createZExt(Value *V, Type *destType);
+		static Value *createSExt(Value *V, Type *destType);
+		static Value *createFPToSI(Value *V, Type *destType);
+		static Value *createUIToFP(Value *V, Type *destType);
+		static Value *createSIToFP(Value *V, Type *destType);
+		static Value *createFPTrunc(Value *V, Type *destType);
+		static Value *createFPExt(Value *V, Type *destType);
+		static Value *createPtrToInt(Value *V, Type *destType);
+		static Value *createIntToPtr(Value *V, Type *destType);
+		static Value *createBitCast(Value *V, Type *destType);
+		static Value *createIntCast(Value *V, Type *destType, bool isSigned);
 
 		// Compare instructions
-		static llvm::Value *createICmpEQ(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpNE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpUGT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpUGE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpULT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpULE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpSGT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpSGE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpSLT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createICmpSLE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpOEQ(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpOGT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpOGE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpOLT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpOLE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpONE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpORD(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpUNO(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpUEQ(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpUGT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpUGE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpULT(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpULE(llvm::Value *lhs, llvm::Value *rhs);
-		static llvm::Value *createFCmpUNE(llvm::Value *lhs, llvm::Value *rhs);
+		static Value *createICmpEQ(Value *lhs, Value *rhs);
+		static Value *createICmpNE(Value *lhs, Value *rhs);
+		static Value *createICmpUGT(Value *lhs, Value *rhs);
+		static Value *createICmpUGE(Value *lhs, Value *rhs);
+		static Value *createICmpULT(Value *lhs, Value *rhs);
+		static Value *createICmpULE(Value *lhs, Value *rhs);
+		static Value *createICmpSGT(Value *lhs, Value *rhs);
+		static Value *createICmpSGE(Value *lhs, Value *rhs);
+		static Value *createICmpSLT(Value *lhs, Value *rhs);
+		static Value *createICmpSLE(Value *lhs, Value *rhs);
+		static Value *createFCmpOEQ(Value *lhs, Value *rhs);
+		static Value *createFCmpOGT(Value *lhs, Value *rhs);
+		static Value *createFCmpOGE(Value *lhs, Value *rhs);
+		static Value *createFCmpOLT(Value *lhs, Value *rhs);
+		static Value *createFCmpOLE(Value *lhs, Value *rhs);
+		static Value *createFCmpONE(Value *lhs, Value *rhs);
+		static Value *createFCmpORD(Value *lhs, Value *rhs);
+		static Value *createFCmpUNO(Value *lhs, Value *rhs);
+		static Value *createFCmpUEQ(Value *lhs, Value *rhs);
+		static Value *createFCmpUGT(Value *lhs, Value *rhs);
+		static Value *createFCmpUGE(Value *lhs, Value *rhs);
+		static Value *createFCmpULT(Value *lhs, Value *rhs);
+		static Value *createFCmpULE(Value *lhs, Value *rhs);
+		static Value *createFCmpUNE(Value *lhs, Value *rhs);
 
 		// Call instructions
-		static llvm::Value *createCall(llvm::Value *callee);
-		static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg);
-		static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg1, llvm::Value *Arg2);
-		static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg1, llvm::Value *Arg2, llvm::Value *Arg3);
-		static llvm::Value *createCall(llvm::Value *callee, llvm::Value *Arg1, llvm::Value *Arg2, llvm::Value *Arg3,llvm::Value *Arg4);
+		static Value *createCall(Value *callee);
+		static Value *createCall(Value *callee, Value *Arg);
+		static Value *createCall(Value *callee, Value *Arg1, Value *Arg2);
+		static Value *createCall(Value *callee, Value *Arg1, Value *Arg2, Value *Arg3);
+		static Value *createCall(Value *callee, Value *Arg1, Value *Arg2, Value *Arg3,Value *Arg4);
 
 		// Vector instructions
-		static llvm::Value *createExtractElement(llvm::Value *vector, int index);
-		static llvm::Value *createInsertElement(llvm::Value *vector, llvm::Value *element, int index);
-		static llvm::Value *createShuffleVector(llvm::Value *V1, llvm::Value *V2, llvm::Value *mask);
+		static Value *createExtractElement(Value *vector, int index);
+		static Value *createInsertElement(Value *vector, Value *element, int index);
+		static Value *createShuffleVector(Value *V1, Value *V2, Value *mask);
 
 		// Other instructions
-		static llvm::Value *createSelect(llvm::Value *C, llvm::Value *ifTrue, llvm::Value *ifFalse);
-		static llvm::Value *createSwitch(llvm::Value *V, BasicBlock *Dest, unsigned NumCases);
-		static void addSwitchCase(llvm::Value *Switch, int Case, BasicBlock *Branch);
-		static llvm::Value *createUnreachable();
+		static Value *createSelect(Value *C, Value *ifTrue, Value *ifFalse);
+		static Value *createSwitch(Value *V, BasicBlock *Dest, unsigned NumCases);
+		static void addSwitchCase(Value *Switch, int Case, BasicBlock *Branch);
+		static Value *createUnreachable();
 
 		// Derived instructions
-		static llvm::Value *createSwizzle(llvm::Value *val, unsigned char select);
-		static llvm::Value *createMask(llvm::Value *lhs, llvm::Value *rhs, unsigned char select);
+		static Value *createSwizzle(Value *val, unsigned char select);
+		static Value *createMask(Value *lhs, Value *rhs, unsigned char select);
 
 		// Constant values
 		static Constant *createNullValue(Type *Ty);
@@ -258,13 +254,13 @@
 			return false;
 		}
 
-		llvm::Value *loadValue(unsigned int alignment = 0) const;
-		llvm::Value *storeValue(llvm::Value *value, unsigned int alignment = 0) const;
-		llvm::Value *storeValue(Constant *constant, unsigned int alignment = 0) const;
-		llvm::Value *getAddress(llvm::Value *index) const;
+		Value *loadValue(unsigned int alignment = 0) const;
+		Value *storeValue(Value *value, unsigned int alignment = 0) const;
+		Value *storeValue(Constant *constant, unsigned int alignment = 0) const;
+		Value *getAddress(Value *index) const;
 
 	protected:
-		llvm::Value *address;
+		Value *address;
 	};
 
 	template<class T>
@@ -280,18 +276,18 @@
 	class Reference
 	{
 	public:
-		explicit Reference(llvm::Value *pointer, int alignment = 1);
+		explicit Reference(Value *pointer, int alignment = 1);
 
 		RValue<T> operator=(RValue<T> rhs) const;
 		RValue<T> operator=(const Reference<T> &ref) const;
 
 		RValue<T> operator+=(RValue<T> rhs) const;
 
-		llvm::Value *loadValue() const;
+		Value *loadValue() const;
 		int getAlignment() const;
 
 	private:
-		llvm::Value *address;
+		Value *address;
 
 		const int alignment;
 	};
@@ -336,7 +332,7 @@
 	class RValue
 	{
 	public:
-		explicit RValue(llvm::Value *rvalue);
+		explicit RValue(Value *rvalue);
 
 		RValue(const T &lvalue);
 		RValue(typename IntLiteral<T>::type i);
@@ -345,15 +341,15 @@
 
 		RValue<T> &operator=(const RValue<T>&) = delete;
 
-		llvm::Value *value;   // FIXME: Make private
+		Value *value;   // FIXME: Make private
 	};
 
 	template<typename T>
 	struct Argument
 	{
-		explicit Argument(llvm::Value *value) : value(value) {}
+		explicit Argument(Value *value) : value(value) {}
 
-		llvm::Value *value;
+		Value *value;
 	};
 
 	class Bool : public Variable<Bool>
@@ -2388,15 +2384,15 @@
 		template<class S>
 		Pointer(RValue<Pointer<S>> pointerS, int alignment = 1) : alignment(alignment)
 		{
-			llvm::Value *pointerT = Nucleus::createBitCast(pointerS.value, Nucleus::getPointerType(T::getType()));
+			Value *pointerT = Nucleus::createBitCast(pointerS.value, Nucleus::getPointerType(T::getType()));
 			LValue::storeValue(pointerT);
 		}
 
 		template<class S>
 		Pointer(const Pointer<S> &pointer, int alignment = 1) : alignment(alignment)
 		{
-			llvm::Value *pointerS = pointer.loadValue(alignment);
-			llvm::Value *pointerT = Nucleus::createBitCast(pointerS, Nucleus::getPointerType(T::getType()));
+			Value *pointerS = pointer.loadValue(alignment);
+			Value *pointerT = Nucleus::createBitCast(pointerS, Nucleus::getPointerType(T::getType()));
 			LValue::storeValue(pointerT);
 		}
 
@@ -2496,7 +2492,7 @@
 		template<int index>
 		Argument<typename ArgI<index, Arguments...>::Type> Arg() const
 		{
-			llvm::Value *arg = Nucleus::getArgument(index);
+			Value *arg = Nucleus::getArgument(index);
 			return Argument<typename ArgI<index, Arguments...>::Type>(arg);
 		}
 
@@ -2535,7 +2531,7 @@
 	}
 
 	template<class T>
-	Reference<T>::Reference(llvm::Value *pointer, int alignment) : alignment(alignment)
+	Reference<T>::Reference(Value *pointer, int alignment) : alignment(alignment)
 	{
 		address = pointer;
 	}
@@ -2551,7 +2547,7 @@
 	template<class T>
 	RValue<T> Reference<T>::operator=(const Reference<T> &ref) const
 	{
-		llvm::Value *tmp = Nucleus::createLoad(ref.address, false, ref.alignment);
+		Value *tmp = Nucleus::createLoad(ref.address, false, ref.alignment);
 		Nucleus::createStore(tmp, address, false, alignment);
 
 		return RValue<T>(tmp);
@@ -2564,7 +2560,7 @@
 	}
 
 	template<class T>
-	llvm::Value *Reference<T>::loadValue() const
+	Value *Reference<T>::loadValue() const
 	{
 		return Nucleus::createLoad(address, false, alignment);
 	}
@@ -2576,7 +2572,7 @@
 	}
 
 	template<class T>
-	RValue<T>::RValue(llvm::Value *rvalue)
+	RValue<T>::RValue(Value *rvalue)
 	{
 		value = rvalue;
 	}
@@ -2590,13 +2586,13 @@
 	template<class T>
 	RValue<T>::RValue(typename IntLiteral<T>::type i)
 	{
-		value = (llvm::Value*)Nucleus::createConstantInt(i);
+		value = (Value*)Nucleus::createConstantInt(i);
 	}
 
 	template<class T>
 	RValue<T>::RValue(typename FloatLiteral<T>::type f)
 	{
-		value = (llvm::Value*)Nucleus::createConstantFloat(f);
+		value = (Value*)Nucleus::createConstantFloat(f);
 	}
 
 	template<class T>
@@ -2608,7 +2604,7 @@
 	template<int T>
 	Swizzle2Float4<T>::operator RValue<Float4>() const
 	{
-		llvm::Value *vector = parent->loadValue();
+		Value *vector = parent->loadValue();
 
 		return RValue<Float4>(Nucleus::createSwizzle(vector, T));
 	}
@@ -2616,7 +2612,7 @@
 	template<int T>
 	SwizzleFloat4<T>::operator RValue<Float4>() const
 	{
-		llvm::Value *vector = parent->loadValue();
+		Value *vector = parent->loadValue();
 
 		return RValue<Float4>(Nucleus::createSwizzle(vector, T));
 	}
@@ -2624,7 +2620,7 @@
 	template<int T>
 	SwizzleMaskFloat4<T>::operator RValue<Float4>() const
 	{
-		llvm::Value *vector = parent->loadValue();
+		Value *vector = parent->loadValue();
 
 		return RValue<Float4>(Nucleus::createSwizzle(vector, T));
 	}
@@ -2650,7 +2646,7 @@
 	template<int T>
 	SwizzleMask1Float4<T>::operator RValue<Float4>() const
 	{
-		llvm::Value *vector = parent->loadValue();
+		Value *vector = parent->loadValue();
 
 		return RValue<Float4>(Nucleus::createSwizzle(vector, T));
 	}
@@ -2676,7 +2672,7 @@
 	template<int T>
 	SwizzleMask2Float4<T>::operator RValue<Float4>() const
 	{
-		llvm::Value *vector = parent->loadValue();
+		Value *vector = parent->loadValue();
 
 		return RValue<Float4>(Nucleus::createSwizzle(vector, T));
 	}
@@ -2788,14 +2784,14 @@
 	template<class T>
 	Pointer<T>::Pointer(const Pointer<T> &rhs) : alignment(rhs.alignment)
 	{
-		llvm::Value *value = rhs.loadValue();
+		Value *value = rhs.loadValue();
 		LValue::storeValue(value);
 	}
 
 	template<class T>
 	Pointer<T>::Pointer(const Reference<Pointer<T>> &rhs) : alignment(rhs.getAlignment())
 	{
-		llvm::Value *value = rhs.loadValue();
+		Value *value = rhs.loadValue();
 		LValue::storeValue(value);
 	}
 
@@ -2810,7 +2806,7 @@
 	template<class T>
 	RValue<Pointer<T>> Pointer<T>::operator=(const Pointer<T> &rhs) const
 	{
-		llvm::Value *value = rhs.loadValue();
+		Value *value = rhs.loadValue();
 		LValue::storeValue(value);
 
 		return RValue<Pointer<T>>(value);
@@ -2819,7 +2815,7 @@
 	template<class T>
 	RValue<Pointer<T>> Pointer<T>::operator=(const Reference<Pointer<T>> &rhs) const
 	{
-		llvm::Value *value = rhs.loadValue();
+		Value *value = rhs.loadValue();
 		LValue::storeValue(value);
 
 		return RValue<Pointer<T>>(value);
@@ -2834,7 +2830,7 @@
 	template<class T>
 	Reference<T> Pointer<T>::operator[](int index)
 	{
-		llvm::Value *element = Nucleus::createGEP(LValue::loadValue(), (llvm::Value*)Nucleus::createConstantInt(index));
+		Value *element = Nucleus::createGEP(LValue::loadValue(), (Value*)Nucleus::createConstantInt(index));
 
 		return Reference<T>(element, alignment);
 	}
@@ -2842,7 +2838,7 @@
 	template<class T>
 	Reference<T> Pointer<T>::operator[](RValue<Int> index)
 	{
-		llvm::Value *element = Nucleus::createGEP(LValue::loadValue(), index.value);
+		Value *element = Nucleus::createGEP(LValue::loadValue(), index.value);
 
 		return Reference<T>(element, alignment);
 	}
@@ -2861,7 +2857,7 @@
 	template<class T, int S>
 	Reference<T> Array<T, S>::operator[](int index)
 	{
-		llvm::Value *element = LValue::getAddress((llvm::Value*)Nucleus::createConstantInt(index));
+		Value *element = LValue::getAddress((Value*)Nucleus::createConstantInt(index));
 
 		return Reference<T>(element);
 	}
@@ -2869,7 +2865,7 @@
 	template<class T, int S>
 	Reference<T> Array<T, S>::operator[](RValue<Int> index)
 	{
-		llvm::Value *element = LValue::getAddress(index.value);
+		Value *element = LValue::getAddress(index.value);
 
 		return Reference<T>(element);
 	}
@@ -2907,7 +2903,7 @@
 	template<class T>
 	RValue<T> IfThenElse(RValue<Bool> condition, const T &ifTrue, RValue<T> ifFalse)
 	{
-		llvm::Value *trueValue = ifTrue.loadValue();
+		Value *trueValue = ifTrue.loadValue();
 
 		return RValue<T>(Nucleus::createSelect(condition.value, trueValue, ifFalse.value));
 	}
@@ -2915,7 +2911,7 @@
 	template<class T>
 	RValue<T> IfThenElse(RValue<Bool> condition, RValue<T> ifTrue, const T &ifFalse)
 	{
-		llvm::Value *falseValue = ifFalse.loadValue();
+		Value *falseValue = ifFalse.loadValue();
 
 		return RValue<T>(Nucleus::createSelect(condition.value, ifTrue.value, falseValue));
 	}
@@ -2923,8 +2919,8 @@
 	template<class T>
 	RValue<T> IfThenElse(RValue<Bool> condition, const T &ifTrue, const T &ifFalse)
 	{
-		llvm::Value *trueValue = ifTrue.loadValue();
-		llvm::Value *falseValue = ifFalse.loadValue();
+		Value *trueValue = ifTrue.loadValue();
+		Value *falseValue = ifFalse.loadValue();
 
 		return RValue<T>(Nucleus::createSelect(condition.value, trueValue, falseValue));
 	}
@@ -2988,7 +2984,7 @@
 	template<class T>
 	RValue<T> ReinterpretCast(const LValue &var)
 	{
-		llvm::Value *val = var.loadValue();
+		Value *val = var.loadValue();
 
 		return RValue<T>(Nucleus::createBitCast(val, T::getType()));
 	}
diff --git a/src/Shader/PixelProgram.cpp b/src/Shader/PixelProgram.cpp
index e8fd1ed..b1bae30 100644
--- a/src/Shader/PixelProgram.cpp
+++ b/src/Shader/PixelProgram.cpp
@@ -1740,8 +1740,8 @@
 				// FIXME: Encapsulate
 				UInt index = callStack[--stackIndex];
 
-				llvm::Value *value = index.loadValue();
-				llvm::Value *switchInst = Nucleus::createSwitch(value, unreachableBlock, (int)callRetBlock[currentLabel].size());
+				Value *value = index.loadValue();
+				Value *switchInst = Nucleus::createSwitch(value, unreachableBlock, (int)callRetBlock[currentLabel].size());
 
 				for(unsigned int i = 0; i < callRetBlock[currentLabel].size(); i++)
 				{
diff --git a/src/Shader/VertexProgram.cpp b/src/Shader/VertexProgram.cpp
index ba2c79e..5c3f8b4 100644
--- a/src/Shader/VertexProgram.cpp
+++ b/src/Shader/VertexProgram.cpp
@@ -1502,8 +1502,8 @@
 				// FIXME: Encapsulate
 				UInt index = callStack[--stackIndex];
 
-				llvm::Value *value = index.loadValue();
-				llvm::Value *switchInst = Nucleus::createSwitch(value, unreachableBlock, (int)callRetBlock[currentLabel].size());
+				Value *value = index.loadValue();
+				Value *switchInst = Nucleus::createSwitch(value, unreachableBlock, (int)callRetBlock[currentLabel].size());
 
 				for(unsigned int i = 0; i < callRetBlock[currentLabel].size(); i++)
 				{