summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
AgeCommit message (Collapse)Author
2025-07-26MCSectionXCOFF: Remove classofFangrui Song
The object file format specific derived classes are used in context like MCStreamer and MCObjectTargetWriter where the type is statically known. We don't use isa/dyn_cast and we want to eliminate MCSection::SectionVariant in the base class.
2024-06-28[IR] Don't include Module.h in Analysis.h (NFC) (#97023)Nikita Popov
Replace it with a forward declaration instead. Analysis.h is pulled in by all passes, but not all passes need to access the module.
2023-01-06Cleanup unwind table emission code a bit.James Y Knight
This change removes the `tidyLandingPads` function, which previously had a few responsibilities: 1. Dealing with the deletion of an invoke, after MachineFunction lowering. 2. Dealing with the deletion of a landing pad BB, after MachineFunction lowering. 3. Cleaning up the type-id list generated by `MachineFunction::addLandingPad`. Case 3 has been fixed in the generator, and the others are now handled during table emission. This change also removes `MachineFunction`'s `addCatchTypeInfo`, `addFilterTypeInfo`, and `addCleanup` helper fns, as they had a single caller, and being outlined didn't make it simpler. Finally, as calling `tidyLandingPads` was effectively the only thing `DwarfCFIExceptionBase` did, that class has been eliminated.
2022-11-24[Alignment][NFC] Use Align in MCStreamer::emitValueToAlignmentGuillaume Chatelet
Differential Revision: https://reviews.llvm.org/D138674
2022-11-22Refactor AsmPrinterHandler callbacks. NFCI.James Y Knight
The existing behaviors and callbacks were overlapping and had very confusing semantics: beginBasicBlock/endBasicBlock were not always called, beginFragment/endFragment seemed like they were meant to mean the same thing, but were slightly different, etc. This resulted in confusing semantics, virtual method overloads, and control flow. Remove the above, and replace with new beginBasicBlockSection and endBasicBlockSection callbacks. And document them. These are always called before the first and after the last blocks in a function, even when basic-block-sections are disabled.
2022-06-10[MC] De-capitalize SwitchSection. NFCFangrui Song
Add SwitchSection to return switchSection. The API will be removed soon.
2022-05-05[XCOFF][AIX] Use unique section names for LSDA and EH info sections with ↵Xing Xue
-ffunction-sections Summary: When -ffunction-sections is on, this patch makes the compiler to generate unique LSDA and EH info sections for functions on AIX by appending the function name to the section name as a suffix. This will allow the AIX linker to garbage-collect unused function. Reviewed by: MaskRay, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D124855
2022-03-25[AsmPrinter] AIXException::endFunction - use cast<> instead of dyn_cast<> to ↵Simon Pilgrim
avoid dereference of nullptr The pointer is used immediately inside the getSymbol() call, so assert the cast is correct instead of returning nullptr
2022-03-12Cleanup includes: DebugInfo & CodeGenserge-sans-paille
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121332
2022-01-25[PowerPC][AIX] Override markFunctionEnd()Sean Fertile
During fast-isel calling 'markFunctionEnd' in the base class will call tidyLandingPads. This can cause an issue where we have determined that we need ehinfo and emitted a traceback table with the bits set to indicate that we will be emitting the ehinfo, but the tidying deletes all landing pads. In this case we end up emitting a reference to __ehinfo.N symbol, but not emitting a definition to said symbol and the resulting file fails to assemble. Differential Revision: https://reviews.llvm.org/D117040
2021-06-22[AIX][XCOFF] generate eh_info when vector registers are saved according to ↵zhijian
the traceback table. Summary: generate eh_info when vector registers are saved according to the traceback table. struct eh_info_t { unsigned version; /* EH info version 0 */ #if defined(64BIT) char _pad[4]; /* padding */ #endif unsigned long lsda; /* Pointer to Language Specific Data Area */ unsigned long personality; /* Pointer to the personality routine */ }; the value of lsda and personality is zero when the number of vector registers saved is large zero and there is not personality of the function Reviewers: Jason Liu Differential Revision: https://reviews.llvm.org/D103651
2021-04-29[XCOFF] Handle the case when personality routine is an aliasjasonliu
Summary: Personality routine could be an alias to another personality routine. Fix the situation when we compile the file that contains the personality routine and the file also have functions that need to refer to the personality routine. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D101401
2020-12-16[XCOFF][AIX] Emit EH information in traceback tablediggerlin
SUMMARY: In order for the runtime on AIX to find the compact unwind section(EHInfo table), we would need to set the following on the traceback table: The 6th byte's longtbtable field to true to signal there is an Extended TB Table Flag. The Extended TB Table Flag to be 0x08 to signal there is an exception handling info presents. Emit the offset between ehinfo TC entry and TOC base after all other optional portions of traceback table. The patch is authored by Jason Liu. Reviewers: David Tenty, Digger Lin Differential Revision: https://reviews.llvm.org/D92766
2020-12-02[XCOFF][AIX] Generate LSDA data and compact unwind section on AIXjasonliu
Summary: AIX uses the existing EH infrastructure in clang and llvm. The major differences would be 1. AIX do not have CFI instructions. 2. AIX uses a new personality routine, named __xlcxx_personality_v1. It doesn't use the GCC personality rountine, because the interoperability is not there yet on AIX. 3. AIX do not use eh_frame sections. Instead, it would use a eh_info section (compat unwind section) to store the information about personality routine and LSDA data address. Reviewed By: daltenty, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D91455