search for: gm4cheng

Displaying 20 results from an estimated 20 matches for "gm4cheng".

2015 Aug 17
3
complexity of "mem2reg"?
Does anyone know what is the complexity of the "mem2erg" optimization on llvm ir? Is it linear or quadratic? Regards, -Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150817/c3b210f1/attachment.html>
2012 Aug 06
0
[LLVMdev] Question about llvm JIT
On Mon, Aug 6, 2012 at 9:35 AM, Peng Cheng <gm4cheng at gmail.com> wrote: > I have a function in llvm ir as follows: > > def [2 x [3 x double]] @fun() > { > return [ ... ]; // a [2 x [3 x double]] constant > } > > I would like to JIT this function in C. > > I first get the void pointer using: > > voi...
2012 Aug 06
2
[LLVMdev] Question about llvm JIT
I have a function in llvm ir as follows: def [2 x [3 x double]] @fun() { return [ ... ]; // a [2 x [3 x double]] constant } I would like to JIT this function in C. I first get the void pointer using: void *FPtr = TheExecutionEngine->getPointerToFunction( func ); Then I need to conver this void pointer to the corresponding C function pointer type, and then call the function
2013 May 08
5
[LLVMdev] Shared library support of llvm
According to http://llvm.org/docs/CMake.html, "Shared libraries are not supported on Windows and not recommended in the other OSes". The problem is that static libraries have some limitations, especially when linked into multiple shared libraries, the global data of llvm could have multiple copies leading to undefined behaviors. This has caused much pains during my usage of llvm. My
2013 Feb 08
0
[LLVMdev] help with X86 DAG->DAG Instruction Selection
Hi Peng, Can you please open a bugzilla and attache the LL file ? Can you please reproduce it on ToT ? Thanks, Nadav On Feb 7, 2013, at 9:08 PM, Peng Cheng <gm4cheng at gmail.com> wrote: > I have an llvm ir, which generates the following machine code using llc (llvm 3.0 on win32) after # *** IR Dump After X86 DAG->DAG Instruction Selection ***: > > The first three lines and the last two lines alone together are used to compute "sin"...
2013 Feb 26
1
[LLVMdev] llvm header fixes
Hi All, In my recent work using llvm to build a jit engine for a language, I saw some warnings and bug in the llvm headers. I made the fix locally and it works well. I am wondering how I could submit the fix back to llvm? Thanks, -Peng -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Jan 30
1
[LLVMdev] x86 code emitter ebp and esp conflicts
Bug is reported with test cases. see http://llvm.org/bugs/show_bug.cgi?id=15124 . Thanks, -Peng On Wed, Jan 30, 2013 at 12:14 PM, Anton Korobeynikov < anton at korobeynikov.info> wrote: > > Has anyone seen this problem before? and is there any fix or work around > > for that? > Please provide a testcase and fill LLVM problem report into bugzilla. > > Thanks! >
2013 May 08
0
[LLVMdev] Shared library support of llvm
...dll. Even if you did, I've heard there are issues with exporting more than 2^16 symbols. Adding targeted dllexport annotations won't work because non-Windows developers (the majority) shouldn't be burdened with keeping them up to date. On Wed, May 8, 2013 at 11:30 AM, Peng Cheng <gm4cheng at gmail.com> wrote: > According to http://llvm.org/docs/CMake.html, "Shared libraries are not > supported on Windows and not recommended in the other OSes". > > The problem is that static libraries have some limitations, especially > when > linked into multiple shar...
2013 Feb 08
2
[LLVMdev] help with X86 DAG->DAG Instruction Selection
I have an llvm ir, which generates the following machine code using llc (llvm 3.0 on win32) after # *** IR Dump After X86 DAG->DAG Instruction Selection ***: The first three lines and the last two lines alone together are used to compute "sin" for some double number. - line 1: move the stack pointer down 8 - line 2: copy the updated stack pointer to a base register - line 3: copy a
2013 Oct 10
1
[LLVMdev] assertion when -sse2 on x86-64
Hi, I have an ir at the end of this email. Run it with: llc -mcpu=i386 -march=x86-64 -mattr=-sse2 and get assertion below. Changing cpu does not help. I am using llc from the latest svn repository. Any suggestions to work around this? I need to disable sse2 instructions for x86-64. Thanks, -Peng -----error message------ llc: X86FloatingPoint.cpp:332: unsigned int getFPReg(const
2014 Sep 10
3
[LLVMdev] failed folding with constant array with opt -O3
I came in to an email this morning that said basically the same thing for the reduced example we were looking at. However, the original IR it came from (before hand reduction) had the data layout set correctly, so there's probably still *something* going on. It's just not what I thought at first. :) Philip On 09/10/2014 02:26 AM, Roel Jordans wrote: > Looking at the -debug
2012 Sep 12
1
[LLVMdev] dead store elimination with external functions
Maybe I should say b2 should be eliminated. Since b1 and b2 are same type and b1 is not used any more after the function call, b2 can be replaced by b1. This will save an alloca. In my test, if the function is not external, b1 is eliminated. But with external function, it did not. Since the ir is generated, I cannot manually update b2 with b1. I would like the optim pass do it. On
2013 Feb 14
0
[LLVMdev] difference between dash lines and solid lines in the scheduler’s dependency graph
Hi, I am looking at the the scheduler’s dependency graph. There are both dashed lines and solid lines. Could anyone tell what is the difference between dashed line and solid line? Thanks, -Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130214/978f223a/attachment.html>
2013 Mar 22
0
[LLVMdev] multiple thread jit support on windows ( win32 and win64 )
Hi, I am working on a jit engine using multiple threads using llvm 3.0. The multiple thread engine works fine on both linux and maci platforms, but failed when initializing ExecutionEngine from EngineBuilder.create() method when multiple threads are used on windows platform. On win32, the failure happened at the pass registration, and on win64, at the getPermanentLibrary. Has anyone used
2013 Jul 19
0
[LLVMdev] road blocks in support shared library of llvm
I am using llvm for a jit engine in a large project, in which multiple shared library modules link against llvm. Since llvm is recommended as a static library, this leads to shared library symbol conflicts, leading to llvm assertions in some global table look up or insertion during the shared library loading time. That forced me to hide all llvm symbols during the link time. An alternative
2013 Jan 30
3
[LLVMdev] x86 code emitter ebp and esp conflicts
Hi, I recently ran into a case, where x86 fails to run correctly. Checking into the emitted code, it seems that the local memory anchored at ebp has conflict with stack memory anchored at esp prepared for function calls. For example, let us say: foo() { ... call bar(); } There is some local data for foo() at ebp-170h. while preparing the call to bar, some data is written to esp+17h. The
2013 Oct 01
1
[LLVMdev] jit code linkage at run time
Hi, I am using llvm to generate jit code for numerical computation on window 7 64 platform. There is a function call, pow, in the jit code. The problem is that at run time, the pow function call sometimes links to msvcrt.dll, and sometimes to msvcr100.dll. These two calls from two dlls return different results, causing sporadic results. I tried to make the pow function either intrinsic or
2012 Dec 30
0
[LLVMdev] alignment issue, getting corrupt double values
I also saw this issue before. Llvm seems have trouble returning general struct values from functions. One easy workaround is to use packed struct type. Hope this helps. -Peng On Sunday, December 30, 2012, edA-qa mort-ora-y wrote: > I'm having an issue where a certain set of types and insert/extractvalue > are producing the incorrect values. It appears as though extractvalue >
2012 Sep 12
3
[LLVMdev] dead store elimination with external functions
Here is an llvm ir of a module. It seems that "b1" should be eliminated by dead store elimination. But it did not. Could anyone explain why and how "b1" can be eliminated? Thanks, -Peng %0 = type { [3 x [1 x i32]] } declare %0 @external_fcn3(i32, i32, i32, i32, [3 x [1 x i32]]*) define i32 @f3(i32 %a) readnone { entry: %b1 = alloca [3 x [1 x i32]] %b2 = alloca [3 x
2014 Sep 09
3
[LLVMdev] failed folding with constant array with opt -O3
I have the following simplified llvm ir, which basically returns value based on the first value of a constant array. ---- ; ModuleID = 'simple_ir3.txt' @f.b = constant [1 x i32] [i32 1], align 4 ; constant array with value 1 at the first element define void @f(i32* nocapture %l0) { entry: %fc_ = alloca [1 x i32] %f.b.v = load [1 x i32]* @f.b store [1 x i32] %f.b.v, [1 x