similar to: [LLVMdev] Changing the LLVM C API to remove a pass

Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Changing the LLVM C API to remove a pass"

2013 Mar 21
0
[LLVMdev] Changing the LLVM C API to remove a pass
Hi Meador, > I have finished migrating all of the simplify-libcalls pass > functionality into instcombine > and functionattrs. Now I am ready to completely to remove what is > left of the pass from > the source tree. However, there are a few C API functions for > creating and managing > the pass: > > /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
2013 Oct 29
1
[LLVMdev] Getting TargetData and TargetLibraryInfo for determining Malloc size
Hello; I was trying to use the computeArraySize() function from the MemoryBuiltins.cpp file. It requires two arguments DataLayout *TD and const TargetLibraryInfo *TLI. Can anyone tell me how to get the TargetLibraryInfo? I am getting the DataLayout using: DataLayout *TD; TD = new DataLayout(&M); I hope that's the right way of getting it. Thanks a lot; -- Arnamoy Bhattacharyya
2013 May 16
2
[LLVMdev] _Znwm is not a builtin
On May 15, 2013, at 10:32 PM, Richard Smith <richard at metafoo.co.uk> wrote: >>> Initially, I'm just concerned about keeping the optimizations we already perform, such as globalopt lowering a new/delete pair into a global, while disabling the non-conforming variations of those optimizations. But we're also permitted to merge multiple allocations into one if they have
2013 May 20
1
[LLVMdev] _Znwm is not a builtin
On May 16, 2013, at 12:36 PM, Richard Smith <richard at metafoo.co.uk> wrote: > > > Since it would probably help to quantify the complexity increase, I've implemented my more recent suggestion (patch attached). This patch allows 'nobuiltin' on a function declaration or definition, and adds a 'builtin' attribute which can only be present on a call site for a
2016 Jun 07
3
llvm intrinsics/libc/libm question
I'm trying to figure out exactly how the intrinsics/libc/libm work in llvm. For example, this code return user defined function: float acos(float x, float y) { return x+y; } float a; void foo(float b, float c) { a = acos(b, c); } But this code returns llvm.intrinsic: float acos(float, float); float a; void foo(float b, float c) { a = acos(b, c); } float acos(float x, float y) {
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
Hi All I am a novice LLVM user trying to use LLVMConstIntOfString using the c api to get a integer of arbitrary size from a hexadecimal string. Example code follows: LLVMContextRef context = LLVMContextCreate(); LLVMValueRef value = LLVMConstIntOfString(LLVMInt64TypeInContext(context), "0x0000000f0000ffff", 16); This is working properly as expected. However I have noticed that
2013 May 16
0
[LLVMdev] _Znwm is not a builtin
On Thu, May 16, 2013 at 10:13 AM, Chris Lattner <clattner at apple.com> wrote: > On May 15, 2013, at 10:32 PM, Richard Smith <richard at metafoo.co.uk> wrote: > > Initially, I'm just concerned about keeping the optimizations we already >>> perform, such as globalopt lowering a new/delete pair into a global, while >>> disabling the non-conforming
2013 Sep 08
0
[LLVMdev] Disabling special treatment of "malloc" function
Hi Chris, > For now I've added a flag to MDA such that malloc clobbers rather than > resolving to undef; however I was wondering if there is a "proper" way to do > this with any compiler targeting LLVM? Clang has an option "-fno-builtin" that disables such assumptions (by adding the attribute "nobuiltin" to the relevant callsites by the looks of it). Is
2013 Sep 08
2
[LLVMdev] Disabling special treatment of "malloc" function
Hi, I'm using uclibc built with dragonegg-3.2 / gcc-4.6, and ran into a problem in which: * uclibc's realloc malloc()'s some memory * realloc then uses (malloc'd pointer) - some offset to find the true size allocated. * MemoryDependenceAnalysis (MDA) regards load from (malloc() call + any offset) to be undefined, and replaces the size read with 0. * All manner of chaos results
2014 Aug 05
2
[LLVMdev] LLVM as a shared library
On Tue, Aug 5, 2014 at 2:57 PM, Filip Pizlo <fpizlo at apple.com> wrote: > > On Aug 5, 2014, at 2:51 PM, Eric Christopher <echristo at gmail.com> wrote: > > On Tue, Aug 5, 2014 at 2:49 PM, Filip Pizlo <fpizlo at apple.com> wrote: > > > On Aug 5, 2014, at 1:46 PM, Eric Christopher <echristo at gmail.com> wrote: > > (7) Make the C API truly great.
2016 Sep 12
2
Counterintuitive use of LLVMBool in C-API?
Hi, I stumbled across the following: > /* Builds a module from the bitcode in the specified memory buffer, > returning a > reference to the module via the OutModule parameter. Returns 0 on success. > */ > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, > LLVMModuleRef *OutModule); However in most scenarios i know, a Bool is something like 0 = False !0 = True In short:
2016 Sep 12
1
Counterintuitive use of LLVMBool in C-API?
Of course, this is normal for C-APIs. But maybe change the name to LLVMResult to propagate the real use? I am not arguing about the results themself. They are standard. But the name is missguiding. As long as it's consistent i know that i have to write an extra record operator in Delphi to reflect this. 2016-09-12 11:11 GMT+02:00 David Chisnall <David.Chisnall at cl.cam.ac.uk>: > On
2017 Sep 18
0
Counterintuitive use of LLVMBool in C-API?
Okay after translating the headers to Delphi, i found more inconsistencies: > LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, > LLVMTypeRef *ParamTypes, unsigned ParamCount, > LLVMBool IsVarArg); > In this case it is the other way around. 0 means False and anything else means true :/ (so it acts more like a
2005 Jun 28
2
[LLVMdev] Re: llvm linux/PPC cfrontend
Cyrille Mescam wrote: > Morning, > > I would like to know if you received my mail with the assembly code > you wanted. > > It not, i'll send it again to you. > > Thanks for your help. > > Regards. > > Cyrille > I've looked into the files you sent me, and it seems that the problem is occuring due to the C library simplication pass (which is run
2012 Apr 25
2
[LLVMdev] Crash in JIT
Hello, [Using LLVM r155315, according to `svn log | head`] I am experimenting with programatically building and jitting functions in a module, and I seem to be coming across a crash in some generated code. Using the llvm-c interface I build up the module which dumps like this: ; ModuleID = 'MyModule' target datalayout = "i686-apple-darwin11" target triple =
2013 Jul 18
3
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
Andy and I briefly discussed this the other day, we have not yet got chance to list a detailed pass order for the pre- and post- IPO scalar optimizations. This is wish-list in our mind: pre-IPO: based on the ordering he propose, get rid of the inlining (or just inline tiny func), get rid of all loop xforms... post-IPO: get rid of inlining, or maybe we still need it, only
2012 Dec 14
1
[LLVMdev] MemoryBuffer C Bindings - LLVMCreateMemoryBufferWithArray
I would like to use the LLVM-C bindings to provide LLVM access with an OO-design in another language (D), e.g. map from the C API back up to a D API that closely resembles the original C++ API. Since I would like to have D (with its own exception system) to handle the IO, I need a new C API function (unless there is one and I haven't found it): LLVMBool
2013 Feb 17
0
[LLVMdev] [llvm-c] LLVMInitializeNativeTarget not exported in shared library
Dear LLVM devs (and other subscribers), when building llvm as a shared library (so or dll, tested with both) and then performing objdump on the resulting library will reveal that LLVMInitializeNativeTarget does not get exported ("objdump -x libLLVM-3.3svn.so | grep LLVMInitializeNativeTarget" will return without any output). As far as I can tell this is because the function is
2012 Apr 25
0
[LLVMdev] Crash in JIT
Hi David, I'm not certain, but to me the "LLVMSetTarget(module, "i686-apple-darwin11");" line looks suspicious. I'm not familiar with all the ins and outs of how target triples get handled, but it looks to me like that's requesting 32-bit code. I think that if you omit that line completely then the target will be inferred from the execution environment. My best
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
I get a crash when I try to link multiple modules registered in their individual contexts. Documentation for Linker::LinkModules doesn't mention anything about contexts, and the first link succeeds. But the second link crashes. Is this not the right way to merge such modules? If not, then what is the right way? In any case, documentation for Linker::LinkModules should say if contexts are