This is an archive of the discontinued LLVM Phabricator instance.

Add simple return instruction to fast instruction selector
AbandonedPublic

Authored by dsanders on Apr 16 2014, 3:01 PM.

Details

Reviewers
rkotler
Summary

This will work for functions like:

void foo() {

return;

}

Diff Detail

Event Timeline

The code looks good but as you say it needs a testcase before commit. I've noted one area where I'm concerned about the long term effect it may have.

While I think of it: If you are making new FastISel specific tests, could you put them in a subdirectory of CodeGen? In the very long run I'd like the tests to be more organised than they currently are since it's hard to tell what we have/haven't covered.

You can make a patch depend on another using the optional argument to 'arc diff' (e.g. 'arc diff HEAD^' to upload the last commit) and writing 'Depends on D3387' in the summary field. This stops the individual deltas growing as patches are queued up.

lib/Target/Mips/MipsFastISel.cpp
44–46

I still agree that at first we only want to support this particular case to keep the size of the task manageable but I'm not sure I'm keen on this coarse-grain test. I suspect it will easy to accidentally rely on this guard rather than adding the appropriate ones to the right places in TargetSelectInstruction and its callee's. If that does happen then we may find it difficult to relax this condition later.

51

Is there a reason for the 'Mips' prefix here?

dsanders commandeered this revision.Apr 23 2014, 9:02 AM
dsanders edited reviewers, added: rkotler; removed: dsanders.

Superseded by D3430

The new phabricator doesn't allow closing a patch that isn't accepted commandeering it so I can abandon it instead.

dsanders abandoned this revision.Apr 23 2014, 9:02 AM