similar to: How to optimize store of constant arrays

Displaying 20 results from an estimated 800 matches similar to: "How to optimize store of constant arrays"

2012 Oct 18
1
[LLVMdev] Incrementing a pointer to array element?
Using the LLVM C++ API, if I want to create an array via an Alloca instruction like: Value *a = ir_builder.CreateAlloca( my_type, my_size ); and then I want to initialize each element of the array with values computed elsewhere like: for ( vector<Value*>::const_iterator i = v.begin(); i != v.end(); ++i ) { builder.CreateStore( *i, a ); // How do I increment 'a' to point to
2013 Jan 02
0
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
Hi Duncan & Tobi, Thanks a lot for your interest, and for pointing out differences in GIMPLE I missed. Attached is simplified test case. Is it good? Tobi, regarding runtime alias analysis: in KernelGen we already do it along with runtime values substitution. For example: <------------------ __kernelgen_main_loop_17: compile started ---------------------> Integer args substituted:
2018 Dec 13
2
Setting a function in a module to extern
But in my module this function already exist… I first want to delete it but without also deleting the calls to it… From: Boldizsar.Palotas at esa.int <Boldizsar.Palotas at esa.int> Sent: Donnerstag, 13. Dezember 2018 10:53 To: Gaier, Bjoern <Bjoern.Gaier at horiba.com> Cc: LLVM Developers Mailing List <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Setting a function in a
2013 Jan 02
2
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
On 01/01/2013 02:45 PM, Duncan Sands wrote: > Hi Dmitry, > >> >> In our compiler we use a modified version LLVM Polly, which is very >> sensitive to >> proper code generation. Among the number of limitations, the loop region >> (enclosed by phi node on induction variable and branch) is required to >> be free >> of additional memory-dependent
2017 Aug 17
3
[RFC] Injecting new element atomic memory intrinsics into MemIntrinsic class hierarchy
Hi all, We somewhat recently created/updated element-wise unordered-atomic versions of the memcpy, memmove, and memset memory intrinsics: Memcpy: https://reviews.llvm.org/rL305558 Memmove: https://reviews.llvm.org/rL307796 Memset: https://reviews.llvm.org/rL307854 These intrinsics are semantically similar to the regular versions. The main difference is that the underlying operation is performed
2013 Sep 18
2
[LLVMdev] JIT compiled intrinsics calls is call to null pointer
Hi everyone, I am trying to call an LLVM intrinsic (llvm.pow.f32), inserted with the following call: std::vector<llvm::Type *> arg_types;arg_types.push_back(llvm::Type::getFloatTy(context));auto function=llvm::Intrinsic::getDeclaration(module, llvm::Intrinsic::pow, arg_types);auto result=ir_builder->CreateCall(function, args); When I try to execute the code generated by the JIT
2009 Jul 30
2
[LLVMdev] How to produce a "Intrinsic Function" call instruction?
Hi, all. I have noticed that LLVM supports some Intrinsic Functions such as *"** llvm.sadd.with.overflow"* described in http://llvm.org/docs/LangRef.html#int_sadd_overflow. We can use these functions and needn't define the function bodies. For example, I can manually insert codes: * %res = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b) %sum = extractvalue
2017 Aug 21
2
[RFC] Injecting new element atomic memory intrinsics into MemIntrinsic class hierarchy
Hi Sanjoy, Response/thoughts below... On Aug 19, 2017, at 3:13 PM, Sanjoy Das <sanjoy at playingwithpointers.com<mailto:sanjoy at playingwithpointers.com>> wrote: Hi Daniel, On Thu, Aug 17, 2017 at 8:32 AM, Daniel Neilson via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Cons: One more attribute to check when implementing a pass that
2018 Sep 19
4
CMake build of LLVM/clang with -DCMAKE_BUILD_TYPE=Release does not create release versions?
>because with that generator the CMAKE_BUILD_TYPE variable is ignored >because it is a "multi-configuration target". thanks for the link, is that a bug in the CMake configuration (or better not getting any warning) or is there just documentation missing? so i can use --config Debug or --config Release and get the correct results - i hope that works the build takes hours
2018 Dec 13
2
Setting a function in a module to extern
Hello again, as mentioned in a different mail, I'm a beginner with the LLVM and writing a JIT-Client under Windows. In my llvm::Module I have a certain function - now I want to delete this function, but keep all the calls and references to it. I kind of want to set the function to an external function. Is this possible? Kind greetings Björn Als GmbH eingetragen im Handelsregister Bad
2013 Jan 04
4
[LLVMdev] [Polly] Aliasing problems escalation (WAS: Re: [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?)
Hi, Here's another case, different in high-level, but similar in low-level. When Fortran allocatable array is defined in module, its actual dimensions are kept in internal structure. Loads originated from reading these dimensions confuse Polly on any use of this array. Attachments: 1) Sample Fortran source code (to be compiled with and without -DMODULE to see failing and working version,
2013 Sep 19
1
[LLVMdev] JIT compiled intrinsics calls is call to null pointer
Hi Andrew, this sounded a plausible explanation, because the X86 processor does not have an instruction to calculate the power function. So I tried the llvm.sin.f32 intrinsic, as the X86 processor family does have an instruction for that, but I still get the same problem. While you may still be right, there is at least something else going on as well. Thanks for your input, though. Taco.
2004 Oct 23
0
[LLVMdev] Some question on LLVM design
On Fri, Oct 22, 2004 at 03:18:00PM +0200, Marc Ordinas i Llopis wrote: > I'm currently looking at LLVM as a possible back-end to a dynamic > programming system (in the tradition of Smalltalk) we are developing. Neat! > I have read most of the llvmdev archives, and I'm aware that some > things are 'planned' but not implemented yet. We are willing to > contribute
2018 Sep 19
2
CMake build of LLVM/clang with -DCMAKE_BUILD_TYPE=Release does not create release versions?
>are you setting the optimized tablegen option? LLVM_OPTIMIZED_TABLEGEN is not active - i will try that >In addition, make sure you have plenty of memory i've got only Intel Core 2 Quad CPU Q8300/2.50Ghz and 8GB RAM for testing not much cpu power AND memory Am 19.09.2018 um 11:31 schrieb James Henderson: > Regarding the Debug build taking hours, are you setting the optimized
2017 Jun 04
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
Emitting calls to these functions (written in an .ll file linked in) works fine, and does the right thing. %Any = type { i8*, i32 } define dllexport void @setGlobal(%Any* %ptr, %Any %value) { store %Any %value, %Any* %ptr ret void } define dllexport %Any @getGlobal(%Any* %ptr) { %val = load %Any, %Any* %ptr ret %Any %val } Trying to replace the setGlobal call with what should be
2017 Jun 05
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
Since the getelementptrs were implicitly generated by the CreateStore/Load I'm not sure how to get access to them. So I hacked the assignment to be done thrice: once using a manual decomposition into two GEPs and stores, once using the "big" CreateStore, once via the setGlobal function, printing addresses and memory contents at each point to the degree that I have access to them.
2014 Oct 28
2
[LLVMdev] Storing values in global variables
Hello, I have written a pass that works nicely if I use it with the opt tool, as proposed by the "Writing an LLVM Pass" tutorial. Now I want to execute this pass directly when clang is executed. I use the technique described here: http://homes.cs.washington.edu/~asampson/blog/clangpass.html. The pass is loaded and executed, when I run clang with the right command line. But clang
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
On Mon, Jun 5, 2017 at 1:34 PM, Nikodemus Siivola < nikodemus at random-state.net> wrote: > Uh. Turns out that if I hide the pointer to @foo from LLVM by passing it > through an opaque identity function ... then everything works fine. > > Is this a bug in LLVM or is there some magic involving globals I'm > misunderstanding? > This looks like a bug in the handling of
2015 Jun 30
4
[LLVMdev] Crashes on Windows 8 with >4k stack frames
Hi All, we have an issue with our LLVM-based JIT compiler - executing the compiled code corrupts memory (and subsequently crashes) if we alloca more than 4k of variables (more than 511 8-byte ints). The same code works on Windows 7 (32 and 64 bit), Linux, MacOS. We compile LLVM and our program with Microsoft's Visual Studio 2010. Both debug and release builds are affected. The variables
2019 Jul 03
2
optimisation issue in an llvm IR pass
Hello, I have an optimisation issue in an llvm IR pass - the issue being that unnecessary instructions are generated in the final assembly (with -O3). I want to create the following assembly snippet: mov dl,BYTE PTR [rsi+rdi*1] add dl,0x1 adc dl,0x0 mov BYTE PTR [rsi+rdi*1],dl however what is created is (variant #1): mov dl,BYTE PTR [rsi+rdx*1] add dl,0x1 cmp