Details
Diff Detail
Event Timeline
Hi Martin,
Do I understand correctly that this patch both has code to disable globalisel when targeting windows, and also when a function is marked as "dllimport"?
Wouldn't one of these checks be enough?
From your description, I would have thought that just the "dllimport" check would be enough?
I'm probably missing quite a bit of background info here - but I thought I'd ask to understand this better.
Thanks,
Kristof
Just disabling globalisel for individual function calls to dllimport functions would indeed be the most elegant solution. However, the "return false;" in translateCall doesn't cause such fallbacking, but insteads makes the build abort with this error message:
LLVM ERROR: unable to translate instruction: call (in function: call_external)
So that part is kept as a reminder/check to whoever manually enables globalisel on windows, that the output isn't right in those cases. The generic disabling makes sure we don't trigger this and don't error out. If we on the other hand could do partial fallbacks to SelectionDAG for those function calls, that'd be even better.
Actually, this was just a result of me testing back and forth with it disabled in general and enabled via the -global-isel switch. If enabled automatically, it silently falls back and doesn't error out. Will update the patch accordingly.
LGTM from a GISel point of view, I can't say I understand Windows enough to say the tests are right.