[Flang] Add a factory class for creating Complex Ops
authorKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 18 Nov 2021 16:43:16 +0000 (16:43 +0000)
committerKiran Chandramohan <kiran.chandramohan@arm.com>
Thu, 18 Nov 2021 16:55:35 +0000 (16:55 +0000)
commita1f9bd32c57649b9f7695fa6564f3f92f09a1785
tree5cf44bc09c8383f35b0d99aebc311b999dad4544
parent45e102a173680fd3c90def79a7f0766ed2786ff0
[Flang] Add a factory class for creating Complex Ops

Use the factory class in the FIRBuilder.
Add unit tests for the factory class function and the convert function
of the Complex class.

Reviewed By: clementval, rovka

Differential Revision: https://reviews.llvm.org/D114125

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/include/flang/Optimizer/Builder/Complex.h [new file with mode: 0644]
flang/include/flang/Optimizer/Builder/FIRBuilder.h
flang/lib/Optimizer/Builder/CMakeLists.txt
flang/lib/Optimizer/Builder/Complex.cpp [new file with mode: 0644]
flang/lib/Optimizer/Builder/FIRBuilder.cpp
flang/unittests/Optimizer/Builder/ComplexTest.cpp [new file with mode: 0644]
flang/unittests/Optimizer/CMakeLists.txt