[LLVMdev] adding an optional flag edge to a BRIND node
Chris Lattner
sabre at nondot.org
Thu Aug 3 10:39:44 PDT 2006
On Wed, 2 Aug 2006, [UTF-8] Rafael Esp?ndola wrote:
> Is there any way to add an optional flag edge to a BRIND node? I In
> the ARM backend I lower returns directly to BRINDs, so I need to add
> an edge connecting the BRIND and the CopyToReg that sets the return
> value. The other option is to create an ARM specific node that is
> identical to BRIND except for having a flag edge.
I think you've already figured this out, but just in case:
This isn't the best way to do this. I think you want to add a
target-specific retflag node, which gets selected to your return
instruction. BRIND is really used for tablejump's, which are "goto's",
not "returns". Implementing return in terms of the BRIND node could
confuse the dag combiner, even if it had a flag operand.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list