In fact this default implementation should be the only implementation,
keep it virtual for now to accomodate targets that don't model flags
correctly.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I did not touch HexagonInstrInfo::isTailCall() here as it wasn't immediately obvious whether the flags are correct there and the default implementation would work. Some target maintainer should double check and if so maybe we can get rid of the complete callback.
Hexagon has over 100 different opcodes for branches, and each of them can be used as a tail call. We are not going to invent 100+ phony opcodes just to put flags on them.
Yes I somewhat expected this answer and that we will end up in a similar discussion as in http://llvm.org/PR31960. So let's keep the callback (and the comment about wrong flags).
LGTM -- I suspect this doesn't break the compiler-rt tests for XRay?
include/llvm/Target/TargetInstrInfo.h | ||
---|---|---|
1499–1501 ↗ | (On Diff #91048) | Can we make this comment more direct? Something like: "Override this method for targets where tail calls are not always both return and call instructions." |
Can I even run them on a mac? I also don't have PPC hardware available. But we surely have buildbots for that (and if not I blame someone else for the lack of bots).
include/llvm/Target/TargetInstrInfo.h | ||
---|---|---|
1499–1501 ↗ | (On Diff #91048) | Ok how about "Override this method on targets that do not properly set MCID::Return and MCID::Call on tail call instructions." to not give the impression that this is recommended. |
Nope, the XRay runtime doesn't work in MacOS yet.
There are bots that run these. I'm not sure if you want to wait to find out if they break. :)
include/llvm/Target/TargetInstrInfo.h | ||
---|---|---|
1499–1501 ↗ | (On Diff #91048) | That's better I think. |
Unless you run them for me that's all I can do. Reverts are cheap (breaking the build isn't so nice but as long as we don't have pre-commit checking in llvm...).