Skip to content

Commit f845ebb

Browse files
authored
cranelift: Remove is_pic predicate from x86 backend (#5548)
This is still present as shared flags and we don't use the predicate anywhere.
1 parent 437f448 commit f845ebb

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

cranelift/codegen/meta/src/cdsl/settings.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ struct ProtoSetting {
181181
pub(crate) enum PredicateNode {
182182
OwnedBool(BoolSettingIndex),
183183
SharedBool(&'static str, &'static str),
184-
Not(Box<PredicateNode>),
185184
And(Box<PredicateNode>, Box<PredicateNode>),
186185
}
187186

@@ -211,7 +210,6 @@ impl PredicateNode {
211210
PredicateNode::And(ref lhs, ref rhs) => {
212211
format!("{} && {}", lhs.render(group), rhs.render(group))
213212
}
214-
PredicateNode::Not(ref node) => format!("!({})", node.render(group)),
215213
}
216214
}
217215
}

cranelift/codegen/meta/src/isa/x86.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,6 @@ fn define_settings(shared: &SettingGroup) -> SettingGroup {
164164
settings.add_predicate("use_bmi1", predicate!(has_bmi1));
165165
settings.add_predicate("use_lzcnt", predicate!(has_lzcnt));
166166

167-
// Some shared boolean values are used in x86 instruction predicates, so we need to group them
168-
// in the same TargetIsa, for compatibility with code generated by meta-python.
169-
// TODO Once all the meta generation code has been migrated from Python to Rust, we can put it
170-
// back in the shared SettingGroup, and use it in x86 instruction predicates.
171-
172-
let is_pic = shared.get_bool("is_pic");
173-
settings.add_predicate("is_pic", predicate!(is_pic));
174-
settings.add_predicate("not_is_pic", predicate!(!is_pic));
175-
176167
// Presets corresponding to x86 CPUs.
177168

178169
settings.add_preset(

0 commit comments

Comments
 (0)