Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] UIntTy, IntTy, and SByteTy"
2006 May 01
0
[LLVMdev] printf decleration
Ok, I think I figured it out. I talked to someone, and we figured out
that when I make a call to printf with a constant string, I need to make
a global variable and use getElementPtr to reference it. The modified
call for accessing the printf is:
/* m is Module*, f is Function*, i is Instruction* */
Constant* constStr = ConstantArray::get("test\n");
GlobalVariable* gv =
2007 May 17
8
[LLVMdev] Antw.: 2.0 Pre-release tarballs online
Hi,
Op 15-mei-07, om 10:23 heeft Tanya M. Lattner het volgende geschreven:
1) Download llvm-gcc4 binary and llvm. Compile and run make check.
I did a debug build on OSX 10.4.9 and everything went fine.
Results of "make check" (see ppc.log):
=== Summary ===
# of expected passes 1630
# of unexpected failures 21
# of expected failures 2
2006 May 01
2
[LLVMdev] printf decleration
I am writing a pass where I need to make a function deceleration for
printf. Below is the code I'm trying to use.
-----
bool MyPass::runOnModule(Module &m) {
vector<const Type*> args;
args.push_back(PointerType::get(Type::SByteTy));
Function* f = m.getOrInsertFunction("printf",
FunctionType::get(Type::IntTy, args, true));
-----
When I insert a call
2005 Mar 16
2
[LLVMdev] Dynamic Creation of a simple program
Hi Misha,
Thanks for your answer
I was doing this:
========================
BasicBlock *BBlock = new BasicBlock("entry", MyFunc);
...
Value *Zero = ConstantSInt::get(Type::IntTy, 0);
Value *UZero = ConstantUInt::get(Type::UIntTy, 0);
MallocInst* mi = new MallocInst( STyStru );
mi->setName("tmp.0");
BBlock->getInstList().push_back( mi );
2007 May 17
0
[LLVMdev] API changes (was Antw.: 2.0 Pre-release tarballs online)
On Thu, 17 May 2007, Bram Adams wrote:
> About LTO support: the new release documents don't mention anything about
> this. Also, the relevant bugzilla entries I could find date back to March
> 2007. Has any progress been made recently in adding LTO to the Darwin linker
> and/or GNU binutils?
I'll mention this in the release notes. The darwin linker in 10.5 (not
yet
2005 Jan 31
1
[LLVMdev] Question about Global Variable
Hi,
Sorry for bothering you guys again.
I got problem when I am trying to recover the Global Variable Initial value. What I did is like the following
ConstantArray *Cstr = dyn_cast<ConstantArray>(gI->getInitializer());
// the above instruction enable me to get the content of initial string of global variable, like char a[10] ="test global";
And then I make some change for
2005 Apr 07
0
[LLVMdev] arguments to standard library functions
Right now I am trying to capture the function name and the number of
arguments ,
so this following is the pass I wrote .
-------------------------------------------------------------
struct pass06a : public ModulePass {
virtual bool runOnModule(Module &M) {
std::vector<const Type*> pList;
pList.push_back( PointerType::get(Type::SByteTy) );
pList.push_back(
2007 Jan 01
0
[LLVMdev] nightly tester grawp
Ok, so I guess the issue is llvm-gcc has to be updated. There are
some issues with the Apple svn repository so I checked out a copy
from the public mirror. Looks the latest patch hasn't made it through:
c++ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-
long -Wno-variadic-macros -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-
unused
2006 Mar 03
0
[LLVMdev] Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
On Thu, 2 Mar 2006, Chris Lattner wrote:
>> Any ideas what could be wrong?
>
> Sorry for the delay, please try this tarball:
> http://nondot.org/sabre/2006-03-02-llvm-gcc-4.tar.gz
Actually, do to a recent change in CVS, this tarball will probably not
work anymore. Please apply the attached (small) patch on top of it in
the gcc directory.
Worth noting, this front-end only works
2005 Mar 21
3
[LLVMdev] arguments to standard library functions
HI ,
I understand that the standard C library functions are executed using the
native library of the host machine. ( for example when we execute a bytecode
to extract the profile info )
Is it possible to extract for each standard library function that is
executed , the arguments that the function is called with.
For example if printf ("%d", some_int ) when called during runtime
2005 Oct 16
2
[LLVMdev] Help on LLVM Instrumentation
Hi ,
I am using LLVM for my Post Graduate course project on Optimization. I am trying to do some insrtumentation to the bytecode.I 've been going through your Instrumentation code for the past few days in /llvm/lib/Transforms/Instrumentation folder and finally found two ways of instrumentation :
1) injecting LLVM bytecode instructions
2) calling an external C function.
I am trying both and
2006 Mar 02
4
[LLVMdev] Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
On Thu, 2 Mar 2006, Vladimir Prus wrote:
>>> The instructions seem to have one path wrong. It says to get:
>>
>> I'll put together a tarball today. That will be easier than dealing with
>> a patch, and it will include a bunch of bugfixes since the previous email.
> Further into process, I get this error:
> In file included from
2005 Mar 16
1
[LLVMdev] Dynamic Creation of a simple program
Hi,
Given these C instructions:
==============================
struct stru { struct stru *Next; };
struct list *NewStru = malloc ( sizeof ( struct stru ) );
struct list *tmp.3;
...
tmp.3 = NewStru->Next;
==============================
LLVM generates something like this:
%tmp.0 = malloc %struct.stru ; <%struct.stru*>
%tmp.3 = getelementptr %struct.stru* %tmp.0, int 0, uint 1 ;
2007 May 18
0
[LLVMdev] Antw.: 2.0 Pre-release tarballs online
> On Slackware 10.2 (GCC 3.3.6), I got an error during a debug build with the
> header files using uintptr_t (not recognised as a type). Putting "#include
> <stdint.h>" in include/llvm/BasicBlock.h (llvm) and in
> "include/llvm/ValueSymbolTable.h" (frontend) resolved this.
Ok. This is now fixed on the release branch. Thanks!
> Also, I got linking
2003 Nov 21
2
[LLVMdev] GetElementPtrInst Again!
I'm trying to set up a call to printf in stacker and have managed to
confuse myself. Perhaps you can shed some light.
I've declared printf as a function taking a pointer to SByteTy with var
args and returning SIntTy:
> // Create a function for output (int printf(format,...))
> std::vector<Type*> params;
> params.push_back( PointerType::get( Type::SByteTy ) );
2009 Sep 23
2
[LLVMdev] DebugFactory
On Sep 22, 2009, at 4:49 PM, Talin wrote:
>
> // Calculate the size of the specified LLVM type.
> Constant * DebugInfoBuilder::getSize(const Type * type) {
> Constant * one = ConstantInt::get(Type::Int32Ty, 1);
> return ConstantExpr::getPtrToInt(
> ConstantExpr::getGetElementPtr(
> ConstantPointerNull::get(PointerType::getUnqual(type)),
>
2009 May 21
3
[LLVMdev] Passing a pointer to a function
I recently began hacking around with my first LLVM pass. The big
picture is that I would like to insert function calls for each
instruction type, and pass some parameters based on the instruction
type. Then I will link the output to some C file that implements those
functions.
Things were going well until I started trying to make function calls
with a pointer as a parameter. For example, I would
2009 Sep 22
3
[LLVMdev] DebugFactory
On Tue, Sep 22, 2009 at 9:21 AM, Devang Patel <devang.patel at gmail.com> wrote:
> On Tue, Sep 22, 2009 at 12:14 AM, Talin <viridia at gmail.com> wrote:
>> So, one feature of the late, lamented DebugInfoBuilder that I am missing
>> quite badly, and which is not available in the current DIFactory, is the
>> ability to specify structure offsets abstractly. The
2019 Jul 03
2
optimisation issue in an llvm IR pass
Hello,
I have an optimisation issue in an llvm IR pass - the issue being that
unnecessary instructions are generated in the final assembly (with -O3).
I want to create the following assembly snippet:
mov dl,BYTE PTR [rsi+rdi*1]
add dl,0x1
adc dl,0x0
mov BYTE PTR [rsi+rdi*1],dl
however what is created is (variant #1):
mov dl,BYTE PTR [rsi+rdx*1]
add dl,0x1
cmp
2009 Sep 22
0
[LLVMdev] DebugFactory
On Tue, Sep 22, 2009 at 9:21 AM, Devang Patel <devang.patel at gmail.com>wrote:
> On Tue, Sep 22, 2009 at 9:21 AM, Devang Patel <devang.patel at gmail.com>
> wrote:
> > On Tue, Sep 22, 2009 at 12:14 AM, Talin <viridia at gmail.com> wrote:
> >> So, one feature of the late, lamented DebugInfoBuilder that I am missing
> >> quite badly, and which is not