similar to: [LLVMdev] Telling the optimizer a value is always null at the start

Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] Telling the optimizer a value is always null at the start"

2014 Jul 10
2
[LLVMdev] Telling the optimizer a value is always null at the start
On Thu, Jul 10, 2014 at 11:29 AM, Philip Reames <listmail at philipreames.com> wrote: > Hm, I don't know of an explicit way in the IR to do this. If anyone else > does, feel free to chime in. > > One approach would be to add a branch at the beginning of the function to an > unreachable block. If you're testeh function started with: > if( *ex != null)
2011 Sep 09
3
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
Hi there, I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called. I don't know if this is an LLVM or Clang issue, from looking at the IR (see below) it looks like the destructor is being tied to cxa_atexit, and I wonder if that is not called by
2012 Apr 10
3
[LLVMdev] How to explain this weird phenomenon????????
I did it !!!! YOU MADE MY DAY !!!!!!!!!!!!!!! -- 祝好! 甄凯 ------------------------------------------------------------------------------------------------------ 2012-04-10 ------------------------------------------------------------------------------------------------------ Name: 甄凯(ZhenKai) Homepage:http://www.renren.com/262729393 Email: zhenkaixd at 126.com or 846227103 at
2012 Jan 27
2
[LLVMdev] How to get the string value?
Hi, if I have some LLVM code like this: @.str = private unnamed_addr constant [7 x i8] c"in_arr\00", align 1 @.str1 = private unnamed_addr constant [8 x i8] c"in_arr2\00", align 1 @.str2 = private unnamed_addr constant [8 x i8] c"out_arr\00", align 1 ... ... call void (...)* @_Z16fooz(i8* *getelementptr inbounds ([7 x i8]* @.str, i64 0, i64 0)*, i32 0, i32 1024)
2016 Nov 28
2
Looking for help with an ast matcher
Hi Piotr, I think I found a working matcher: match ifStmt(hasCondition(implicitCastExpr(hasImplicitDestinationType(isInteger()), has(cxxMemberCallExpr(callee(cxxMethodDecl(hasName("compare"))), hasArgument(0, declRefExpr().bind("str2")), callee(memberExpr(has(declRefExpr().bind("str1"))))))))).bind("case1") This one bind to both str1 and str2 in
2016 Nov 28
2
Looking for help with an ast matcher
Hi Piotr, Thanks. Yeah, it seemed a little weird, but it was what got me closest. I found out that the matcher I supplied here was working for clang-query 3.8.1. I'm working on a clang-tidy module for 4.0.0 - it's not working there. Could you elaborate on the "onImplicitObjectArgument"? There is no document on it on the clang page. So I wouldn't know how it works or what it
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
Hi, I am trying to print two strings using printf. I have tried various things, but keep getting this error: llc: printf.ll:4:11: error: '@printf' defined with type 'i32 (i8*, ...)*' %1 = call i32 @printf(i8* null, i8*, i8* null) The code is: declare i32 @printf(i8* nocapture readonly, ...) nounwind define i32 @main() nounwind { %1 = call i32
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
I just tried adding the cast but it didn't help. I have the feeling that I am overlooking something very obvious, but I can't seem to figure out what it is. Thanks for your suggestion, though. -- Mikael 2013/12/3 Eli Bendersky <eliben at google.com> > > > > On Tue, Dec 3, 2013 at 2:29 PM, Mikael Lyngvig <mikael at lyngvig.org> wrote: > >> Hi,
2016 Nov 27
2
Looking for help with an ast matcher
Adding cfe-dev, because it is related to clang, not LLVM. 2016-11-27 22:34 GMT+01:00 Piotr Padlewski <piotr.padlewski at gmail.com>: > Hi Mads, > Can you provide the code that you run clang-query on, or at least AST for > the fragment you want to match? > > Piotr > > 2016-11-26 22:27 GMT+01:00 Mads Ravn via llvm-dev <llvm-dev at lists.llvm.org > >: >
2008 Jan 06
4
[LLVMdev] Another memory fun
Yes, I agree with you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/efb1c465/attachment.html>
2011 Feb 18
0
[LLVMdev] Adding "S" suffixed ARM/Thumb2 instructions
On Feb 17, 2011, at 10:35 PM, Вадим Марковцев wrote: > Hello everyone, > > I've added the "S" suffixed versions of ARM and Thumb2 instructions to tablegen. Those are, for example, "movs" or "muls". > Of course, some instructions have already had their twins, such as add/adds, and I leaved them untouched. Adding separate "s" instructions is
2008 Jan 06
4
[LLVMdev] Another memory fun
Hey again) Now I have next code: ; ModuleID = 'sample.lz' @.str1 = internal global [8 x i8] c" world!\00" ; <[8 x i8]*> [#uses=1] @.str2 = internal global [8 x i8] c"hello, \00" ; <[8 x i8]*> [#uses=1] @.str7 = internal global [21 x i8] c"welcome to out hall!\00" ; <[21 x i8]*> [#uses=1] declare i32 @puts(i8*)
2012 Apr 10
0
[LLVMdev] How to explain this weird phenomenon????????
Hi, my friends I finally insert the callInst into the hello.bc file.Then I compile the hello.bc to hello.o file and the check.c to check.o file. And I think by link those to .o file togetherI can get the executable ELF file(clang hello.o check.o -o finalfile). But when I link the two objective file, it said "hello.o: In function `main': hello.bc:(.text+0x69): undefined reference to
2008 Jan 06
0
[LLVMdev] Another memory fun
but why this code don't work: ; ModuleID = 'sample.lz' @.str1 = internal global [6 x i8] c"world\00" ; <[6 x i8]*> [#uses=1] @.str2 = internal global [7 x i8] c"hello \00" ; <[7 x i8]*> [#uses=1] @.str7 = internal global [7 x i8] c"father\00" ; <[7 x i8]*> [#uses=1] @.str8 = internal global [8 x i8]
2012 Apr 10
1
[LLVMdev] How to explain this weird phenomenon????????
Your files do not appear to implement the check() function. On Tue, Apr 10, 2012 at 4:57 PM, 15102925731 <zhenkaixd at 126.com> wrote: > Hi, my friends > > I finally insert the callInst into the hello.bc file.Then I compile the > hello.bc to hello.o file and the check.c to check.o file. And I think by > link those to .o file togetherI can get the executable ELF file(clang
2011 Feb 18
2
[LLVMdev] Adding "S" suffixed ARM/Thumb2 instructions
Hello everyone, I've added the "S" suffixed versions of ARM and Thumb2 instructions to tablegen. Those are, for example, "movs" or "muls". Of course, some instructions have already had their twins, such as add/adds, and I leaved them untouched. Besides, I propose the codegen optimization based on them, which removes the redundant comparison in patterns like orr
2011 Sep 09
0
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
On Fri, Sep 9, 2011 at 1:36 PM, Graham Wakefield <wakefield at mat.ucsb.edu> wrote: > Hi there, > > I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called. > > I don't know if this is an LLVM or Clang issue, from looking at the IR (see
2006 Nov 12
4
[LLVMdev] need help understanding getelementptr assembler instruction
I am trying to understand the hello word assember example. This is my version: %str1 = internal constant [13 x sbyte] c"Hello World\0a\00" declare int %printf(sbyte*, ...) implementation ; Functions: int %main() { %str2 = getelementptr [13 x sbyte]* %str1, long 0, long 0 call int(sbyte*, ...) *%printf(sbyte* %str2) ret int 0 } Why is getelementptr being given two "long
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
Whoops... Seems I forgot the asterisk (*) after the cast. Or something. Because I did insert the cast and it didn't work. But NOW it works. Thank you for spending some time on this - and also for presenting the solution. -- Mikael 2013/12/4 Eli Bendersky <eliben at google.com> > This code: > > declare i32 @printf(i8* nocapture readonly, ...) nounwind > > define
2016 Nov 26
2
Looking for help with an ast matcher
Hi, Hope this is the right channel for this question. I am trying to make an ast matcher for clang-tidy to find str1.compare(str2), where both str1 and str2 are std::string. I have this so far: http://i.imgur.com/sUma9WC.png . But I am having a hard time finding a way to bind an id to the str1 part of the expression. Can anyone help me out with an idea? Best regards, Mads Ravn --------------