This is the target-specific part of http://reviews.llvm.org/D15340
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
10055 ↗ | (On Diff #42199) | Do you need to emit any kind of CFI pseudo-instructions for these so that unwinding works? |
lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
10055 ↗ | (On Diff #42199) | This is a good point. I think we should but I am not so sure. Maybe Nick is a better person to answer the question on Darwin platform. Specific to C++-style TLS access functions, they should be nounwind. Throwing an exception from the initializer of a thread-local variable is defined to immediately result in a call to std::terminate(); there’s no legal way for unwinding to actually leave such a function. (quote from John McCall) :] |
lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
10055 ↗ | (On Diff #42199) | In that case, please add a comment about this. If someone goes to generalize this later (or port it to another target), it should be obvious that this is something they'll need to think about. |
Addressing Hal's comment. Patch is also updated to work with the target independent portion (http://reviews.llvm.org/D15340).
Hi Manman,
Thanks for your patience.
Here are a few comments.
Cheers,
-Quentin
lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
3286 ↗ | (On Diff #42539) | Why is this using a pointer type instead of an i64? |
3287 ↗ | (On Diff #42539) | No need for {} |
3290 ↗ | (On Diff #42539) | Ditto. |
3293 ↗ | (On Diff #42539) | Was this clang-formated? |
10069 ↗ | (On Diff #42539) | Could you assert that the MachineFunction have the nounwind attribute? |
lib/Target/AArch64/AArch64ISelLowering.h | ||
392 ↗ | (On Diff #42539) | I think we should change the hook to take a MachineFunction. |
lib/Target/AArch64/AArch64MachineFunctionInfo.h | ||
75 ↗ | (On Diff #42539) | Add a comment for that field. |
lib/Target/AArch64/AArch64RegisterInfo.cpp | ||
61 ↗ | (On Diff #42539) | Isn’t this redundant with the isSplitCSR check? |
test/CodeGen/AArch64/cxx-tlscc.ll | ||
50 ↗ | (On Diff #42539) | Nice! :) |
Thanks Quentin for reviewing the patch!
Addressing his comments with the updated patch.
Addressing review comments,
Cheers,
Manman
lib/Target/AArch64/AArch64RegisterInfo.cpp | ||
---|---|---|
61 ↗ | (On Diff #42893) | If we are going to support other calling conventions with split CSR, it will be listed here with "else if", so we know which corresponding ViaCopy_SaveList to use. Similarly in getCalleeSavedRegs above. |