Split complex arithmetic codegen out from aggregate codegen.
This means that we get rid of tons of intermediate allocas. For
example:
void foo(double _Complex a, double _Complex b) {
a = b+a+a;
}
this used to have 4 temporary allocas, now it has zero of them.
This also simplifies the individual visitor methods because they
now can all operate on real/imag pairs instead of having to
load/store all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41217 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CodeGenFunction.h b/CodeGen/CodeGenFunction.h
index ca391b0..47bdbac 100644
--- a/CodeGen/CodeGenFunction.h
+++ b/CodeGen/CodeGenFunction.h
@@ -413,6 +413,10 @@
/// aggregate type. The result is computed into DestPtr. Note that if
/// DestPtr is null, the value of the aggregate expression is not needed.
void EmitAggExpr(const Expr *E, llvm::Value *DestPtr, bool VolatileDest);
+
+ /// EmitComplexExpr - Emit the computation of the specified expression of
+ /// complex type, ignoring the result.
+ void EmitComplexExpr(const Expr *E);
};
} // end namespace CodeGen
} // end namespace clang