[LLVMdev] RE : llvm-mc problem after a pass
Rinaldini Julien
julien.rinaldini at heig-vd.ch
Wed Jun 13 11:46:27 PDT 2012
Hi,
Thx, It should be that... I use some crappy "debug" name in my basicblock in my pass.
I'll try it when I got back to work.
Cheers
________________________________________
De : Jim Grosbach [grosbach at apple.com]
Date d'envoi : mercredi 13 juin 2012 19:53
À : Rinaldini Julien
Cc: LLVMdev at cs.uiuc.edu
Objet : Re: [LLVMdev] llvm-mc problem after a pass
Something is adding a bogus comment string. Specifically " # %case^M18 ", where "^M" is a single ctrl-M character.
The ^M is seen by the asm parser as an end-of-line, so the '18' is a new token at the start of a line, not part of the comment. Is your pass perhaps using label names which might include literal "^M" characters?
-Jim
On Jun 13, 2012, at 5:51 AM, Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote:
> Hi,
>
> I'm having some problem with llvm-mc on a program after applying a pass:
>
> ../../../build/Release+Asserts/bin/clang -emit-llvm -c -I./testprof/ -I./src/headers/ -I../libtommath-0.42.0/ -Wall -Wsign-compare -W -Wshadow -Wno-unused-parameter -DLTC_SOURCE -O0 -DLTC_NO_ASM -DUSE_LTM -DLTM_DESC -o src/pk/asn1/der/sequence/der_encode_sequence_ex.bc src/pk/asn1/der/sequence/der_encode_sequence_ex.c
> ../../../build/Release+Asserts/bin/opt -reg2mem -load ../../../build/Release+Asserts/lib/LLVMobfuscation.so -flattening src/pk/asn1/der/sequence/der_encode_sequence_ex.bc -o src/pk/asn1/der/sequence/der_encode_sequence_ex.bc -stats
> ===-------------------------------------------------------------------------===
> ... Statistics Collected ...
> ===-------------------------------------------------------------------------===
>
> 9 break-crit-edges - Number of blocks inserted
> 1 flattening - Functions flattened
>
> ../../../build/Release+Asserts/bin/llc src/pk/asn1/der/sequence/der_encode_sequence_ex.bc -o src/pk/asn1/der/sequence/der_encode_sequence_ex.s
> ../../../build/Release+Asserts/bin/llvm-mc -filetype=obj src/pk/asn1/der/sequence/der_encode_sequence_ex.s -o src/pk/asn1/der/sequence/der_encode_sequence_ex.o
> src/pk/asn1/der/sequence/der_encode_sequence_ex.s:989:3: error: unexpected token at start of statement
> 18
> ^
> make: *** [src/pk/asn1/der/sequence/der_encode_sequence_ex.o] Error 1
> ../../../build/Release+Asserts/bin/clang -emit-llvm -c -I./testprof/ -I./src/headers/ -I../libtommath-0.42.0/ -Wall -Wsign-compare -W -Wshadow -Wno-unused-parameter -DLTC_SOURCE -O0 -DLTC_NO_ASM -DUSE_LTM -DLTM_DESC -o src/pk/asn1/der/sequence/der_encode_sequence_ex.bc src/pk/asn1/der/sequence/der_encode_sequence_ex.c
> ../../../build/Release+Asserts/bin/opt -reg2mem -load ../../../build/Release+Asserts/lib/LLVMobfuscation.so -flattening src/pk/asn1/der/sequence/der_encode_sequence_ex.bc -o src/pk/asn1/der/sequence/der_encode_sequence_ex.bc -stats
> ===-------------------------------------------------------------------------===
> ... Statistics Collected ...
> ===-------------------------------------------------------------------------===
>
> 9 break-crit-edges - Number of blocks inserted
> 1 flattening - Functions flattened
>
> ../../../build/Release+Asserts/bin/llc src/pk/asn1/der/sequence/der_encode_sequence_ex.bc -o src/pk/asn1/der/sequence/der_encode_sequence_ex.s
> ../../../build/Release+Asserts/bin/llvm-mc -filetype=obj src/pk/asn1/der/sequence/der_encode_sequence_ex.s -o src/pk/asn1/der/sequence/der_encode_sequence_ex.o
> src/pk/asn1/der/sequence/der_encode_sequence_ex.s:989:3: error: unexpected token at start of statement
> 18
> ^
> make: *** [src/pk/asn1/der/sequence/der_encode_sequence_ex.o] Error 1
>
>
> It is possible that the PassVerifier validate my pass but it fail in llvm-mc? (and why it try to compile 2 times the same file?)
> Any idea?
>
>
> Thx,
> Cheers
>
> ps: I've attached the assembly source file and the bc file <der_encode_sequence_ex.s><der_encode_sequence_ex.bc>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list