Displaying 6 results from an estimated 6 matches for "cmptmp".
2007 Nov 05
0
[LLVMdev] 'Implementing a language with LLVM' tutorial
...de classes are called
ASTs. Instead of saying "ExprAST node" all the time, who not just call
the class ExprNode or ExprAstNode?
http://llvm.org/docs/tutorial/LangImpl3.html
case '<':
L = Builder.CreateFCmpULT(L, R, "multmp");
Should this be something like "cmptmp"?
Also, you mention zero-argument functions, but it doesn't look like
you can parse function calls with zero arguments.
http://llvm.org/docs/tutorial/LangImpl5.html
At this point, you are probably starting to think "on no!
Should be "Oh no"
There's no link to the nex...
2007 Nov 05
5
[LLVMdev] 'Implementing a language with LLVM' tutorial
On Mon, 5 Nov 2007, Aaron Gray wrote:
>> Anyone have thoughts or feedback? :)
>
> Nice job. The only bit that is not immediately clear is the 'Proto'
> variable, but is clear when looking through the code at the end of the page.
Where in the tutorial? What would you suggest that I say?
> Could do with a link to the LLVMBuilder class reference material.
I added a link
2019 Apr 01
2
Instruction Execution With Hard Limitation at Runtime
...run to a
program.
So create a simple function as below:
define void @add_gas(i64 %gasCost) {
__virtual_entry:
%0 = load i64, i64* @__WAVM__XX__gGasUsed ### I am sure it exists,
same as the __WAVM__XX__gGasLimit
%addtmp = add i64 %0, %gasCost
%1 = load i64, i64* @__WAVM__XX__gGasLimit
%cmptmp = icmp sgt i64 %addtmp, %1
br i1 %cmptmp, label %then, label %ifcont
then: ; preds = %__virtual_entry
call void @exit(i32 1024)
ret void
ifcont: ; preds = %__virtual_entry
store i64 %addtmp, i64* @__WAVM...
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...;
switch (Op) {
case '+': return Builder.CreateAdd(L, R, "addtmp");
case '-': return Builder.CreateSub(L, R, "subtmp");
case '*': return Builder.CreateMul(L, R, "multmp");
case '<':
L = Builder.CreateFCmpULT(L, R, "cmptmp");
// Convert bool 0/1 to double 0.0 or 1.0
return Builder.CreateUIToFP(L,
Type::getDoubleTy(getGlobalContext()), "booltmp");
default: return ErrorV("invalid binary operator");
}
}
Value *CallExprAST::Codegen() {
// Look up the name in the global module table...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...gt; case '+': return Builder.CreateAdd(L, R, "addtmp");
> case '-': return Builder.CreateSub(L, R, "subtmp");
> case '*': return Builder.CreateMul(L, R, "multmp");
> case '<':
> L = Builder.CreateFCmpULT(L, R, "cmptmp");
> // Convert bool 0/1 to double 0.0 or 1.0
> return Builder.CreateUIToFP(L,
> Type::getDoubleTy(getGlobalContext()), "booltmp");
> default: return ErrorV("invalid binary operator");
> }
> }
>
> Value *CallExprAST::Codegen() {
> // Look...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...': return Builder.CreateAdd(L, R, "addtmp");
>> case '-': return Builder.CreateSub(L, R, "subtmp");
>> case '*': return Builder.CreateMul(L, R, "multmp");
>> case '<':
>> L = Builder.CreateFCmpULT(L, R, "cmptmp");
>> // Convert bool 0/1 to double 0.0 or 1.0
>> return Builder.CreateUIToFP(L,
>> Type::getDoubleTy(getGlobalContext()), "booltmp");
>> default: return ErrorV("invalid binary operator");
>> }
>> }
>>
>> Value *CallEx...