This patch enable assembly output of local commons for AIX using .lcomm
directives. Adds a EmitXCOFFLocalCommonSymbol to MCStreamer so we can emit the
AIX version of .lcomm assembly directives which include a csect name. Handle the
case of BSS locals in PPCAIXAsmPrinter by using EmitXCOFFLocalCommonSymbol. Adds
a test for generating .lcomm on AIX Targets.
Details
- Reviewers
cebowleratibm hubert.reinterpretcast Xiangling_L jasonliu sfertile - Commits
- rG9bf01e53a39f: [NFC][AIX] Use assert instead of llvm_unreachable
rL368720: [NFC][AIX] Use assert instead of llvm_unreachable
rG8558aac82cd2: Enable assembly output of local commons for AIX
rL368306: Enable assembly output of local commons for AIX
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | ||
---|---|---|
1829 ↗ | (On Diff #210190) | Knowing how the AIX linker treats csects with symbol type XTY_CM, should this be limited to Kind.isLocalBSS() || Kind.isCommon()? |
llvm/lib/MC/MCSectionXCOFF.cpp | ||
31 ↗ | (On Diff #210190) | ditto. |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
1662 ↗ | (On Diff #210190) | I think this also should be limited to isLocalBSS(), we can relax to allowing all BSS in a follow on patch that adds appropriate testing. |
llvm/lib/MC/MCSectionXCOFF.cpp | ||
---|---|---|
35 ↗ | (On Diff #210190) | "Unsupported" is ambiguous. This patch needs a rebase. During/after the rebase we need to figure out what the llvm_unreachables should be. That is, the message text needs to clearly express the rationale so that the determination of whether llvm_unreachable is the appropriate mechanism can be done. |
- Add missing other cases of isBSSLocal
- Update unreachable error message to reflect this is an internal error
LGTM.
llvm/lib/MC/MCSectionXCOFF.cpp | ||
---|---|---|
34 ↗ | (On Diff #213998) | minor nit: I think we could shorten common/bss --> '.bss' . |
llvm/trunk/include/llvm/MC/MCStreamer.h | ||
---|---|---|
547 | Spacing issue. | |
llvm/trunk/lib/MC/MCAsmStreamer.cpp | ||
762 | Minor nit: Compound adjective "XCOFF-specific" with a hyphen. | |
768 | Minor nit: Have a period at the end of sentences. | |
769 | Minor nit: Capitalize the first word of a sentence. | |
llvm/trunk/lib/MC/MCSectionXCOFF.cpp | ||
34 | I'm not sure that the "unreachables" (in the function currently, not just this one) are buying us enough to warrant the overhead of thinking about them. Generically, the llvm_unreachables in this function are of the type "we are about to do something, and given the check, what we are about to do is not compatible with the input". We believe this to be a error in the internal state of the program that we are not expecting to happen, so assert is okay. | |
llvm/trunk/lib/MC/MCXCOFFStreamer.cpp | ||
63 | "Not implemented" is not a case where llvm_unreachable is appropriate. Either nothing calls this and it might as well be report_fatal_error, or something does call this and it is probably not the caller's fault that this is unimplemented (as it should be report_fatal_error). | |
65 | Missing newline at end of file. Windows editor woes? |
Spacing issue.