[fir] Add IfBuilder and utility functions
authorValentin Clement <clementval@gmail.com>
Sun, 17 Oct 2021 18:54:49 +0000 (20:54 +0200)
committerValentin Clement <clementval@gmail.com>
Sun, 17 Oct 2021 18:55:41 +0000 (20:55 +0200)
commitf17f694a0fcf8eae7de4e051678e47f15d7855ff
tree8a386045114c69be7cc736c9806e170ff512356a
parentdbf5dc89306964bb613463cbec1637c6f720fbed
[fir] Add IfBuilder and utility functions

In order to reduct the size of D111337. The IfBuilder and the two
utility functions genIsNotNull and genIsNull have been extracted in
a separate patch with dedicated unittests.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: Leporacanthicus

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

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