search for: external_func_compute_loop_bound

Displaying 4 results from an estimated 4 matches for "external_func_compute_loop_bound".

2012 Oct 02
2
[LLVMdev] How best to represent assume statements in LLVM IR?
...tions are about function parameters. However, I can think of some examples where having the ability to note an assumption about an arbitrary intermediate value might be useful. If I can, I'd like to not exclude that case. One such example (for a language with array bounds checks): int n = external_func_compute_loop_bound(); assume n < array.size(); for(int i = 0; i < n; i++) { process(arrray[i]); } Philip *removed extra text for readability*
2012 Oct 02
0
[LLVMdev] How best to represent assume statements in LLVM IR?
...rameters. However, I can think of some examples where > having the ability to note an assumption about an arbitrary > intermediate value might be useful. If I can, I'd like to not > exclude that case. > > One such example (for a language with array bounds checks): > int n = external_func_compute_loop_bound(); > assume n < array.size(); > for(int i = 0; i < n; i++) { > process(arrray[i]); > } > > Philip > > *removed extra text for readability* > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu ht...
2012 Oct 02
0
[LLVMdev] How best to represent assume statements in LLVM IR?
Hi Philip, > Does anyone have any suggestions on how to best represent an assumption > statement(*) in IR? good question! There have been various attempts, for example Nick tried teaching the optimizers to not prune the branch to unreachable in br %cond, label %assumption_holds, %assumption_doesnt_hold assumption_doesnt_hold: unreachable This then leads to %cond being replaced
2012 Oct 01
3
[LLVMdev] How best to represent assume statements in LLVM IR?
Does anyone have any suggestions on how to best represent an assumption statement(*) in IR? In particular, I want to expose the information implied by the assumption to the optimization passes without emitting code (after optimization) to check the assumption itself. I've tried a couple of options so far, and none have gotten me quite the right semantics. Has anyone else implemented