Pass an ISA argument to legalization functions.

This lets them look at the ISA flags.
This commit is contained in:
Jakob Stoklund Olesen
2018-02-12 14:21:41 -08:00
parent 60e70da0e6
commit a73fcb2691
6 changed files with 74 additions and 15 deletions

View File

@@ -6,9 +6,15 @@
use cursor::{Cursor, FuncCursor};
use flowgraph::ControlFlowGraph;
use ir::{self, InstBuilder};
use isa::TargetIsa;
/// Expand a `global_addr` instruction according to the definition of the global variable.
pub fn expand_global_addr(inst: ir::Inst, func: &mut ir::Function, _cfg: &mut ControlFlowGraph) {
pub fn expand_global_addr(
inst: ir::Inst,
func: &mut ir::Function,
_cfg: &mut ControlFlowGraph,
_isa: &TargetIsa,
) {
// Unpack the instruction.
let gv = match func.dfg[inst] {
ir::InstructionData::UnaryGlobalVar { opcode, global_var } => {