[mips] Generate memory dependencies for byVal arguments
authorStefan Maksimovic <stefan.maksimovic@mips.com>
Thu, 22 Feb 2018 13:40:42 +0000 (13:40 +0000)
committerStefan Maksimovic <stefan.maksimovic@mips.com>
Thu, 22 Feb 2018 13:40:42 +0000 (13:40 +0000)
commited797a30497edd9010d45125f0fc949b7ded651e
treef9c8b9a00b72a09421c6162f1b3b595e5f5d3753
parentb603a5e0e3760eb8148e327bb184d60d6b6bfbd7
[mips] Generate memory dependencies for byVal arguments

There were no memory dependencies made between stores generated
when lowering formal arguments and loads generated when
call lowering byVal arguments which made the Post-RA scheduler
place a load before a matching store.

Make the fixed object stored to mutable so that the load
instructions can have their memory dependencies added

Set the frame object as isAliased which clears the underlying
objects vector in ScheduleDAGInstrs::buildSchedGraph().
This results in addition of all stores as dependenies for loads.

This problem appeared when passing a byVal parameter
coupled with a fastcc function call.

Differential Revision: https://reviews.llvm.org/D37515

llvm-svn: 325782
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/test/CodeGen/Mips/fastcc_byval.ll [new file with mode: 0644]
llvm/test/CodeGen/Mips/o32_cc_byval.ll