similar to: Problem of getNumOperands() for CallInst

Displaying 20 results from an estimated 300 matches similar to: "Problem of getNumOperands() for CallInst"

2019 Jun 30
2
Information Loss of Array Type in Function Interface in IR Generated by Clang
Dear David, Thanks for your prompt reply! Sure, I can implement a AST visitor to go through the AST to get the information but I just wonder whether there is any other way to let Clang do so. What I am considering is how to let the generated IR looks like below, which some tools realize: define dso_local i32 @_Z1fPii([51 x i32]* %A, i32 %x) local_unnamed_addr #0 !dbg !7 { entry: ...
2019 Jun 30
2
Information Loss of Array Type in Function Interface in IR Generated by Clang
Dear all, Hi! Recently, I notice a situation where I cannot infer the size of the outermost dimension of array in the function interface. To concretely depict the problem, I show the C source code and the generated IR code at the end. The array size of A[] is 51 but this information is lost in the generated IR. How can I maintain such information in IR? Should I set some argument for
2020 Jun 24
2
Target specific named address spaces
Hi, Is there a way to implement named address spaces with clang/llvm as it is possible with gcc ? We would like to have our own named address space that would be recognized by the frontend. Thanks in advance! Regards, Sebastien
2019 Jan 31
4
Confusing ERROR with LoopAccessLegacyAnalysis: Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.
Dear all, I write a new LoopPass which wants to use passes including LoopInfoWrapperPass, ScalarEvolutionWrapperPass and LoopAccessLegacyAnalysis. Therefore, I implement the following code based on LLVM 9.0.0: ===================================================================== bool LoopInformationCollect::runOnLoop(Loop *L, LPPassManager &) { auto &SE =
2012 Aug 20
3
[LLVMdev] Problem with "Does not dominate all uses"
Hi! I'm having some trouble with a pass I'm writing. I'm using DemotePHIToStack to remove all phi node in my code with this code (this is the first thing I do in my pass): // Erase phi node vector<PHINode*> phis; for (Function::iterator i=f->begin();i!=f->end();++i) { for(BasicBlock::iterator b=i->begin();b!=i->end();++b) {
2019 Jun 12
2
Wrong Range of SCEV for URem
Dear all, Hi! I noticed an interesting situation when using getUnsignedRange and getSignedRange of SCEV for URem instruction. Here is an example with 2 IR instructions: %rem.lhs.trunc = trunc i32 %i15.082 to i8 --> getUnsignedRange --> [1,50) %rem81 = urem i8 %rem.lhs.trunc, 3 --> getUnsignedRange --> [-47,50) The problems are: 1) From my
2020 Jul 08
4
[RFC] Saturating left shift intrinsics
Hello, This is an RFC for adding intrinsics which perform saturating signed/unsigned left shift. There is currently a patch on Phabricator here: https://reviews.llvm.org/D83216 The intrinsics are of the form i32 @llvm.sshl.sat.i32(i32, i32) i32 @llvm.ushl.sat.i32(i32, i32) <4 x i32> @llvm.sshl.sat.v4i32(<4 x i32>, <4 x i32>) <4 x i32>
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 =
2019 Apr 15
2
Loop Strength Reduction Pass Does Not Work for Some Varialbles Related to Induction Variables
Dear Momchil, Thanks a lot for your prompt reply and kindly suggestion. The code will truly lead to some automatic unrolling with GCC and increase the number of operations in the assembly code. However, I am focus on the the IR optimization and the calculation of the array element offest, which may need multiplication if the IR instruction GEP is lowered to arithmetic operations. The
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() {
2018 Jun 12
2
ModulePass cannot be registered as EarlyAsPossible
Hello all, I've followed the example in https://github.com/CompilerTeaching/SimplePass/blob/master/SimplePass.cc in order to create a custom pass. The pass needs to be added before any transformation, so I used EP_EarlyAsPossible extension point to register it. Furthermore, I need to access to every GlobalVariable in the IR, so my pass has to be a ModulePass, like this: struct MyPass :
2019 Mar 31
2
Unable to find requested analysis info (Interesting Assertion Failture for Specific Target Source Code)
Dear all, Hi! I encounter an interesting assertion failure when implementing my Pass, which is defined with the member functions shown below: ======================My Pass====================================== bool MYPass::runOnModule(Module &M) { for (auto &F : M) { SE = &getAnalysis<ScalarEvolutionWrapperPass>(F).getSE(); ......
2019 Apr 15
2
Loop Strength Reduction Pass Does Not Work for Some Varialbles Related to Induction Variables
Dear all, Hi! Recently, I try to combine the passes SeparateConstOffsetFromGEP and LoopStrengthReduction to transform the multiplication in the lowered GEP IRs into addition. However, it seems LoopStrengthReduction is unable to remove all the multiplications for the element offset calculation. My test code is shown below and thanks a lot in advance for your time and suggestion!
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&&
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],
2018 Aug 23
4
[DebugInfo] DIBuilder missing interface to generate DWARF info for packed_decimal basic type.
Hello Paul, Thanks for the reply. Yes, I am only looking for dwarf support at the moment and planning to support both PLI/COBOL decimal types. Also thanks for the suggestion, you are right as it is going to be rare cases, so it will be better to implement a separate subclass to avoid memory overhead for others. >> (Somebody is actively working on scaled binary operations, although they
2019 Mar 04
2
Add Bitwidth Attribute in Clang without Modification in Source Code of Clang
I've actually got an implementation of this as an arbitrary precision integer extension that I've written up an RFC for (but not submitted). Below is my copy/pasted RFC (again, not reviewed, but I DO have an implementation of it that I need to prepare for review). I suspect my implementation will do what you need out of it. Its actually more significant than just adding a normal