Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Re: llvm question"
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
Hi all,
I was trying to implement an obfuscation tool for C-code on the basis of
LLVM. I got a prototype of the simple obfuscation transformation which
converting control flow graph to something like a state machine. I am not
sure I will have time to work on extending further this tool with new
transformations like opaque predicates and decided to put here source code I
have by now with hope
2004 May 09
2
[LLVMdev] Strange SetCond Behavior
Before I file a bug, I thought I'd check to make sure something hasn't
changed. Stacker used to work in 1.2, now it fails on six tests. All six
tests pertain to use of the SetLT, SetGT, SetLE, and SetGE SetCondInst.
In my test programs they all fail, regardless of the values.
The *only* thing I've done to Stacker is to change the base type
involved in the comparison from int to long.
2002 Sep 27
3
[LLVMdev] setCC
what's the semantics for setCC if one of the operands is NULL pointer?
%ptr=alloc int
seteq int*, %pt, NULL
what's the result for the second instruction? How about setne, setlt,
setgt, setle, and setge? Thanks!
Jianzhong
2004 May 09
0
[LLVMdev] Strange SetCond Behavior
On Sun, 9 May 2004, Reid Spencer wrote:
> Before I file a bug, I thought I'd check to make sure something hasn't
> changed. Stacker used to work in 1.2, now it fails on six tests. All six
> tests pertain to use of the SetLT, SetGT, SetLE, and SetGE SetCondInst.
> In my test programs they all fail, regardless of the values.
>
> The *only* thing I've done to Stacker is
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
2004 Aug 12
1
[LLVMdev] I got problem in BranchInst+SetCondInst
Hi all,
the small test modeling my problem is attached.
(see comments in file attached)
the problem is that both
SetCondInst* CondInst
= new SetCondInst( Instruction::SetLE, One, Two );
and
SetCondInst* CondInst
= new SetCondInst( Instruction::SetLE, Two, One );
have the same output...
Anyone have a sharper eye?..
---
Valery A.Khamenya
-------------- next part
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 );
2002 Sep 28
0
[LLVMdev] setCC
It seems like you should be able to statically evaluate these
if you assume that NULL is zero and alloca returns an unsigned
nonzero pointer value.
> what's the semantics for setCC if one of the operands is NULL pointer?
> %ptr=alloc int
> seteq int*, %pt, NULL
>
> what's the result for the second instruction? How about setne, setlt,
> setgt, setle, and setge? Thanks!
2006 Jun 25
1
[LLVMdev] adding args to func call
This question is similar to Ryan Lefever's post on May 1, 2006 about
printf declaration. In my case, I want to insert fprintf(stderr,
...) calls. I'm new to LLVM, and I don't know what's the recipe for
putting together the arguments. Can someone give me basic
instructions or point me in the direction on what to do? I can't find
any more documentation on this. Thanks!
2005 Apr 11
2
[LLVMdev] JIT and array pointers
On Sun, 2005-04-10 at 19:47 -0500, Chris Lattner wrote:
> On Mon, 11 Apr 2005, Paul wrote:
> > I'm trying to pass an array pointer to my run-time generated module, and
> > after a long time of searching for the answer, the only thing I got was
> > a headache. Basically I have a few arrays (few megabytes which will
> > sometimes be accessed as 8 / 16 / 32 / 64 bit
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 =
2005 Apr 11
0
[LLVMdev] JIT and array pointers
On Mon, 11 Apr 2005, dummy1 at boxpl.com wrote:
>> There are many possible ways to do this, can you be a bit more specific
>> about what you're trying to do?
> Here is a basic example:
Ah, ok, I see what you're trying to do. Below is some *pseudo* code for
the basic idea:
> ============================================
> unsigned int buff[4096];
>
> int main
2006 Jun 30
1
[LLVMdev] instruction sequence
I'm trying to insert a call to fprintf(stderr, ...). I've looked at
the emitted assembly from llvm-gcc, and it consists of a LoadInst (of
stderr) and CallInst. It looks like this:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%tmp.1 = load %struct._IO_FILE** %stderr ; ty=%struct._IO_FILE*
%tmp.0 = call int (%struct._IO_FILE*, sbyte*, ...)* %fprintf(%struct._IO_FILE* %tmp.1, sbyte*
2017 Jul 20
3
Issue with DAG legalization of brcond, setcc, xor
Hi,
I am having some issues with how some of the instructions are being
legalized.
So this is my intial basic block. The area of concern is the last three
instructions. I will pick and choose debug output to keep this small.
SelectionDAG has 36 nodes:
t0: ch = EntryToken
t6: i32,ch = CopyFromReg t0, Register:i32 %vreg507
t2: i32,ch = CopyFromReg t0, Register:i32 %vreg17
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery,
That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
repository? I'd be happy to put it in.
Reid.
Valery A.Khamenya wrote:
> Hi LLVMers,
>
> the example attached I have used to prove that JIT and some visible
> optimizations are really invoked.
>
> Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
>
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can
only build one program per directory. Were you suggesting that you wanted me to
move the entire directories under a "small examples" directory?
Reid.
Chris Lattner wrote:
> On Tue, 17 Aug 2004, Reid Spencer wrote:
>
>
>>That's pretty cute actually. Do you want this
2017 Jul 21
4
Issue with DAG legalization of brcond, setcc, xor
But isn't kinda silly that we transform to xor and then we transform it
back. What is the advantage in doing so? Also, since we do that method, I
now have to introduce setcc patterns for i1 values, instead of being able
to just use logical pattern operators like not.
-Dilan
On Fri, Jul 21, 2017 at 11:00 AM Dilan Manatunga <manatunga at gmail.com>
wrote:
> For some reason I
2013 Apr 02
1
[LLVMdev] Promoting i1 to i32 does not work...
Hi there,
I'm having a hard time with promoting operands from i1 to i32 in my
backend...
I have to register classes, VTs are i1 and i32. The i1 registers are
only for predication and conditional jumps, so I want to use them with
brcond, setcc.
There are no instructions to directly load a value in an i1 register or
to copy between i1 and i32, so I need the DAG Legalizing Pass to not
generate
2011 Apr 15
1
[LLVMdev] Confusion over ISelLowering of setcc
Hi,
I'm investigating an issue with the PTX backend I've come across (latest
version from the trunk). Not being very familiar with Selection Dags,
it's highly likely that I misunderstand some part of the process. I'd
appreciate if someone can point me in the right direction.
Here's the LLVM IR that is causing problems (I'm aware this code doesn't
do anything
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> On second thought, the makefiles don't (easily) allow this do they? You can
> only build one program per directory. Were you suggesting that you wanted me to
> move the entire directories under a "small examples" directory?
You're right. The simples way to do this would be to have:
projects/
SmallExamples/