This patch teaches LTOCodeGenerator to call into the AIX system assembler to generate object files. This is in contrast to the approach taken on other platforms, where the LTOCodeGenerate calls the integrated assembler to generate object files. We need to rely on the system assembler because the integrated assembler is incomplete at the moment.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
30 ms | x64 debian > LLVM.tools/llvm-lto::aix.ll |
Event Timeline
llvm/lib/LTO/LTOCodeGenerator.cpp | ||
---|---|---|
119 | We should either introduce the savetemps option in a separate patch (my preference), or implement it fully by calling Config.addSaveTemps in the LTOCodeGenerator constructor. |
llvm/lib/LTO/LTOCodeGenerator.cpp | ||
---|---|---|
120 | Drop the default value cl::init(false) | |
246 | The code is AIX specific. The function should be named so instead of pretending it to be generic and used by other targets. | |
255 | The code is AIX specific. The function should be named so instead of pretending it to be generic and used by other targets. | |
260 | Avoid getpid. See createTemporaryFile in Support/FileSystem.h |
Addressing code review:
- The lto-save-temp option is removed. We will add that later with a different patch.
- The newly added AIX specific functions are explicitly named.
- Minor changes to variable names (runSystemAssembler(SmallString<128> &Name) -> runSystemAssembler(SmallString<128> &AssemblyFile)) and removing unnecessary comments.
llvm/lib/LTO/LTOCodeGenerator.cpp | ||
---|---|---|
279 | Too many blank lines which don't improve readability. The function has some small number of logically inherent units and within a unit a blank line may be unneeded. |
Addressing code review comments and fixing a test failure on Linux. I will land patch once the pre-commit CI finishes.
Thanks for the review!
We should either introduce the savetemps option in a separate patch (my preference), or implement it fully by calling Config.addSaveTemps in the LTOCodeGenerator constructor.
Also, the option spelling should be -save-temps to match the existing option available in other tools.