<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Jasmin,<br>
    <br>
    I can not understand your question well enough to answer it, but it
    sounds likely you may be fundamentally misunderstanding how LLVM
    works.  LLVM is compiler.  It does not control execution of the
    generated code.  All of the discussion about stack frames is a
    non-issue.   <br>
    <br>
    Purely as a guess, I suspect you may be running into issues with
    symbol resolution.  If you declare the same symbol in two modules,
    they are NOT necessarily the same.  If you compile those modules
    separately, it is your responsibility to link them together properly
    or otherwise resolve the symbol addresses.  <br>
    <br>
    Philip<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 06/09/2014 12:16 PM, Jasmin Jahic
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALJvyQHqvq2Fjenb2UA22Jo1z3McBktOUbkRBr8Z9yr5TFbR4w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I asked this question a few days ago, but it seems that
          thread died out:</div>
        <div><br>
        </div>
        <div>
          <div>I have a MAIN program which includes LLVM libraries and
            loads one bc file. From MAIN I execute different functions
            from the bc file using LLVM interpreter.  On the LLVM
            website it is said:</div>
          <div>"LLVMContext is an opaque class in the LLVM API which
            clients can use to operate multiple, isolated instances of
            LLVM concurrently within the same address space." - It seems
            that this is not correct or I'm not understanding it
            properly.</div>
          <div><br>
          </div>
          <div>One context is used to create two modules, and based on
            modules all other things needed for the execution (engine
            builders, execution engines, functions). When functions are
            executed (sequentially), they are obviously executed in
            different memory space. I have verified this over access to
            the global variable.</div>
          <div><br>
          </div>
          <div>However, if functions are executed using the same
            execution engine (context, module and execution builder the
            same), then they are executed in the same memory space. But
            using one execution engine is not suitable for me, because
            one execution engine means one stack.</div>
          <div><br>
          </div>
          <div>One option is to use different stack frames. Before
            trying that, I just wanted to ask is there a different way
            for sharing memory space between more execution engines?</div>
        </div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Jasmin</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>