Ok. I just shared the dropbox link with you. Let me know if you need
anything else.

Best regards,

-Xiang


On Fri, Feb 7, 2014 at 5:12 PM, Xiang Li <[email protected]> wrote:

> We were trying to see if we have done something wrong here...I am now
> getting another error when attempting to compile the "next" component in my
> project:
>
>
> Instruction does not dominate all uses!
>   %gep38 = add i32 %tess, 144
>   call void @emscripten_longjmp(i32 %gep38, i32 1) #6
> Instruction does not dominate all uses!
>   %gep38 = add i32 %tess, 144
>   call void @emscripten_longjmp(i32 %gep38, i32 1) #6
> Instruction does not dominate all uses!
>   %.1 = select i1 %35, i32 3, i32 %.vertexSize
>   call void @OutputContours(i32 %tess, i32 %56, i32 %.1)
> Instruction does not dominate all uses!
>   %.1 = select i1 %35, i32 3, i32 %.vertexSize
>   call void @OutputPolymesh(i32 %tess, i32 %56, i32 %elementType, i32
> %polySize, i32 %.1)
> Broken module found, compilation aborted!
> 0  opt               0x000000010e4e8825
> llvm::sys::PrintStackTrace(__sFILE*) + 37
> 1  opt               0x000000010e4e8d69 SignalHandler(int) + 553
> 2  libsystem_c.dylib 0x00007fff817a490a _sigtramp + 26
> 3  opt               0x000000010e3f6d6f
> llvm::AttributeSet::get(llvm::LLVMContext&, unsigned int,
> llvm::AttrBuilder&) + 527
> 4  opt               0x000000010e4e8b26 abort + 22
> 5  opt               0x000000010e4a4592 (anonymous
> namespace)::Verifier::abortIfBroken() + 258
> 6  opt               0x000000010e4a4475 (anonymous
> namespace)::Verifier::runOnFunction(llvm::Function&) + 1781
> 7  opt               0x000000010e48fb1b
> llvm::FPPassManager::runOnFunction(llvm::Function&) + 315
> 8  opt               0x000000010e48fd0b
> llvm::FPPassManager::runOnModule(llvm::Module&) + 59
> 9  opt               0x000000010e48ff68
> llvm::MPPassManager::runOnModule(llvm::Module&) + 344
> 10 opt               0x000000010e49066d
> llvm::PassManagerImpl::run(llvm::Module&) + 493
> 11 opt               0x000000010e49082d
> llvm::PassManager::run(llvm::Module&) + 13
> 12 opt               0x000000010dcd3f6d main + 7357
> 13 libdyld.dylib     0x00007fff8bcbd7e1 start + 0
> Stack dump:
> 0. Program arguments:
> /Users/xiangl/Build_cmake_assignment/fastcomp/emscripten-fastcomp/build/Release/bin/opt
> /tmp/tmpmnTilx/CDFKit.bc -strip-debug -internalize
> -internalize-public-api-list=CDFRelease,CDFDescription,CDFSessionCreate,CDFSessionGetEvaluator,CDFSessionRun,CDFEvaluatorEvaluate,CDFDocumentCreate,CDFExprCreateWithParsedString,CDFExprCreateSymbol,CDFExprCreateWithHead,CDFExprAddPart,CDFViewControllerCreate,CDFViewControllerSetExpr,CDFViewControllerSetFormatWidth,CDFViewControllerGetFormattedHeight,CDFViewControllerGetFormattedBaseline,CDFViewControllerDraw,malloc,free
> -globaldce -pnacl-abi-simplify-preopt -pnacl-abi-simplify-postopt -o
> /tmp/tmpmnTilx/CDFKit.bc.opt.bc
> 1. Running pass 'Function Pass Manager' on module
> '/tmp/tmpmnTilx/CDFKit.bc'.
> 2. Running pass 'Module Verifier' on function '@tessTesselate'
> Traceback (most recent call last):
>   File "/opt/emscripten-incoming/emcc", line 1828, in <module>
>     shared.Building.llvm_opt(final, link_opts)
>   File "/opt/emscripten-incoming/tools/shared.py", line 1173, in llvm_opt
>     assert os.path.exists(target), 'Failed to run llvm optimizations: ' +
> output
> AssertionError: Failed to run llvm optimizations:
>
>
> What I am doing wrong?
>
> Thanks
> --Xiang
>
>
>
> On Fri, Feb 7, 2014 at 11:17 AM, Alon Zakai <[email protected]> wrote:
>
>> What error do you have now?
>>
>> If you can send the bitcode that would be best for debugging.
>>
>> - Alon
>>
>>
>>
>> On Thu, Feb 6, 2014 at 12:22 AM, Xiang Li <[email protected]> wrote:
>>
>>> fastcomp can now compile our project successfully. Thanks!
>>>
>>> Unfortunately when I run the generated script I am seeing same problems
>>> as I had experienced with static linking! This makes me suspect the root
>>> cause for the wrong behavior at runtime may be the similar for  fastcomp
>>> and static linking.  I mean perhaps if you fix fastcomp you will also be
>>> able to fix static linking (though I understand static linking is not your
>>> top priority at this moment)
>>>
>>> I think I do need to send you part of our bitcode so you can link them
>>> together using both fastcomp and the current emcc compiler...that way you
>>> can run one of our tests and compare the difference. I'll think about what
>>> you might need and send it to you ASAP. If there is better way I can help
>>> you debug this let me know.
>>>
>>> Best regards!
>>>
>>> Thanks
>>> --Xiang
>>>
>>>
>>>
>>> On Wed, Feb 5, 2014 at 6:21 PM, Alon Zakai <[email protected]> wrote:
>>>
>>>> Thanks, I was able to make a testcase for that in llvm IR - no idea how
>>>> to do it in C ;)
>>>>
>>>> This should be fixed on latest fastcomp, please let me know.
>>>>
>>>> - Alon
>>>>
>>>>
>>>>
>>>> On Wed, Feb 5, 2014 at 12:06 PM, Xiang Li <[email protected]>wrote:
>>>>
>>>>> Hi
>>>>> With the latest fastcomp code base, I added fprintf  in
>>>>>
>>>>> lib/Target/JSBackend/JSBackend.cpp : around line 829
>>>>>
>>>>>
>>>>> Here is what I got:
>>>>>
>>>>> raw c_str double 0x7FEFFFFFFFFFFFFF
>>>>>
>>>>> raw length 16
>>>>>
>>>>> raw 7FEFFFFFFFFFFFFF
>>>>>
>>>>> raw c_str double 0x370000000000000
>>>>>
>>>>> raw length 15
>>>>>
>>>>> raw 370000000000000
>>>>>
>>>>> Linking then fails because the length is an odd number
>>>>>   assert((len&1)
>>>>>
>>>>>
>>>>> I am not sure how to make sense of this and relate to my code. What
>>>>> else should I do to get the actual c++ code that triggers the error?
>>>>>
>>>>> I thought sending you our bitcode but it's a lot of files scattered in
>>>>> a bunch of folders in CMAKE build folder....
>>>>>
>>>>> Thanks
>>>>> --Xiang
>>>>>
>>>>>
>>>>> On Thu, Jan 30, 2014 at 9:13 AM, Xiang Li <[email protected]>wrote:
>>>>>
>>>>>> I got the permission so I will send the bitcode to you later. I am on
>>>>>> Mac. Do I need to generate the bitcode on Linux for you to investigate? I
>>>>>> am not sure if the bitcode from different platforms will be exactly 
>>>>>> same...
>>>>>>
>>>>>> Now for the static linking, I wonder if  you can determine what went
>>>>>> wrong by just looking at the bitcode? If so that would be great and I 
>>>>>> then
>>>>>> can also send the bitcode generated using LLVM_3.2...
>>>>>>
>>>>>> Best regards
>>>>>>
>>>>>> --Xiang
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 28, 2014 at 5:59 PM, Alon Zakai <[email protected]>wrote:
>>>>>>
>>>>>>> If you can attach the bitcode file that would be easiest to
>>>>>>> reproduce the problem with. Otherwise you can see where it happens by
>>>>>>> adding some debug printouts in the code and rebuilding fastcomp. In this
>>>>>>> case, puts(raw) right before that assert should help.
>>>>>>>
>>>>>>> - Alon
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Jan 28, 2014 at 9:37 AM, Xiang Li <[email protected]>wrote:
>>>>>>>
>>>>>>>> I tried using fastcomp to compile my project, I got the following
>>>>>>>> error.
>>>>>>>>
>>>>>>>> I used emcc 'incoming' branch and the last llvm backend. How do I
>>>>>>>> know which part of my code triggers the error?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Warning: Variable __init_array_start not referenced
>>>>>>>> Warning: Variable __init_array_end not referenced
>>>>>>>> Warning: Variable __fini_array_start not referenced
>>>>>>>> Warning: Variable __fini_array_end not referenced
>>>>>>>> (len&1) == 0
>>>>>>>> /Users/xiangl/Build_cmake_assignment/fastcomp/emscripten-fastcomp/lib/Target/JSBackend/JSBackend.cpp
>>>>>>>> : 769
>>>>>>>> LLVM ERROR: fail
>>>>>>>> Traceback (most recent call last):
>>>>>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1352, in
>>>>>>>> <module>
>>>>>>>>     _main(environ=os.environ)
>>>>>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1340, in _main
>>>>>>>>     temp_files.run_and_clean(lambda: main(
>>>>>>>>   File "/opt/emscripten-incoming/tools/tempfiles.py", line 39, in
>>>>>>>> run_and_clean
>>>>>>>>     return func()
>>>>>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1348, in
>>>>>>>> <lambda>
>>>>>>>>     DEBUG_CACHE=DEBUG_CACHE,
>>>>>>>>   File "/opt/emscripten-incoming/emscripten.py", line 1235, in main
>>>>>>>>     jcache=jcache, temp_files=temp_files, DEBUG=DEBUG,
>>>>>>>> DEBUG_CACHE=DEBUG_CACHE)
>>>>>>>>   File "/opt/emscripten-incoming/emscripten.py", line 749, in
>>>>>>>> emscript_fast
>>>>>>>>     backend_output = open(temp_js).read()
>>>>>>>> IOError: [Errno 2] No such file or directory: '/tmp/tmpcZyQuB.4.js'
>>>>>>>> Traceback (most recent call last):
>>>>>>>>   File "/opt/emscripten-incoming/emcc", line 1863, in <module>
>>>>>>>>     final = shared.Building.emscripten(final, append_ext=False,
>>>>>>>> extra_args=extra_args)
>>>>>>>>   File "/opt/emscripten-incoming/tools/shared.py", line 1276, in
>>>>>>>> emscripten
>>>>>>>>     assert os.path.exists(filename + '.o.js') and len(open(filename
>>>>>>>> + '.o.js', 'r').read()) > 0, 'Emscripten failed to generate .js: ' +
>>>>>>>> str(compiler_output)
>>>>>>>> AssertionError: Emscripten failed to generate .js:
>>>>>>>> make[2]: *** [MCore/test/MCoreTest.html] Error 1
>>>>>>>> make[1]: *** [MCore/test/CMakeFiles/MCoreTest.dir/all] Error 2
>>>>>>>> make: *** [all] Error 2
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -Xiang Li
>>>>>>>>
>>>>>>>>  --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "emscripten-discuss" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "emscripten-discuss" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>
>>>>>>
>>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "emscripten-discuss" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to