This is an archive of the discontinued LLVM Phabricator instance.

[RISCV 14/n] Support for function calls
ClosedPublic

Authored by asb on Feb 14 2017, 5:38 AM.

Details

Summary

No support for varargs, but simple function call examples will generate something sensible.

Diff Detail

Event Timeline

asb created this revision.Feb 14 2017, 5:38 AM
Razer6 added a subscriber: Razer6.Feb 14 2017, 6:28 AM
asb updated this revision to Diff 110356.Aug 9 2017, 4:30 AM

Updates:

  • Error when encountering a byval argument (support added in a later patch)
  • Make better use of range-based for loops
  • Reflect upstream changes to ADJCALLSTACKDOWN in rL302527
majnemer added inline comments.
lib/Target/RISCV/RISCVISelLowering.cpp
170

report_fatal_error

186

report_fatal_error

207–210

Please consistently brace.

212

report_fatal_error

227

report_fatal_error

asb updated this revision to Diff 111633.Aug 18 2017, 1:55 AM
asb marked 5 inline comments as done.

Address review comments from @majnemer (thanks!).

asb updated this revision to Diff 112452.Aug 23 2017, 2:26 PM

Instruction definitions and patterns have been split, as discussed in http://lists.llvm.org/pipermail/llvm-dev/2017-August/116635.html

apazos added a subscriber: apazos.Aug 25 2017, 1:53 PM
apazos added inline comments.
lib/Target/RISCV/RISCVInstrInfo.cpp
31

Code width standard is 80 columns.

asb updated this revision to Diff 112750.Aug 25 2017, 2:30 PM

Fix line that was over 80 columns (thanks @apazos).

asb marked an inline comment as done.Aug 25 2017, 2:31 PM
psnobl added a subscriber: psnobl.Sep 8 2017, 12:10 PM
kparzysz accepted this revision.Sep 11 2017, 7:28 AM
kparzysz added a subscriber: kparzysz.
kparzysz added inline comments.
lib/Target/RISCV/RISCVInstrInfo.td
316

Please add spaces between Defs and [].

This revision is now accepted and ready to land.Sep 11 2017, 7:28 AM
This revision was automatically updated to reflect the committed changes.