Page MenuHomePhabricator

[globalisel][tblgen] Add support for iPTR and implement am_unscaled* and am_indexed*
ClosedPublic

Authored by dsanders on Sep 5 2017, 1:51 AM.

Details

Summary

iPTR is a pointer of subtarget-specific size to any address space. Therefore
type checks on this size derive the SizeInBits from a subtarget hook.

At this point, we can import the simplests G_LOAD rules and select load
instructions using them. Further patches will support for the predicates to
enable additional loads as well as the stores.

Depends on D37457

Event Timeline

dsanders created this revision.Sep 5 2017, 1:51 AM
dsanders updated this revision to Diff 118463.Oct 10 2017, 1:31 PM

Rebase and ping

qcolombet accepted this revision.Oct 12 2017, 12:55 PM

Looks good modulo what I said in https://reviews.llvm.org/D37457 regarding GIM_CheckPointerToAny

include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
259

Don't we have a more direct way to access the target from the selector?
In particular something that doesn't depend on State.

(This is not wrong, it just looks weird.)

utils/TableGen/GlobalISelEmitter.cpp
977

Looks like this part could be already independently committed.

This revision is now accepted and ready to land.Oct 12 2017, 12:55 PM
dsanders added inline comments.Oct 12 2017, 2:25 PM
include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
259

Not that I know of, but it would probably look better if I assigned it to an MF variable first.

dsanders closed this revision.Oct 15 2017, 6:16 PM