This is an archive of the discontinued LLVM Phabricator instance.

[Nios2] adding subtarget, basic infrastructure for frame, instructions and registers
ClosedPublic

Authored by AndreiGrischenko on Aug 29 2017, 2:47 AM.

Details

Summary

Hi,

This is the second minimal patch keeping Nios2 target buildable. I'm adding subtarget here and other stuff for frame lowering, instruction, register information methods. I do not add any test cases, as still there are missing parts like DAG selector and assembly printing. I plan to include them into the next patch.

Thanks,
Andrei.

Diff Detail

Event Timeline

craig.topper added inline comments.Sep 8 2017, 9:50 AM
llvm/lib/Target/Nios2/Nios2RegisterInfo.cpp
35

Use nullptr instead of NULL

llvm/lib/Target/Nios2/Nios2Subtarget.cpp
45

This doesn't look like what other targets do. I don't see any other target looking for "help".

I made necessary fixes after Craig's comments.

Hi,

I've prepared another two patches, that include DAG selector, assembly printing and all NiosII instructions. But it makes sense to upload them for review after I commit the current with Subtarget. Could you please take a look?

Thanks,
Andrie.

llvm/lib/Target/Nios2/Nios2RegisterInfo.cpp
35

OK, thanks.

llvm/lib/Target/Nios2/Nios2Subtarget.cpp
45

Yes, thanks. I simplified this.

This revision is now accepted and ready to land.Sep 18 2017, 12:09 PM
This revision was automatically updated to reflect the committed changes.
echristo added inline comments.
llvm/trunk/lib/Target/Nios2/Nios2TargetMachine.h
22 ↗(On Diff #115826)

Please don't have a default subtarget. There's no reason to do so and it just confuses things.

Thanks Eric for your help.

llvm/trunk/lib/Target/Nios2/Nios2TargetMachine.h
22 ↗(On Diff #115826)

OK, thanks for the comment. I planned to address it in the next patch.