• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
GCC 3.3 -o scheduling problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 3.3 -o scheduling problem


  • Subject: GCC 3.3 -o scheduling problem
  • From: Shaun Wexler <email@hidden>
  • Date: Thu, 2 Dec 2004 16:01:22 -0800

I'm having a problem with GCC not scheduling asm statements which claim a "memory" clobber; it's treated as if it the statement were declared volatile, and instructions are not scheduled around it. Fictitious example written in Mail:

	while (loop--)
	{
		__dcbt(inBufA, 32); // normally I use vec_dst for G4
		__dcbt(inBufB, 32); // and dcbtl (streaming) on a G5
		__dcbz(outBuf, 0); // temp location!
		...
		min0v = vec_min( inBufA[0], inBufB[0] );
		min1v = vec_min( inBufA[1], inBufB[1] );
		...
		// <- if placed here* in source, dcbz acts as a barrier!!!
		// ... this is the same with dcbt's... wherever I place them
		// the scheduler won't move anything else around them!
		...
		max0v = vec_max( minv, min0v) );
		max1v = vec_max( minv, min1v) );
		...
		// <- dcbz should be scheduled* here or above
		outBuf[0] = max0v;
		outBuf[1] = max1v;
		...
		inBufA += unrollDepth;
		inBufB += unrollDepth;
		outBuf += unrollDepth;
		...
	}

Any ideas? Regardless of where you place the default ppc_intrinsics (which do specify "memory" clobber, but not volatile), they act as a hard barrier for code scheduling and are always in the same group as I place them in the source code. If they are moved down at all, then scheduling is disrupted horribly. I usually unroll at least 8x and do a lot in my inner loops, so if they're left at the top it's only a small bubble, but I want to solve why GCC doesn't seem to be able to schedule these intrinsics! ;-)

TIA~
--
Shaun Wexler
MacFOH
http://www.macfoh.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: RunApplicationEventLoop freezes when using my framework - FIXED?
  • Next by Date: Preliminary Darwine SDK Released
  • Previous by thread: Re: RunApplicationEventLoop freezes when using my framework - FIXED?
  • Next by thread: Preliminary Darwine SDK Released
  • Index(es):
    • Date
    • Thread