search for: elsebb

Displaying 3 results from an estimated 3 matches for "elsebb".

Did you mean: else
2011 Jun 18
1
[LLVMdev] loop only executes once
...ConstInt(IntType, 1, 0) LLVMBuildStore(Builder,One,A)// LLVMBuildStore(Builder,One,B)// Zero = LLVMConstInt(IntType, 0, 0) LLVMBuildStore(Builder,Zero,C) LLVMBuildStore(Builder,ArgX,D) //If argx <= 2 : Return 1 : Goto Else IFBB = LLVMAppendBasicBlockInContext(Context, Fib2, "IF") ElseBB = LLVMAppendBasicBlockInContext(Context, Fib2, "Else") Two = LLVMConstInt(IntType, 2, 0) CondInst = LLVMBuildICmp(Builder, #LLVMIntSLE, ArgX,Two, "cond") LLVMBuildCondBr(Builder, CondInst, IFBB, ElseBB) //If LLVMPositionBuilderAtEnd(Builder, IFBB) LLVMBuildRet(Builder,One) //Els...
2009 Oct 01
3
[LLVMdev] PHI and Allocas
...te 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 = ParseExpression(); In my toy language, I accept any number of statements inside a block. Ignoring nested if statements, should I keep tra...
2009 Oct 01
0
[LLVMdev] PHI and Allocas
...ieving 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 = ParseExpression(); > > In my toy language, I accept any number of statements inside a block. > &g...