void
MachineCopyPropagation::SourceNoLongerAvailable(unsigned Reg,
                              SourceMap &SrcMap,
                              DenseMap<unsigned, MachineInstr*> &AvailCopyMap) {
  for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) {
    SourceMap::iterator SI = SrcMap.find(*AI);
    if (SI != SrcMap.end()) {
      const DestList& Defs = SI->second;
      for (DestList::const_iterator I = Defs.begin(), E = Defs.end();
           I != E; ++I) {
        unsigned MappedDef = *I;
        // Source of copy is no longer available for propagation.
        AvailCopyMap.erase(MappedDef);
        for (MCSubRegIterator SR(MappedDef, TRI); SR.isValid(); ++SR)
          AvailCopyMap.erase(*SR);
      }
    }
  }
}
	void Input::parse (ticpp::Element *element, SourceMap &sources)
	{
		/* get input properties */
		std::string uri = element->GetAttribute ("source");
		std::string semantic = element->GetAttribute ("semantic");
		element->GetAttributeOrDefault ("offset", &mOffset, 0);
		
		
		mSemantic = parseSemantic (semantic);
		
		
		/* couldn't find input source */
		if (sources.find (uri) == sources.end())
		{
			std::string error = "Parsing failed: No source named '" + uri + "' found";
			throw std::runtime_error (error.c_str());
		}
		
		
		/* attach input to source */
		mSource = sources[uri];
	}