This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Add a stand-alone hazard recognizer pass
ClosedPublic

Authored by tstellarAMD on Mar 30 2016, 6:07 AM.

Details

Summary

This new pass allows targets to use the hazard recognizer without having
to also run one of the schedulers. This is useful when compiling with
optimizations disabled for targets that still need noop hazards
to be handled correctly.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to CodeGen: Add a stand-alone hazard recognizer pass.
tstellarAMD updated this object.
tstellarAMD added reviewers: atrick, hfinkel.
tstellarAMD added a subscriber: llvm-commits.

Don't call HazardRec->reset() at the start of blocks. We want
to make sure we are able to detect hazards at the start of blocks.

arsenm added a subscriber: arsenm.Apr 12 2016, 9:05 AM
arsenm added inline comments.
lib/CodeGen/PostRAHazardRecognizer.cpp
100 ↗(On Diff #52936)

Should use unique_ptr

Use unique_ptr for the Hazard Recognizer

atrick accepted this revision.Apr 14 2016, 3:10 PM
atrick edited edge metadata.

LGTM. I think the issues are fixable without adding a pass. However, it could be really nice to have a pass that fixes hazards without building a DAG.

This revision is now accepted and ready to land.Apr 14 2016, 3:10 PM
This revision was automatically updated to reflect the committed changes.