[M3commit] [modula3/cm3] 14cb0b: Fix a bug passing records by value in indirect cal...

GitHub noreply at github.com
Sun Nov 5 21:52:39 CET 2017


  Branch: refs/heads/master
  Home:   https://github.com/modula3/cm3
  Commit: 14cb0b59b638273fdcdad745d5d9a68980959e37
      https://github.com/modula3/cm3/commit/14cb0b59b638273fdcdad745d5d9a68980959e37
  Author: Rodney Bates <rodney.m.bates at acm.org>
  Date:   2017-11-05 (Sun, 05 Nov 2017)

  Changed paths:
    M m3-sys/llvm3.6.1/src/M3CG_LLVM.m3

  Log Message:
  -----------
  Fix a bug passing records by value in indirect calls.

For indirect calls, structs (static-sized records & arrays) passed
by value didn't get the llvm byval attribute, which causes llvm to
insert call-site copy.  Worked for direct calls.  Indirect calls
in cm3 IR do not have enough information to know when to add byval.

Changed to do away altogether with the byval attribute and instead
generate explicit call-site code to make the copy, in pop_struct.




More information about the M3commit mailing list