diff options
author | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2022-04-22 09:07:31 +0000 |
---|---|---|
committer | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2022-05-05 14:05:06 +0000 |
commit | bb177edc44f412f368c4c5983df15b7364fc3122 (patch) | |
tree | 18d6502cb3a5498d3624e2ecfcb3fd44393f4acf /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | c894e85fc64dd8d83b460de81080fff93c5ca334 (diff) | |
download | llvm-bb177edc44f412f368c4c5983df15b7364fc3122.zip llvm-bb177edc44f412f368c4c5983df15b7364fc3122.tar.gz llvm-bb177edc44f412f368c4c5983df15b7364fc3122.tar.bz2 |
[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:
* `SetUpTargetMachine`
* `GetOutputStream`
* `EmitObjectCodeHelper`
* `EmitBCHelper`
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
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions