Remove workaround for the forward progress handling in LLVM
This commit is contained in:
parent
f820d9d4e5
commit
50ec47aa06
5 changed files with 1 additions and 30 deletions
|
@ -980,17 +980,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
|
||||
mir::TerminatorKind::Goto { target } => {
|
||||
if bb == target {
|
||||
// This is an unconditional branch back to this same basic block. That means we
|
||||
// have something like a `loop {}` statement. LLVM versions before 12.0
|
||||
// miscompile this because they assume forward progress. For older versions
|
||||
// try to handle just this specific case which comes up commonly in practice
|
||||
// (e.g., in embedded code).
|
||||
//
|
||||
// NB: the `sideeffect` currently checks for the LLVM version used internally.
|
||||
bx.sideeffect();
|
||||
}
|
||||
|
||||
helper.funclet_br(self, &mut bx, target);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,10 +20,6 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes {
|
|||
fn abort(&mut self);
|
||||
fn assume(&mut self, val: Self::Value);
|
||||
fn expect(&mut self, cond: Self::Value, expected: bool) -> Self::Value;
|
||||
/// Emits a forced side effect.
|
||||
///
|
||||
/// Currently has any effect only when LLVM versions prior to 12.0 are used as the backend.
|
||||
fn sideeffect(&mut self);
|
||||
/// Trait method used to test whether a given pointer is associated with a type identifier.
|
||||
fn type_test(&mut self, pointer: Self::Value, typeid: Self::Value) -> Self::Value;
|
||||
/// Trait method used to inject `va_start` on the "spoofed" `VaListImpl` in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue