Displaying 2 results from an estimated 2 matches for "assumex".
Did you mean:
assume
2014 Jul 10
2
[LLVMdev] Telling the optimizer a value is always null at the start
How do I tell the optimizer that the (dereferenced) value of an i8**
parameter is NULL at the start so that it can eliminate the check?
I have code like:
void test2(void** ex) {
printf("go\n"); // does not change *ex
}
void call2(void** ex);
void testeh(void** ex) {
// I want to tell the optimizer *ex is null so it can eliminate the
first
2014 Jul 10
2
[LLVMdev] Telling the optimizer a value is always null at the start
...e though. I suspect we'd
> drop the unreachable block before GVN runs.
Yep - SimplifyCFG does a great job of ripping branches to unreachable
out pretty early on.
> I looked at something like this
> previously:
> http://www.philipreames.com/Blog/2014/02/15/tweaking-llvm-to-exploit-assumex/
>
> If you're willing to tolerate an extra branch at runtime, you could simply
> use a return in place of the unreachable. That would definitely work (i.e.
> no pass ordering problem), but the compare and branch would be emitted at
> runtime.
>
> Are you willing to extend...