similar to: [LLVMdev] emit broken llvm code

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] emit broken llvm code"

2012 Apr 13
4
[LLVMdev] gdb + clang/llvm
Hi all, I currently have a problem setting up gdb with clang/llvm. I configured llvm/clang (trunk) with: ../llvm/configure --prefix=PROJECT_DIR/install_debug --enable-expensive-checks --enable-targets=host --enable-debug-runtime --enable-shared Now, when I invoke gdb with the freshly built clang it basically works. I can look at backtraces, set breakpoints and so on but breakpoints are never
2012 Apr 13
2
[LLVMdev] gdb + clang/llvm
Hi Eric, I'm using gcc. My make command is make -j9 as mentioned earlier, the -cc1 switch did the trick for me. Thanks for helping out. -- Roland ----- Original Message ----- > From: "Eric Christopher" <echristo at apple.com> > To: "Roland Leißa" <leissa at cs.uni-saarland.de> > Cc: LLVMdev at cs.uiuc.edu > Sent: Freitag, 13. April 2012 14:39:53
2012 May 18
5
[LLVMdev] Phi + Select Optimization
Hi all, I've just written a small enhancement to SimplifyPHINode. The idea is the following: If we have this: a = phi(X, X, undef, undef, X, undef) X = select cond, sth, a or this: a = phi(X, X, undef, undef, X, undef) X = select cond, a, sth we can replace the phi by 'a' and the select by 'sth'. Why does this work? Well, in those cases where control-flow happens to
2013 Feb 26
1
[LLVMdev] passing vector of booleans to functions
Hi Duncan, thanks for the hint. I tried both variants: define <4 x float> @masked_add_1(<4 x i1> signext %mask, <4 x float> %a, <4 x float> %b) define <4 x float> @masked_add_32(<4 x i32> %mask, <4 x float> %a, <4 x float> %b) Unfortunately, this will raise an assertion: Wrong types for attribute: zeroext signext noalias nocapture sret byval nest
2012 Apr 13
0
[LLVMdev] gdb + clang/llvm
On Apr 13, 2012, at 2:19 PM, Roland Leißa <leissa at cs.uni-saarland.de> wrote: > Hi all, > > I currently have a problem setting up gdb with clang/llvm. > > I configured llvm/clang (trunk) with: > ../llvm/configure --prefix=PROJECT_DIR/install_debug --enable-expensive-checks --enable-targets=host --enable-debug-runtime --enable-shared > > Now, when I invoke gdb
2012 Apr 13
0
[LLVMdev] gdb + clang/llvm
On Apr 13, 2012, at 3:45 PM, Roland Leißa <leissa at cs.uni-saarland.de> wrote: > Hi Eric, > > I'm using gcc. My make command is > make -j9 > > as mentioned earlier, the -cc1 switch did the trick for me. Thanks for helping out. Aha. Yes, that'd do it. Glad you're up and debugging. -eric
2012 Apr 23
0
[LLVMdev] gdb + clang/llvm
On Apr 23, 2012, at 2:14 PM, Roland Leißa <leissa at cs.uni-saarland.de> wrote: > As you can see the line is question is executed but the breakpoint is not triggered. Apparently, clang executes the code generation in a different process. What do I have to do in order to debug this process? What you did before, run it under -cc1. The best way is to use -v to get the full -cc1 line and
2012 Apr 30
1
[LLVMdev] Bindings/Ocaml/ext_exc.ml' FAILED
Hi all, from llvm-trunk I'm getting this failure: llvm[0]: Running test suite make[1]: Entering directory `/home/rleissa/projects/llvm/build_debug/test' Making a new site.exp file... Making LLVM 'lit.site.cfg' file... Making LLVM unittest 'lit.site.cfg' file... make -C /home/rleissa/projects/llvm/build_debug/test/../tools/clang/test lit.site.cfg Unit/lit.site.cfg
2012 Apr 23
4
[LLVMdev] gdb + clang/llvm
> > ok, I now have a problem in the code generator. > > Let's say I want to set a breakpoint somewhere in > > clang/lib/CodeGen/CGExprScalar.cpp > > > > What do I have to do in order to trigger breakpoints, see > > backtraces and so on? > > You set a breakpoint and ask to see a backtrace? > > -eric haha, OK, I think I should be more specific.
2012 Apr 13
0
[LLVMdev] gdb + clang/llvm
Hi Roland, Is Foo.cpp a Clang source file? If so, make sure you run the compiler itself with "clang -cc1", not the compiler *driver* with bare "clang". See here ( http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-March/020275.html ) for a similar question. -Matt On 04/13/2012 04:19 PM, Roland Leißa wrote: > Hi all, > > I currently have a problem setting up gdb
2012 Apr 23
1
[LLVMdev] gdb + clang/llvm
Hi Jim, thanks for replying. As mentioned in my earlier mail, I have to specify -emit-obj along with -cc1 in order to trigger codegen. This solves the problem for me. As I learned from the last email, specifying -v is a good starting point in order to see what actually is happening and tackle such problems. -- Roland ----- Original Message ----- > From: "Jim Grosbach"
2012 Apr 23
0
[LLVMdev] gdb + clang/llvm
On Apr 23, 2012, at 2:14 PM, Roland Leißa <leissa at cs.uni-saarland.de> wrote: >>> ok, I now have a problem in the code generator. >>> Let's say I want to set a breakpoint somewhere in >>> clang/lib/CodeGen/CGExprScalar.cpp >>> >>> What do I have to do in order to trigger breakpoints, see >>> backtraces and so on? >>
2012 Apr 21
2
[LLVMdev] gdb + clang/llvm
ok, I now have a problem in the code generator. Let's say I want to set a breakpoint somewhere in clang/lib/CodeGen/CGExprScalar.cpp What do I have to do in order to trigger breakpoints, see backtraces and so on? -- Roland ----- Original Message ----- > From: "Eric Christopher" <echristo at apple.com> > To: "Roland Leißa" <leissa at cs.uni-saarland.de>
2013 Feb 26
0
[LLVMdev] passing vector of booleans to functions
Hi Roland, > define <4 x float> @masked_add_1(<4 x i1> %mask, <4 x float> %a, <4 x float> %b) { > entry: > %add = fadd <4 x float> %a, %b > %sel = select <4 x i1> %mask, <4 x float> %add, <4 x float> %a > ret <4 x float> %sel > } > > I will get: > > addps %xmm1, %xmm2 > pslld $31, %xmm0 >
2013 Feb 26
2
[LLVMdev] passing vector of booleans to functions
Hi all, I'm currently trying to figure out the best way to pass vector of booleans to other functions. Take this small example: define <4 x float> @vcmp_add(<4 x float> %a, <4 x float> %b) { entry: %cmp = fcmp olt <4 x float> %a, %b %add = fadd <4 x float> %a, %b %sel = select <4 x i1> %cmp, <4 x float> %add, <4 x float> %a ret <4 x
2008 May 28
0
[LLVMdev] Troubling promotion of return value to Integer ...
Hi Chris, please read below: > In many cases that is true, but for indirect calls (calls through a > function pointer) it isn't. > > > All that is needed is to add some kind of sign attribute to the > > definition of callee function which will be set by the front-end and > > eventually saved in Function class. > > Sure. Adding an attribute is what we need
2008 May 28
2
[LLVMdev] Troubling promotion of return value to Integer ...
On May 27, 2008, at 3:33 PM, <Alireza.Moshtaghi at microchip.com> <Alireza.Moshtaghi at microchip.com > wrote: > Chris, > I see, so in deed the front-end sets the attributes on the declaration > of the called function; which in theory is also available to the > caller > through the CALL node. Right. > Now here is what I think: > I agree that 4 attributes are
2015 Jul 23
2
[LLVMdev] signext on function parameters and return.
Hello, For a simple function taking a short and returning a short, clang generates IR with this function signature: define signext i16 @foo(i16 signext %x) Some questions please: 1) For the input parameter and return value, does the target control whether clang uses signext vs something else? If so, how does this target query work? 2) Does the presence of the signext mean it's imperative
2012 May 20
0
[LLVMdev] Phi + Select Optimization
Hi Roland, > If we have this: > > a = phi(X, X, undef, undef, X, undef) such a phi should already be replaced by X if X dominates this basic block. Is this not the case? Or does each X here not necessary represent the same value? Ciao, Duncan. > X = select cond, sth, a > > or this: > > a = phi(X, X, undef, undef, X, undef) > X = select cond, a, sth > > we can
2016 Dec 28
3
why clang compile local to global
Hello,everyone: I want to known how to let clang compile my local array to local variables: I have the code : int main() { int a[3]={1,2,3}; int b=7; int c=8; int d=9; int e=10; int f=11; test(b,c,d,e,f,a); return 0; } I use clang command:clang --target=mipsel -emit-llvm -S a.c -o a.ll The a.ll is: @main.a = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 3],