forked from OSchip/llvm-project
e6201c8724
artifacts along with DCE Legalization Artifacts are all those insts that are there to make the type system happy. Currently, the target needs to say all combinations of extends and truncs are legal and there's no way of verifying that post legalization, we only have *truly* legal instructions. This patch changes roughly the legalization algorithm to process all illegal insts at one go, and then process all truncs/extends that were added to satisfy the type constraints separately trying to combine trivial cases until they converge. This has the added benefit that, the target legalizerinfo can only say which truncs and extends are okay and the artifact combiner would combine away other exts and truncs. Updated legalization algorithm to roughly the following pseudo code. WorkList Insts, Artifacts; collect_all_insts_and_artifacts(Insts, Artifacts); do { for (Inst in Insts) legalizeInstrStep(Inst, Insts, Artifacts); for (Artifact in Artifacts) tryCombineArtifact(Artifact, Insts, Artifacts); } while(!Insts.empty()); Also, wrote a simple wrapper equivalent to SetVector, except for erasing, it avoids moving all elements over by one and instead just nulls them out. llvm-svn: 318210 |
||
---|---|---|
.. | ||
amdgpu-irtranslator.ll | ||
inst-select-load-flat.mir | ||
inst-select-load-smrd.mir | ||
inst-select-store-flat.mir | ||
irtranslator-amdgpu_vs.ll | ||
legalize-add.mir | ||
legalize-and.mir | ||
legalize-bitcast.mir | ||
legalize-constant.mir | ||
legalize-fadd.mir | ||
legalize-fmul.mir | ||
legalize-icmp.mir | ||
legalize-or.mir | ||
legalize-select.mir | ||
legalize-shl.mir | ||
lit.local.cfg | ||
regbankselect.mir | ||
shader-epilogs.ll | ||
smrd.ll |