[LLVMdev] RFC: Tail call optimization X86

Evan Cheng evan.cheng at apple.com
Thu Oct 4 15:57:36 PDT 2007


On Oct 4, 2007, at 2:31 PM, Arnold Schwaighofer wrote:

>
> On 4 Oct 2007, at 00:22, Evan Cheng wrote:
>>> ifeq ($(ARCH),x86)
>>> LLCBETAOPTION := -regalloc=local -fast -tail-call-opt -tail-call- 
>>> opt-
>>> align-stack
>> Please remove -regalloc=local -fast. We want to test this patch
>> separately.
>
> just did a test with
> LLCBETAOPTION := -tail-call-opt -tail-call-opt-align-stack
>
> this time only SPASS llc-beta fails (comparing with vanilla version)
> also jit fails (exit 139) but in both versions  (vanilla/patched)
> which it did not do when i last tested

You mean SPASS JIT fails without tail call optimization being turned  
on? Is this due to fastcc abi change (callee pops arguments)?

>
>
> but looking very briefly at the results i am not sure llc-beta really
> fails since the programm (SPASS) runs through and only the diff fails

If the output mismatches then it has failed. This will not stop the  
patch from being accepted but it will have to be fixed eventually.

Evan

>
>
> as you can see below the tail call optimized version needs more
> clauses to do the prove but eventually end up with the same result:
>
> tail-call-opt:
> 	....
>         Given clause: 29875[3:Res:23.2,29765.0] || member(U,singleton
> (universal_class))* -> .
> SPASS V 2.1
> SPASS beiseite: Proof found.
> Problem: /Users/arnold/Desktop/testing/tc-test/llvm/projects/llvm-
> test/MultiSource/Applications/SPASS/problem.dfg
> SPASS derived 39592 clauses, backtracked 10752 clauses and kept 23124
> clauses.
> SPASS allocated 3905 KBytes.
> SPASS spent      No Timing on this machine.  on the problem.
>                  No Timing on this machine.  for the input.
>                  No Timing on this machine.  for the FLOTTER CNF
> translation.
>                  No Timing on this machine.  for inferences.
>                  No Timing on this machine.  for the backtracking.
>                  No Timing on this machine.  for the reduction.
>
> --------------------------SPASS-STOP------------------------------
> exit 0
>
> vanilla:
> 	....
>         Given clause: 29876[3:Res:23.2,29766.0] || member(U,singleton
> (universal_class))* -> .
> SPASS V 2.1
> SPASS beiseite: Proof found.
> Problem: /Users/arnold/Desktop/testing/tc-test/llvm/projects/llvm-
> test/MultiSource/Applications/SPASS/problem.dfg
> SPASS derived 39572 clauses, backtracked 10747 clauses and kept 23119
> clauses.
> SPASS allocated 3885 KBytes.
> SPASS spent      No Timing on this machine.  on the problem.
>                  No Timing on this machine.  for the input.
>                  No Timing on this machine.  for the FLOTTER CNF
> translation.
>                  No Timing on this machine.  for inferences.
>                  No Timing on this machine.  for the backtracking.
>                  No Timing on this machine.  for the reduction.
>
> --------------------------SPASS-STOP------------------------------
> exit 0
>
>
> an arbitrary example taken from
>> diff SPASS.out-llc SPASS.out-llc-beta
> 3870,3872c3870,3872
> <       Given clause: 29104[0:Res:357.1,166.0] || equal
> (universal_class,singleton_relation) -> member(y,element_relation)*.
> <       Given clause: 29115[0:Res:361.1,166.0] || equal
> (universal_class,singleton_relation) -> member
> (universal_class,element_relation)*.
> <       Given clause: 29213[3:SpR:29211.0,5371.0] ||  -> subclass
> (universal_class,complement(intersection(singleton
> (universal_class),universal_class)))*.
> ---
>>      Given clause: 29103[0:Res:357.1,166.0] || equal
> (universal_class,singleton_relation) -> member(y,element_relation)*.
>>      Given clause: 29114[0:Res:361.1,166.0] || equal
> (universal_class,singleton_relation) -> member
> (universal_class,element_relation)*.
>>      Given clause: 29212[3:SpR:29210.0,5371.0] ||  -> subclass
> (universal_class,complement(intersection(singleton
> (universal_class),universal_class)))*.
>
> very weird indeed ;)
>
> regards arnold
> _______________________________________________
> 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