Lines Matching refs:RValue
99 RValue convertTempToRValue(llvm::Value *addr,
104 void emitCopyIntoMemory(RValue rvalue, LValue lvalue) const;
117 llvm::Value *materializeRValue(RValue rvalue) const;
124 static RValue emitAtomicLibcall(CodeGenFunction &CGF,
469 Args.add(RValue::get(Val), ValTy);
472 Args.add(RValue::get(CGF.EmitCastToVoidPtr(Val)),
477 RValue CodeGenFunction::EmitAtomicExpr(AtomicExpr *E, llvm::Value *Dest) {
499 return RValue::get(nullptr);
609 Args.add(RValue::get(llvm::ConstantInt::get(SizeTy, Size)),
613 Args.add(RValue::get(EmitCastToVoidPtr(Ptr)), getContext().VoidPtrTy);
635 Args.add(RValue::get(EmitCastToVoidPtr(Val1)), getContext().VoidPtrTy);
638 Args.add(RValue::get(Order), getContext().IntTy);
718 Args.add(RValue::get(EmitCastToVoidPtr(Dest)),
723 Args.add(RValue::get(Order),
731 RValue Res = EmitCall(FuncInfo, Func, ReturnValueSlot(), Args);
735 return RValue::get(nullptr);
790 return RValue::get(nullptr);
858 return RValue::get(nullptr);
870 RValue AtomicInfo::convertTempToRValue(llvm::Value *addr,
887 RValue CodeGenFunction::EmitAtomicLoad(LValue src, SourceLocation loc,
903 args.add(RValue::get(atomics.getAtomicSizeValue()),
905 args.add(RValue::get(EmitCastToVoidPtr(src.getAddress())),
907 args.add(RValue::get(EmitCastToVoidPtr(tempAddr)),
909 args.add(RValue::get(llvm::ConstantInt::get(
936 return RValue::getAggregate(nullptr, false);
950 return RValue::get(result);
980 void AtomicInfo::emitCopyIntoMemory(RValue rvalue, LValue dest) const {
981 // If we have an r-value, the rvalue should be of the atomic type,
984 if (rvalue.isAggregate()) {
986 rvalue.getAggregateAddr(),
988 (rvalue.isVolatileQualified()
1002 // Okay, store the rvalue in.
1003 if (rvalue.isScalar()) {
1004 CGF.EmitStoreOfScalar(rvalue.getScalarVal(), dest, /*init*/ true);
1006 CGF.EmitStoreOfComplex(rvalue.getComplexVal(), dest, /*init*/ true);
1013 llvm::Value *AtomicInfo::materializeRValue(RValue rvalue) const {
1016 if (rvalue.isAggregate())
1017 return rvalue.getAggregateAddr();
1022 emitCopyIntoMemory(rvalue, tempLV);
1031 void CodeGenFunction::EmitAtomicStore(RValue rvalue, LValue dest, bool isInit) {
1034 assert(!rvalue.isAggregate() ||
1035 rvalue.getAggregateAddr()->getType()->getPointerElementType()
1042 atomics.emitCopyIntoMemory(rvalue, dest);
1049 llvm::Value *srcAddr = atomics.materializeRValue(rvalue);
1053 args.add(RValue::get(atomics.getAtomicSizeValue()),
1055 args.add(RValue::get(EmitCastToVoidPtr(dest.getAddress())),
1057 args.add(RValue::get(EmitCastToVoidPtr(srcAddr)),
1059 args.add(RValue::get(llvm::ConstantInt::get(
1071 if (rvalue.isScalar() && !atomics.hasPadding()) {
1072 llvm::Value *value = rvalue.getScalarVal();
1088 llvm::Value *addr = atomics.materializeRValue(rvalue);
1117 atomics.emitCopyIntoMemory(RValue::get(value), dest);
1123 atomics.emitCopyIntoMemory(RValue::getComplex(value), dest);