Move verify calls out of Context.
Also, move flowgraph() calls out of filetest and into the passes that need them so that filetest doesn't have embedded knowledge of these dependencies. This resolves a TODO about the way Context was running the verifier, and it makes the Context functions and the filetest runners more transparent. This also fixes simple_gvn to use the existing dominator tree rather than computing its own.
This commit is contained in:
@@ -116,22 +116,18 @@ impl Context {
|
||||
}
|
||||
|
||||
/// Perform simple GVN on the function.
|
||||
pub fn simple_gvn(&mut self) -> CtonResult {
|
||||
do_simple_gvn(&mut self.func, &mut self.cfg);
|
||||
// TODO: Factor things such that we can get a Flags and test
|
||||
// enable_verifier().
|
||||
self.verify(None).map_err(Into::into)
|
||||
pub fn simple_gvn(&mut self) {
|
||||
do_simple_gvn(&mut self.func, &mut self.cfg, &mut self.domtree)
|
||||
}
|
||||
|
||||
/// Perform LICM on the function.
|
||||
pub fn licm(&mut self) -> CtonResult {
|
||||
pub fn licm(&mut self) {
|
||||
do_licm(
|
||||
&mut self.func,
|
||||
&mut self.cfg,
|
||||
&mut self.domtree,
|
||||
&mut self.loop_analysis,
|
||||
);
|
||||
self.verify(None).map_err(Into::into)
|
||||
)
|
||||
}
|
||||
|
||||
/// Run the register allocator.
|
||||
|
||||
Reference in New Issue
Block a user