search for: thenv

Displaying 2 results from an estimated 2 matches for "thenv".

Did you mean: then
2009 Oct 01
3
[LLVMdev] PHI and Allocas
...ompiler to account for variable mutations around if/else blocks. Reading the Kaleidoscope tutorial, I've learnt that I can substitute the PHI node creation by allocas and retrieving the value later, if needed. The Kaleidoscope example seems to account for one value only, the result of: Value *ThenV = Then->Codegen(); (...) Value *ElseV = Else->Codegen(); (...) PN->addIncoming(ThenV, ThenBB); PN->addIncoming(ElseV, ElseBB); But both Then and Else are expressions, so the Value returned is in the form of a single variable. ExprAST *Then = ParseExpression(); (...) ExprAST *Else = Pa...
2009 Oct 01
0
[LLVMdev] PHI and Allocas
...ons > around if/else blocks. > > Reading the Kaleidoscope tutorial, I've learnt that I can substitute > the PHI node creation by allocas and retrieving the value later, if > needed. The Kaleidoscope example seems to account for one value only, > the result of: > > Value *ThenV = Then->Codegen(); > (...) > Value *ElseV = Else->Codegen(); > (...) > PN->addIncoming(ThenV, ThenBB); > PN->addIncoming(ElseV, ElseBB); > > But both Then and Else are expressions, so the Value returned is in > the form of a single variable. > > ExprAST *Th...