This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Add an -fexperimental-isel driver option to enable/disable GlobalISel
ClosedPublic

Authored by aemerson on Jan 18 2018, 5:42 PM.

Diff Detail

Repository
rC Clang

Event Timeline

aemerson created this revision.Jan 18 2018, 5:42 PM
aemerson updated this revision to Diff 130530.Jan 18 2018, 5:48 PM
qcolombet added inline comments.Jan 19 2018, 10:16 AM
lib/Driver/ToolChains/Clang.cpp
4703

I think that it would be useful to also set -global-isel-abort=2, so that users can report problem early.

What do you think?

4703

Should we have some kind of "target validation"?
What I'd like to avoid is people trying the new allocator on unsupported target (as in the GISel base classes are not present) that would just crash the compiler.

Alternatively, we could fix the backend to fallback gracefully/abort properly in those situation.
Right now I believe we would get a segfault on RegisterBankInfo or something along those lines.

aemerson added inline comments.Jan 22 2018, 3:18 AM
lib/Driver/ToolChains/Clang.cpp
4703

I think that it would be useful to also set -global-isel-abort=2, so that users can report problem early.

What do you think?

Yes that makes sense, although should we ignore it for ARM64 O0 since we will officially support it?

Should we have some kind of "target validation"?
What I'd like to avoid is people trying the new allocator on unsupported target (as in the GISel base classes are not present) that would just crash the compiler.

Perhaps a warning like "GlobalISel support is incomplete for [target]"? I don't know the GISel status for other targets.

qcolombet added inline comments.Jan 23 2018, 10:49 AM
lib/Driver/ToolChains/Clang.cpp
4703

Yes that makes sense, although should we ignore it for ARM64 O0 since we will officially support it?

Sounds sensible. We can advertise the remark option if people want to know what is going on.

aemerson updated this revision to Diff 131191.Jan 23 2018, 7:58 PM

I've added two kinds of warnings, one for targets which have incomplete GISel support, and another for unsupported optimisation levels (for ARM64 -O{1,2,3,s,z}).

This revision is now accepted and ready to land.Jan 25 2018, 1:29 PM
This revision was automatically updated to reflect the committed changes.