Without this change, names start with 'L' will get created as temporary symbol in MCContext::createSymbol.
Some other potential prefix considered:
.L, does not work for AIX, as a function start with L will end up with .L as prefix for its function entry point.
..L could work, but it does not play well with the convention on AIX that anything start with '.' are considered as entry point.
L. could work, but not sure if it's safe enough, as it's possible to have suffixes like .something append to a plain L, giving L.something which is not necessarily a temporary.
That's why we picked L.. for now.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/MC/MCAsmInfoXCOFF.cpp | ||
---|---|---|
18 | Since . gets appended for function entry points, .L is not all that "reserved". I am not sure that it makes sense to use .L except for inertia. It seems adding the dot after the L would work better? |
llvm/lib/MC/MCAsmInfoXCOFF.cpp | ||
---|---|---|
18 | *"prefixed to" |
llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll | ||
---|---|---|
72 | What exactly is a "temporary" in terms of the object file or the assembly? The TOC entry here clearly would have a symbol table entry. |
llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll | ||
---|---|---|
72 | I think LLVM treat the "temporary" as compiler created symbol. |
llvm/test/CodeGen/PowerPC/aix-lower-block-address.ll | ||
---|---|---|
72 | In terms of object file generation we actually only care about the correctness of symbols's temporary status for external symbols and labels, because those info are coming through MCSymbol (others are from MCSection) . |
llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll | ||
---|---|---|
181–182 | Maybe as a separate patch, should we update the test cases to use a different "mangling mode" with a matching private global prefix? |
llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll | ||
---|---|---|
181–182 | Yes, we should make it consistent in a separate patch. |
Since . gets appended for function entry points, .L is not all that "reserved". I am not sure that it makes sense to use .L except for inertia. It seems adding the dot after the L would work better?