[all-commits] [llvm/llvm-project] bb177e: [flang][driver] Re-organise the code-gen actions (...
Andrzej Warzyński via All-commits
all-commits at lists.llvm.org
Thu May 5 07:07:01 PDT 2022
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2022-05-05 (Thu, 05 May 2022)
[flang][driver] Re-organise the code-gen actions (nfc)
All frontend actions that generate code (MLIR, LLVM IR/BC,
Assembly/Object Code) are re-factored as essentially one action,
`CodeGenAction`, with minor specialisations. To facilate all this,
`CodeGenAction` is extended to hold `TargetMachine` and backend action
type (MLIR vs LLVM IR vs LLVM BC vs Assembly vs Object Code).
`CodeGenAction` is no longer a pure abstract class and the
corresponding `ExecuteAction` is implemented so that it covers all use
cases. All this allows a much better code re-use.
Key functionality is extracted into some helpful hooks:
I hope that this clarifies the overall structure. I suspect that we may
need to revisit this again as the functionality grows in complexity.
Differential Revision: https://reviews.llvm.org/D124665
More information about the All-commits