similar to: [LLVMdev] Problem with "Does not dominate all uses"

Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Problem with "Does not dominate all uses""

2012 Aug 20
0
[LLVMdev] Problem with "Does not dominate all uses"
In your original file, %6 is defined in if.end11 and is used in cond.end. if.end11 branches to cond.true and cond.false, both of which branch unconditionally to cond.end. Therefore %6 dominates its use. In your second file %18 is defined in end.11 and used in cond.end. However, end.11 no longer dominates cond.end because you have rewritten all branches to go through the switch statement in
2019 Jul 24
2
Intrinsics InstrReadMem memory properties
Ok, now I think I've found a bug: Consider this C code: void bar(int b) { int a[10]; memset(a, b, 10); } which generates this IR code: define dso_local void @bar(i32 %b) #0 { entry: %b.addr = alloca i32, align 4 %a = alloca [10 x i32], align 16 store i32 %b, i32* %b.addr, align 4 %arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %a, i64 0, i64 0 %0 = bitcast i32*
2014 Apr 11
2
[LLVMdev] llvm cse optimization
I'm working on the across the subprogram call optimization, and let's say the following llvm IR, @ng0 = internal global [2 x i32] [i32 2, i32 0], align 4 %t7 = alloca [16 x i8], align 16 %add.ptr = getelementptr inbounds i8* %t1, i64 40 %call = call i8* @handle_value(i8* %add.ptr, i32 3) #3 %arraydecay = getelementptr inbounds [8 x i8]* %t3, i64 0, i64 0 %arraydecay1 =
2011 Dec 16
3
[LLVMdev] load widening conflicts with AddressSanitizer
Hello, We've just got a bug report from Mozilla folks about AddressSanitizer false positive with -O2. Turns out there is a conflict between load widening and AddressSanitizer. Simple reproducer: % cat load_widening.c && echo ========= && clang -O2 -c load_widening.c -flto && llvm-dis load_widening.o && cat load_widening.o.ll void init(char *); int foo() {
2016 Dec 28
0
why clang compile local to global
> On Dec 27, 2016, at 11:09 PM, liuyu11 at ict.ac.cn via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 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; >
2011 Dec 16
0
[LLVMdev] load widening conflicts with AddressSanitizer
On 12/16/11 12:24 PM, Kostya Serebryany wrote: > Hello, > > We've just got a bug report from Mozilla folks about AddressSanitizer > false positive with -O2. > Turns out there is a conflict between load widening and AddressSanitizer. > > Simple reproducer: > % cat load_widening.c&& echo =========&& clang -O2 -c load_widening.c -flto&&
2019 May 29
2
Problem of getNumOperands() for CallInst
Hi all, I got a interesting problem when calling getNumOperands() of CallInst. For example, call void @_Z2f2PA100_i([100 x i32]* nonnull %arraydecay) If I use getNumOperands(), it will return 2. However, if I use getCalledFunction()->getNumParams(), it will return 1. According to the IR, I think the number of operands of the call instruction should be 1. I
2005 Jul 29
1
[LLVMdev] help with pointer-to-array conversion
OK, thanks Chris, I've found that running opt -loopsimplify -instcombine -indvars -stats gives me the setup I need for this transformation, and a small patch makes it happen in the simple case we discussed. However, I'm having some trouble when things get a bit more complicated with 3 nesting levels: int A[3000000], B[20000], C[100], Z; int main() { int i, j, k, *a, *b,
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],
2019 Jul 24
2
Intrinsics InstrReadMem memory properties
Hi Johannes, Thanks for your reply. I now see more clearly how things work with these properties. However, what would be an object whose address is potentially known by a callee? I suppose the intrinsic arguments and global variable? So IIUC, if not restricted by *only properties, an intrinsic could access to: - only its arguments if IntrArgMemOnly specified, - its arguments and the global
2011 Dec 16
2
[LLVMdev] load widening conflicts with AddressSanitizer
On Fri, Dec 16, 2011 at 12:19 PM, John Criswell <criswell at illinois.edu> wrote: > On 12/16/11 12:24 PM, Kostya Serebryany wrote: > > Hello, > > We've just got a bug report from Mozilla folks about AddressSanitizer false > positive with -O2. > Turns out there is a conflict between load widening and AddressSanitizer. > > Simple reproducer: > > % cat
2006 Feb 06
5
Sentry Plugin - Easy Question I don''t doubt
I am looking at adding the Sentry plugin to one of the applications that we are working on. I have a need to store some info that will have to be encrypted and decrypted. I have been going through the docs for the plugin and the AsymetricSentry class looks like the best for what we need to do but I am not sure how to generate the key. The docs say: This is a shortcut for using an
2011 Apr 17
0
[LLVMdev] Regarding BasicBlock Cloning
On Sat, Apr 16, 2011 at 5:01 PM, tarun agrawal <tarun at cse.iitb.ac.in> wrote: > The clone llvm:CloneBasicBlock copies the phi function in the replicated > basic block from the original basic block. > I don't want the copy of phi in relplicated block. For now I am creating .bc > file with -O0 option so that it doesn't generate phi function in first > place. Is this a
2019 Feb 07
2
RFC: [DebugInfo] Improving Debug Information in LLVM to Recover Optimized-out Function Parameters
Hi, Following is a proposal to improve location coverage for Function parameters in LLVM. The patches for review will be posted soon. RFC: [DebugInfo] Improving Debug Information in LLVM to Recover Optimized-out Function Parameters Ananthakrishna Sowda(Cisco), asowda at cisco.com Nikola Prica (RT-RK/Cisco), nprica at rtrk.com Djordje Todorovic(RT-RK/Cisco), djtodorovic at rtrk.com Ivan Baev
2011 Apr 17
4
[LLVMdev] Regarding BasicBlock Cloning
The clone llvm:CloneBasicBlock copies the phi function in the replicated basic block from the original basic block. I don't want the copy of phi in relplicated block. For now I am creating .bc file with -O0 option so that it doesn't generate phi function in first place. Is this a good approach or there are some other function available for it. Tarun On Sun, Apr 17, 2011 at 5:22 AM, Eli
2011 Aug 17
2
[LLVMdev] Non "folding" Stack Allocation
Following a question on StackOverflow [1], I was wondering if for big allocations, LLVM would "delay" the allocation or rather perform it upfront. The following code was thus submitted to the LLVM Try Out page: void doSomething(char*,char*); void function(bool b) { char b1[1 * 1024]; if( b ) { char b2[1 * 1024]; doSomething(b1, b2); } else { char
2019 Jul 25
2
Intrinsics InstrReadMem memory properties
So I removed the 'tail' from the call and try out different properties: - IntrNoMem: memset() and the intrinsic are both optimized away as expected - IntrWriteMem: memset() optimized away by DSE but the intrinsic isn't. I would expect both to be removed, since the intrinsic is now also a dead store. - IntrReadMem: memset() and the intrinsic are both optimized away *unexpectedly* (CSE
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
Thanks for your reply. After I change Cstr to gI, it compiled successfully. Thanks again. Another question is for constructing getelementpt. // C code char gStrA[10] = "test str"; // here is Global variable,gStrA and initializer "test str" char gStrB[10]= "test str2"; main(){ int = i; char *pGVars[20]; // here, the pGVar is for storing the address of each
2019 Feb 08
3
RFC: [DebugInfo] Improving Debug Information in LLVM to Recover Optimized-out Function Parameters
Thank you for your interest and comments! Please see my responses inline. On 2/7/19, 3:17 PM, "aprantl at apple.com on behalf of Adrian Prantl" <aprantl at apple.com> wrote: > On Feb 7, 2019, at 1:49 PM, Ananthakrishna Sowda (asowda) via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > Following is a proposal to improve location
2013 Feb 14
1
[LLVMdev] LiveIntervals analysis problem
Hello everyone, please I need your help. To reproduce my problem I created simple pass for backends (TestPass.cpp in attached files). That pass I call from Mips backend in this way (MipsTargetMachine.cpp): bool MipsPassConfig::addPreRegAlloc() { addPass(createTestPass()); return false; } The problem becomes, when I am trying compile file ldtoa.ll (in attached files). Compiling