In order to support SJLJ exception, implement llvm.eh.sjlj.lsda first.
Add regression test also.
Details
- Reviewers
simoll k-ishizaka - Commits
- rG2654f33c47f4: [VE] Support llvm.eh.sjlj.lsda
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/VE/VEISelLowering.cpp | ||
---|---|---|
1541 | I'm not sure about it. Do you have any strategies to decide either Op.getValueType() or TLI.getPointerTy()? All other architectures use TLI.getPointerTy() to implement lsda. It's really difficult to decide it with certain reasons. |
Update following suggestions. Use TLI.getPoitnerTy() this time since
lsda expansion uses machine value type (MVT) instead of value type
structure (EVT) here. Using EVT may require some conversions later.
llvm/lib/Target/VE/VEISelLowering.cpp | ||
---|---|---|
1541 | When isel calls LowerOperation, all types are MVTs because all EVTs have been legalized. Op.getValueType() should give you the exact same MVT as TLI.getPointerTy(). |
llvm/lib/Target/VE/VEISelLowering.cpp | ||
---|---|---|
1541 | I don't understand the point of this. If you say re-using Op's type is better, I think it may be true. Then, I watch other architectures using TLI.getPointerTy a lot, I think following others may be better. Do you know why other architectures use TLI.getPoitnerTy so often? For historical reason or something? Anyway, I change it as you suggested. |
llvm/lib/Target/VE/VEISelLowering.cpp | ||
---|---|---|
1541 | Yeah, it really is more a bikeshedding discussion given how rarely this is called in practice.. the point of using Op.getValueType() is that it's non-virtual and the MVT object already exists. TLI.getPointerTy() is virtual and the default implementation constructs the MVT from scratch every time. |
llvm/lib/Target/VE/VEISelLowering.cpp | ||
---|---|---|
1541 | virtual. That makes sense to not using it. |
I suppose you could re-use the type of Op here