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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h | ||
---|---|---|
291 | Fix typo. | |
llvm/lib/CodeGen/AsmPrinter/AIXException.cpp | ||
43 | Should we also try to use the explicit section name if the function has one? | |
44 | Fix option name. | |
53 | I think the cast is not necessary. | |
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | ||
2571 | Should we also try to use the explicit section name if the function has one? |
llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h | ||
---|---|---|
291 | Fixed, thanks! | |
llvm/lib/CodeGen/AsmPrinter/AIXException.cpp | ||
43 | I am inclined to use the function name because this is consistent with the behavior on Linux. | |
44 | Fixed, thanks! | |
53 | Removed the unnecessary cast, thanks! | |
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | ||
2571 | I am inclined to use the function name because this is consistent with the behavior on Linux. |
LGTM; however, might want to wait a bit to see if other reviewers have comments.
llvm/lib/CodeGen/AsmPrinter/AIXException.cpp | ||
---|---|---|
43 | Yes, it does seem that the explicit section name is not used by Linux (with and without -ffunction-sections). | |
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | ||
2571 | Yes, it does seem that the explicit section name is not used by Linux (with and without -ffunction-sections). |
Fix typo.