This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r243007 - in /trunk/gcc: ChangeLog config/arc/a...


Author: aburgess
Date: Wed Nov 30 11:08:06 2016
New Revision: 243007

URL: https://gcc.gnu.org/viewcvs?rev=243007&root=gcc&view=rev
Log:
arc: Avoid store/load pipeline hazard

ARC700 targets have a store/load pipeline hazard, if we load within 2
cycles of a store, and the load/store are at the same address, then we
pay a multi-cycle penalty.

This commit avoids this by inserting nop instructions between the store
and the load.

gcc/ChangeLog:

	* config/arc/arc-protos.h (arc_store_addr_hazard_p): Declare.
	* config/arc/arc.c (arc_store_addr_hazard_p): New function.
	(workaround_arc_anomaly): Call arc_store_addr_hazard_p for ARC700.
	* config/arc/arc700.md: Add define_bypass for store/load.

gcc/testsuite/ChangeLog:

	* gcc.target/arc/arc700-stld-hazard.c: New file.


Added:
    trunk/gcc/testsuite/gcc.target/arc/arc700-stld-hazard.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arc/arc-protos.h
    trunk/gcc/config/arc/arc.c
    trunk/gcc/config/arc/arc700.md
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]