Displaying 4 results from an estimated 4 matches for "original_code".
2008 Nov 10
1
[LLVMdev] What would LLVM need to do this optimization?
...egion-clone is a pass I've written (-mem2reg to
clean up the PHIs I reg2mem'd). My pass inserts a custom atomic_begin
instruction and a couple intrinsics to help start/rollback a region of
code.
The optimized .ll code is roughly..
entry:
; start an atomic region at %atomic, rollback to %original_code
atomic_begin label %atomic, %original_code
atomic:
%c = icmp slt i32 %argc, 1
br i1 %c, label %done, label %abort
done:
call void @llvm.atomic.end( )
ret i32 4
abort:
; undo all work since atomic_begin and continue at %original_code
call void @llvm.atomic.abort( )
unreachable
origin...
2012 May 02
0
[LLVMdev] Taking over work on CodeExtractor, spiffing it up, and making it nice & easy to use
Dear Chandler,
> Please let me know if you have out-of-tree users of this logic
At KernelGen we have an out-of-tree variation of CodeExractor called
BranchedCodeExractor [1], which instead of taking a code region into a new
function, does it conditionally:
ORIGINAL_CODE;
->>
if (extracted_code_function(args) != -1)
{
ORIGINAL_CODE;
}
I think many hybrid and parallelizing tools need the same logic. For
instance, LLVM Polly should be using a very similar code exractor for
OpenMP backend.
- D.
[1] https://hpcforge.org/scm/viewvc.php/trunk/src/frontend/?...
2012 May 02
1
[LLVMdev] Taking over work on CodeExtractor, spiffing it up, and making it nice & easy to use
...extraction, nothing I'm
planning should negatively impact it... I don't know your use case, so I
don't have any specific changes that would likely help you out, but if
there are changes you would like to see to the core code extractor in LLVM,
feel fere to propose patches...
>
> ORIGINAL_CODE;
>
> ->>
>
> if (extracted_code_function(args) != -1)
> {
> ORIGINAL_CODE;
> }
>
> I think many hybrid and parallelizing tools need the same logic. For
> instance, LLVM Polly should be using a very similar code exractor for
> OpenMP backend.
>
I'll...
2012 May 02
2
[LLVMdev] Taking over work on CodeExtractor, spiffing it up, and making it nice & easy to use
Hello folks,
Just as a heads up, I chatted with Owen today about a little known bit of
LLVM: lib/Transforms/Utils/CodeExtractor.cpp
A toy project of mine has a use for this functionality, and it still seems
to mostly work, so I'm going to be spending some time doing cleanup and
general maintenance on the code to make it easier and more suitable for
consumption by actual optimization passes.