When lowering llvm::stackprotect intrinsic, the SDAG implementation
checks function useLoadStackGuardNode() to either create a
LOAD_STACK_GUARD node or use the first argument of the intrinsic.
This check is not present in the IRTranslator, which results in always
generating a LOAD_STACK_GUARD even if the target does not support it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | ||
---|---|---|
2083 | Sorry, do you mean that getStackGuard() should create the virtual register? Currently it uses the register passed as argument. |
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | ||
---|---|---|
2083 | Yes. These APIs that take output registers are a bit awkward |
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | ||
---|---|---|
2083 | That is not as trivial as it seems. |
Don't see why getStackGuard doesn't just return the virtual register it creates itself