This is an archive of the discontinued LLVM Phabricator instance.

[MC] Use COMDAT for LSDA only if IR comdat type is any
ClosedPublic

Authored by phosek on Apr 20 2021, 4:17 PM.

Diff Detail

Event Timeline

phosek created this revision.Apr 20 2021, 4:17 PM
phosek requested review of this revision.Apr 20 2021, 4:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 4:17 PM

Test?

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
897

IsComdat -> IsComdatAny

phosek updated this revision to Diff 339113.Apr 20 2021, 11:54 PM
phosek marked an inline comment as done.Apr 20 2021, 11:54 PM

Test?

Added.

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
897

We use IsComdat elsewhere in this file so I'd prefer to keep them consistent.

MaskRay added inline comments.Apr 21 2021, 9:41 AM
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
897

But the name is now confusing. This now specifically refers to Comdat::Any. Readers could interpret IsComdat as any comdat kind.

llvm/test/CodeGen/X86/elf-group-gcc_except_table.ll
1 ↗(On Diff #339113)

This can be placed into gcc_except_table-multi.ll

phosek updated this revision to Diff 339326.Apr 21 2021, 11:19 AM
phosek marked 2 inline comments as done.
phosek added inline comments.
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
897

That name is referring to the name of the getELFSection argument which is called IsComdat, not to its value. I'm fine changing the name if you want, but I'd prefer doing it consistently across the entire file in a follow up change.

MaskRay accepted this revision.Apr 21 2021, 12:09 PM

Thanks!

This revision is now accepted and ready to land.Apr 21 2021, 12:09 PM
This revision was landed with ongoing or failed builds.Apr 21 2021, 2:41 PM
This revision was automatically updated to reflect the committed changes.