[PATCH] D38343: [X86] Provide the LSDA pointer with RIP relative addressing if necessary
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 20:23:20 PDT 2017
compnerd accepted this revision.
compnerd added a comment.
This revision is now accepted and ready to land.
LGTM with the comment adjustments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:20108
Twine(MF.getFunctionNumber()));
- return DAG.getNode(X86ISD::Wrapper, dl, VT, DAG.getMCSymbol(S, PtrVT));
+ // getGlobalWrapperKind isn't usable here.
+ return DAG.getNode(Subtarget.isPICStyleRIPRel() ? X86ISD::WrapperRIP
----------------
Im not particularly fond of this comment. Adding a comment that `getGlobalWrapperKind` is not suitable here is fine. But please explain //why// it is unsuitable. Also, it took me a moment to figure out that this is not actually dependent on the PIC mode of compilation, but rather to ensure that the generated code is PIC. A comment to that effect would be nice.
https://reviews.llvm.org/D38343
More information about the llvm-commits
mailing list