Displaying 3 results from an estimated 3 matches for "go_error".
Did you mean:
io_error
2014 Dec 04
2
[LLVMdev] Optimising bit-flipping code
...erhaps an optional optimisation pass that I could run that could
detect this optimisation opportunity?
Thanks for any ideas,
/Lars
/***************************************************/
/* The two LSB of x0 are 'tag bits' */
/* that we want to manipulate. */
extern long x0;
void go_error(void) __attribute__ ((noreturn));
void example_not_optimized(void)
{
if((x0 & 3) == 2) {
// Here the tag bits are removed and added
// with bitwise 'and' and 'or'.
x0 = ((x0 & ~3) | 2) + 12;
} else {
go_error();
}
}
/*
define void @example_not_optimiz...
2015 Jan 15
2
[LLVMdev] generate llvm.assume calls in GVN?
...; this should be optimized away
> %6 = or i64 %5, 2 ; this should be optimized away
> %7 = add nsw i64 %6, 12
> store i64 %7, i64* %x0, align 8
> ret void
> ; <label>:8 ; preds = %0
> tail call void @go_error() #2
> unreachable
> }
>
> declare void @llvm.assume(i1)
>
>
>
> Thanks for any ideas,
> /Lars
>
> /***************************************************/
>
> /* The two LSB of x0 are 'tag bits' */
> /* that we want to manipulate. */
>...
2015 Jan 15
2
[LLVMdev] generate llvm.assume calls in GVN?
...gt;> %6 = or i64 %5, 2 ; this should be optimized away
>>> %7 = add nsw i64 %6, 12
>>> store i64 %7, i64* %x0, align 8
>>> ret void
>>> ; <label>:8 ; preds = %0
>>> tail call void @go_error() #2
>>> unreachable
>>> }
>>>
>>> declare void @llvm.assume(i1)
>>>
>>>
>>>
>>> Thanks for any ideas,
>>> /Lars
>>>
>>> /***************************************************/
>>>
>>&...