<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi everybody,<br>
<br>
I'm trying to implement a LLVM Pass that insert instructions into a
basicblock.<br>
<br>
I'm using a FunctionPass and I want to add somthing like this :<br>
<br>
%tmp = alloca i32, align 4<br>
%tmp2 = alloca i32, align 4<br>
<br>
store i32 10, i32* %tmp<br>
store i32 2, i32* %tmp2<br>
<br>
%tmp3 = add i32 %tmp, %tmp2<br>
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: 'Times New Roman'; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; background-color: rgb(238, 238, 238);
font-size: medium;"></span><br>
I try to follow the official tuto, I think this part is out of date.
<a href="http://llvm.org/docs/ProgrammersManual.html#simplechanges">http://llvm.org/docs/ProgrammersManual.html#simplechanges</a><br>
I'm using IRBuilder to create an alloc instruction but I can not for
now.<br>
<br>
Someone could help me to get started ?<br>
<br>
Thanks !<br>
</body>
</html>