Displaying 1 result from an estimated 1 matches for "initialval".
2020 Aug 07
2
Branches which return values in SelectionDAG
...form and customize the loop.
What I found out, however, is that I don't know enough about the SelectionDAG to know if this is possible.
Trying to combine the two concepts (Value-returning branches and handling them in the selection DAG), I wrote my backend to generate:
header:
%InitialVal = N
body:
%IndVar = PHI(%InitialVal, %header, %DecVal, %body)
...
%MultipleReturns = call {i32, i1} compare_and_maybe_decrement(%IndVar, 1)
%DecVal = extract {i32, i1} %MultipleReturns 0
%Cond = extract {i32, i1} %MultipleReturns 1
br %Cond, body, exit
exit:
...
Then, I attempted t...