This patch tries to emit the correct alignment result for both object file generation path and assembly path.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/MC/MCXCOFFStreamer.cpp | ||
---|---|---|
66 | No, common symbol must be a csect, so it should have represented csect. |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
1723 | I'm not clear why we need this check here? Trying to SelectionSectionForGlobal will already give us an error if either Function/Data sections are on. Is there a unique reason that this approach won't work with data-sections? If so, a comment is probably in order. |
llvm/test/CodeGen/PowerPC/aix-readonly-with-relocation.ll | ||
---|---|---|
8 | Should the style be consistent between .csect and .comm over the use of spaces after the comma? |
llvm/lib/MC/MCXCOFFStreamer.cpp | ||
---|---|---|
63 | Suggest newline before the comment. | |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
1724 | Even if data sections are used, explicitly-specified sections could be used to group variables together. | |
1742 | s/know csect's alignment upfront/know, up front, the alignment of csects/; | |
1743 | Add "a" before ".csect directive". | |
1748 | Use the immediate base class even if it does not currently override this function. | |
llvm/test/CodeGen/PowerPC/test_func_desc.ll | ||
6 | It seems we have nothing to verify alignment of functions: __attribute__((__aligned__(32))) int bar() { return 0; } |
Add in support for function alignment.
Move the logic from doFinialization to doInitialization because ".text" csect is emitted very early.
llvm/test/CodeGen/PowerPC/aix-readonly-with-relocation.ll | ||
---|---|---|
8 | I agree the style should be consistent for the use of spaces after comma. |
LGTM with minor nits. Thanks.
llvm/include/llvm/MC/MCSectionXCOFF.h | ||
---|---|---|
51 | s/Csect/A csect/; | |
llvm/lib/MC/MCXCOFFStreamer.cpp | ||
64 | s/value/values/; | |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
1723 | LLVM naming convention: Result. | |
llvm/test/CodeGen/PowerPC/aix-readonly-with-relocation.ll | ||
8 | Okay; thanks. | |
llvm/test/CodeGen/aix-func-align.ll | ||
2 | s/the csect contains/a csect containing/; | |
11 | Indent the FileCheck invocation. From D78929, it looks like two spaces. |
Fixed a build break introduced by this change in https://github.com/llvm/llvm-project/commit/a1b04aaea210a9a9fbe0cd9dd7f874e12fa97585
I should've put aix-func-align.ll in the PowerPC sub-directive.
s/Csect/A csect/;
Add "csects" after "undefined symbol".