Heat treatment is considered to be an essential variable by most welding standards. The concern typically is post weld heat treatment, but when working with hardenable materials, the initial state of heat treatment is a concern as well. Consider PH stainless steel; it is best to weld it in the annealed condition or you can expect cracks to appear like magic. Likewise with most hardenable steel alloys. It is common practice to anneal die steels before welding them. Then they are reheat treated before returning them to service.
Best regard -Al