I will address the issue if the witness is "killed or dies" and presume this relates to a criminal case. I will not simply cut and paste from internet resources, but will provide some material I have used in drafting motions for counsel in criminal cases.
The right to confront one's accusers is a concept that dates back to Roman times. See Coy v. Iowa, 487 U.S. 1012, 1015 , 108 S.Ct. 2798 , 101 L.Ed.2d 857 (1988). In Crawford v. Washington, 541 U.S. 36 (2004). The Court radically revamped the analysis that applies to confrontation clause objections. Crawford overruled the reliability test for confrontation clause objections and set in place a new, stricter standard for admission of hearsay statements under the confrontation clause. Crawford held that testimonial statements by declarants who do not appear at trial may not be admitted unless the declarant is unavailable and the defendant had a prior opportunity to cross-examine the declarant.
However, in Crawford, 541 U.S. at 59 n.9, the Court found “The [Confrontation] Clause . . . does not bar the use of testimonial statements for purposes other than establishing the truth of the matter asserted.”
If you have access to Westlaw, for great motions, see 4 Cal. Crim. Practice: Motions, Jury Instr. & Sent. § 48:9 (4th ed.)
As to the second part of your question briefly, unless the witness can be cross-examined, then the statements cannot be admitted. However, if the defendant is responsible for killing the witness (and the state can prove it), he has more problems than he could ever wish for and cannot benefit from killing the witness. To address this issue requires a lot of time, so may address it later.