[llvm-commits] [poolalloc] r161201 - in /poolalloc/trunk/test: ./ dsa/callgraph/ dsa/equivs/ dsa/extern/ dsa/local/ dsa/regression/ dsa/td/ dsa/types/ dsa/var_arg/
Will Dietz
wdietz2 at illinois.edu
Thu Aug 2 12:10:30 PDT 2012
Author: wdietz2
Date: Thu Aug 2 14:10:30 2012
New Revision: 161201
URL: http://llvm.org/viewvc/llvm-project?rev=161201&view=rev
Log:
Update lit test 'infrastructure' to work with 3.2.
Also change tests to accomodate changes in what needs to be escaped.
Tests pass!
Added:
poolalloc/trunk/test/dsa/callgraph/lit.local.cfg
poolalloc/trunk/test/dsa/equivs/lit.local.cfg
poolalloc/trunk/test/dsa/extern/lit.local.cfg
poolalloc/trunk/test/dsa/local/lit.local.cfg
poolalloc/trunk/test/dsa/regression/lit.local.cfg
poolalloc/trunk/test/dsa/td/lit.local.cfg
poolalloc/trunk/test/dsa/types/lit.local.cfg
poolalloc/trunk/test/dsa/var_arg/lit.local.cfg
Removed:
poolalloc/trunk/test/dsa/callgraph/dg.exp
poolalloc/trunk/test/dsa/equivs/dg.exp
poolalloc/trunk/test/dsa/extern/dg.exp
poolalloc/trunk/test/dsa/local/dg.exp
poolalloc/trunk/test/dsa/regression/dg.exp
poolalloc/trunk/test/dsa/td/dg.exp
poolalloc/trunk/test/dsa/types/dg.exp
poolalloc/trunk/test/dsa/var_arg/dg.exp
Modified:
poolalloc/trunk/test/Makefile
poolalloc/trunk/test/dsa/local/bitfields1.ll
poolalloc/trunk/test/dsa/local/bitfields2.ll
poolalloc/trunk/test/dsa/local/struct2.ll
poolalloc/trunk/test/dsa/local/union_P21.ll
poolalloc/trunk/test/dsa/local/union_P2I.ll
poolalloc/trunk/test/dsa/types/array2struct.ll
poolalloc/trunk/test/dsa/types/mrv.ll
poolalloc/trunk/test/dsa/types/mrv1.ll
poolalloc/trunk/test/dsa/types/union2.ll
poolalloc/trunk/test/dsa/types/union3.ll
poolalloc/trunk/test/dsa/types/union4.ll
poolalloc/trunk/test/dsa/types/union_arrays.ll
poolalloc/trunk/test/lit.cfg
poolalloc/trunk/test/lit.site.cfg.in
Modified: poolalloc/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/Makefile?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/Makefile (original)
+++ poolalloc/trunk/test/Makefile Thu Aug 2 14:10:30 2012
@@ -464,22 +464,38 @@
@chmod +x $@.tmp
@mv $@.tmp $@
-lit.site.cfg: $(PROJ_SRC_ROOT)/test/lit.site.cfg.in
- @echo "Making LLVM 'lit.site.cfg' file..."
- @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
- -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
- -e "s#@LLVM_TOOLS_DIR@#$(LLVMToolDir)#g" \
- -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
- -e "s#@PROJ_SRC_ROOT@#$(PROJ_SRC_ROOT)#g" \
- -e "s#@PROJ_OBJ_ROOT@#$(PROJ_OBJ_ROOT)#g" \
- $(PROJ_SRC_ROOT)/test/lit.site.cfg.in > $@
-
-$(LLVM_OBJ_ROOT)/test/site.exp:
- make -C $(LLVM_OBJ_ROOT)/test site.exp
+ifeq ($(DISABLE_ASSERTIONS),1)
+ENABLE_ASSERTIONS=0
+else
+ENABLE_ASSERTIONS=1
+endif
+
+FORCE:
+
+lit.site.cfg: FORCE
+ @echo "Making Poolalloc/DSA 'lit.site.cfg' file..."
+ @$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g > lit.tmp
+ @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g >> lit.tmp
+ @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
+ @$(ECHOPATH) s=@PROJ_SRC_ROOT@=$(PROJ_SRC_ROOT)=g >> lit.tmp
+ @$(ECHOPATH) s=@PROJ_OBJ_ROOT@=$(PROJ_OBJ_ROOT)=g >> lit.tmp
+ @$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(LLVMToolDir)=g >> lit.tmp
+ @$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> lit.tmp
+ @$(ECHOPATH) s=@SHLIBEXT@=$(SHLIBEXT)=g >> lit.tmp
+ @$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp
+ @$(ECHOPATH) s, at OCAMLOPT@,$(OCAMLOPT) -cc \\\\\"$(CXX_FOR_OCAMLOPT)\\\\\" -I $(LibDir)/ocaml,g >> lit.tmp
+ @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
+ @$(ECHOPATH) s=@ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp
+ @$(ECHOPATH) s=@TARGETS_TO_BUILD@=$(TARGETS_TO_BUILD)=g >> lit.tmp
+ @$(ECHOPATH) s=@LLVM_BINDINGS@=$(BINDINGS_TO_BUILD)=g >> lit.tmp
+ @$(ECHOPATH) s=@HOST_OS@=$(HOST_OS)=g >> lit.tmp
+ @$(ECHOPATH) s=@HOST_ARCH@=$(HOST_ARCH)=g >> lit.tmp
+ @sed -f lit.tmp $(PROJ_SRC_ROOT)/test/lit.site.cfg.in > $@
+ @-rm -f lit.tmp
#Run the lit tests for this project
.PHONY: lit lit-report
-lit: lit.site.cfg $(TOOLS) $(LLVM_OBJ_ROOT)/test/site.exp check-asserts
+lit: lit.site.cfg $(TOOLS) check-asserts
$(LLVM_SRC_ROOT)/utils/lit/lit.py $(PROJ_OBJ_ROOT)/test --path $(ToolDir) -s -v
#Run the lit tests, but supress all error output--just report the test results.
Removed: poolalloc/trunk/test/dsa/callgraph/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/callgraph/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/callgraph/dg.exp (original)
+++ poolalloc/trunk/test/dsa/callgraph/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,cpp}]]
Added: poolalloc/trunk/test/dsa/callgraph/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/callgraph/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/callgraph/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/callgraph/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.cpp']
Removed: poolalloc/trunk/test/dsa/equivs/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/equivs/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/equivs/dg.exp (original)
+++ poolalloc/trunk/test/dsa/equivs/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
Added: poolalloc/trunk/test/dsa/equivs/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/equivs/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/equivs/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/equivs/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.c', '.cpp']
Removed: poolalloc/trunk/test/dsa/extern/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/extern/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/extern/dg.exp (original)
+++ poolalloc/trunk/test/dsa/extern/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,cpp}]]
Added: poolalloc/trunk/test/dsa/extern/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/extern/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/extern/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/extern/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.cpp']
Modified: poolalloc/trunk/test/dsa/local/bitfields1.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/bitfields1.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/local/bitfields1.ll (original)
+++ poolalloc/trunk/test/dsa/local/bitfields1.ll Thu Aug 2 14:10:30 2012
@@ -1,5 +1,5 @@
-;RUN: dsaopt %s -dsa-local -analyze -check-type=main:ia:0,0:i16|i32::4:i8
+;RUN: dsaopt %s -dsa-local -analyze -check-type=main:ia:0,0:i16\|i32::4:i8
; ModuleID = 'bitfields1.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
Modified: poolalloc/trunk/test/dsa/local/bitfields2.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/bitfields2.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/local/bitfields2.ll (original)
+++ poolalloc/trunk/test/dsa/local/bitfields2.ll Thu Aug 2 14:10:30 2012
@@ -1,6 +1,6 @@
;RUN: dsaopt %s -dsa-local -analyze -check-type=main:codes,0:i32Array
-;RUN: dsaopt %s -dsa-local -analyze -check-type=main:ia,0:i16|i32
+;RUN: dsaopt %s -dsa-local -analyze -check-type=main:ia,0:i16\|i32
; ModuleID = 'bitfields2.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
Removed: poolalloc/trunk/test/dsa/local/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/local/dg.exp (original)
+++ poolalloc/trunk/test/dsa/local/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
Added: poolalloc/trunk/test/dsa/local/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/local/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/local/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.c', '.cpp']
Modified: poolalloc/trunk/test/dsa/local/struct2.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/struct2.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/local/struct2.ll (original)
+++ poolalloc/trunk/test/dsa/local/struct2.ll Thu Aug 2 14:10:30 2012
@@ -1,6 +1,6 @@
; casting a struct to int
-;RUN: dsaopt %s -dsa-local -analyze -check-type=main:r,0:i64|i32*::8:i32*
+;RUN: dsaopt %s -dsa-local -analyze -check-type=main:r,0:i64\|i32*::8:i32*
;RUN: dsaopt %s -dsa-local -analyze -check-same-node=main:r:0,main:x
;RUN: dsaopt %s -dsa-local -analyze -verify-flags "main:r+SUP2"
;RUN: dsaopt %s -dsa-local -analyze -verify-flags "main:r1+SUP2"
Modified: poolalloc/trunk/test/dsa/local/union_P21.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/union_P21.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/local/union_P21.ll (original)
+++ poolalloc/trunk/test/dsa/local/union_P21.ll Thu Aug 2 14:10:30 2012
@@ -1,7 +1,7 @@
;RUN: dsaopt %s -dsa-local -analyze -verify-flags "main:obj1+UP2"
;RUN: dsaopt %s -dsa-local -analyze -verify-flags "main:obj+UP2"
;RUN: dsaopt %s -dsa-local -analyze -check-type=main:obj,0:i32*::4:i32
-;RUN: dsaopt %s -dsa-local -analyze -check-type=main:obj1,0:i32|i32*
+;RUN: dsaopt %s -dsa-local -analyze -check-type=main:obj1,0:i32\|i32*
; if any part of pointer overlaps with an interger, we must mark the into to ptr flag.
Modified: poolalloc/trunk/test/dsa/local/union_P2I.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/local/union_P2I.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/local/union_P2I.ll (original)
+++ poolalloc/trunk/test/dsa/local/union_P2I.ll Thu Aug 2 14:10:30 2012
@@ -3,7 +3,7 @@
;RUN: dsaopt %s -dsa-local -analyze -check-same-node=main:ptr:0,main:obj:0
;RUN: dsaopt %s -dsa-local -analyze -check-type=main:obj,FoldedVOID
;RUN: adsaopt %s -simplify-gep -mergearrgep -o t.bc
-;RUN: dsaopt t.bc -dsa-local -enable-type-inference-opts -analyze -check-type=main:obj,0:i32|\\\[100x%\struct.StructType\\\]
+;RUN: dsaopt t.bc -dsa-local -enable-type-inference-opts -analyze -check-type=main:obj,0:i32\|\[100x%\struct.StructType\]
; ModuleID = 'union_P2.bc'
Removed: poolalloc/trunk/test/dsa/regression/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/regression/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/regression/dg.exp (original)
+++ poolalloc/trunk/test/dsa/regression/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
Added: poolalloc/trunk/test/dsa/regression/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/regression/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/regression/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/regression/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.c', '.cpp']
Removed: poolalloc/trunk/test/dsa/td/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/td/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/td/dg.exp (original)
+++ poolalloc/trunk/test/dsa/td/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,cpp}]]
Added: poolalloc/trunk/test/dsa/td/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/td/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/td/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/td/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.cpp']
Modified: poolalloc/trunk/test/dsa/types/array2struct.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/array2struct.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/array2struct.ll (original)
+++ poolalloc/trunk/test/dsa/types/array2struct.ll Thu Aug 2 14:10:30 2012
@@ -2,7 +2,7 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
;RUN: dsaopt %s -dsa-local -analyze -check-type=tree,FoldedVOID
-;RUN: dsaopt %s -dsa-local -enable-type-inference-opts -analyze -check-type=tree,12:\\\[8xi32\\\]Array
+;RUN: dsaopt %s -dsa-local -enable-type-inference-opts -analyze -check-type=tree,12:\[8xi32\]Array
; LLVM front end converts the type of tree, to a struct type instead of an array of the right type.
; even though structurally equivalent, DSA cant infer this yet.
Removed: poolalloc/trunk/test/dsa/types/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/types/dg.exp (original)
+++ poolalloc/trunk/test/dsa/types/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,cpp}]]
Added: poolalloc/trunk/test/dsa/types/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/types/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/types/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.c', '.cpp']
Modified: poolalloc/trunk/test/dsa/types/mrv.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/mrv.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/mrv.ll (original)
+++ poolalloc/trunk/test/dsa/types/mrv.ll Thu Aug 2 14:10:30 2012
@@ -2,8 +2,8 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-;RUN: dsaopt %s -dsa-local -analyze -check-type=main:s,0:float|double::4:float::8:float
-;RUN: dsaopt %s -dsa-local -enable-type-inference-opts -analyze -check-type=main:s,0:float|double::4:float::8:float
+;RUN: dsaopt %s -dsa-local -analyze -check-type=main:s,0:float\|double::4:float::8:float
+;RUN: dsaopt %s -dsa-local -enable-type-inference-opts -analyze -check-type=main:s,0:float\|double::4:float::8:float
;RUN: adsaopt %s -ld-args -deadargelim -dce -o %t.bc
;RUN: dsaopt %t.bc -dsa-local -enable-type-inference-opts -analyze -check-type=main:s,0:float::4:float::8:float
;RUN: adsaopt %s -ld-args -gep-expr-arg -deadargelim -dce -o %t.bc
Modified: poolalloc/trunk/test/dsa/types/mrv1.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/mrv1.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/mrv1.ll (original)
+++ poolalloc/trunk/test/dsa/types/mrv1.ll Thu Aug 2 14:10:30 2012
@@ -4,7 +4,7 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-;RUN: dsaopt %s -dsa-local -analyze -check-type=main:s,0:float|double::4:float::8:float
+;RUN: dsaopt %s -dsa-local -analyze -check-type=main:s,0:float\|double::4:float::8:float
;RUN: dsaopt %s -dsa-local -analyze -check-type=main:s1,0:float::4:float::8:float
;RUN: dsaopt %s -dsa-local -enable-type-inference-opts -analyze -check-type=main:s1,VOID
;RUN: adsaopt %s -ld-args -deadargelim -dce -o %t.bc
Modified: poolalloc/trunk/test/dsa/types/union2.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/union2.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/union2.ll (original)
+++ poolalloc/trunk/test/dsa/types/union2.ll Thu Aug 2 14:10:30 2012
@@ -2,7 +2,7 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,0:i32::4:i16|i32::8:i32
+;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,0:i32::4:i16\|i32::8:i32
;RUN: dsaopt %s -dsa-local -analyze -enable-type-inference-opts -check-type=func:obj,0:i32::4:i32::8:i32
%struct.StructType1 = type { i32, i32, i32 }
%struct.StructType2 = type { i32, i16, i32 }
Modified: poolalloc/trunk/test/dsa/types/union3.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/union3.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/union3.ll (original)
+++ poolalloc/trunk/test/dsa/types/union3.ll Thu Aug 2 14:10:30 2012
@@ -1,7 +1,7 @@
; ModuleID = 'union3.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,0:i32::4:i16|i32::6:i16::8:i32
+;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,0:i32::4:i16\|i32::6:i16::8:i32
;RUN: dsaopt %s -dsa-local -analyze -enable-type-inference-opts -check-type=func:obj,0:i32::4:i32::8:i32
%struct.StructType1 = type { i32, i32, i32 }
Modified: poolalloc/trunk/test/dsa/types/union4.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/union4.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/union4.ll (original)
+++ poolalloc/trunk/test/dsa/types/union4.ll Thu Aug 2 14:10:30 2012
@@ -1,7 +1,7 @@
; ModuleID = 'union4.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
-;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,0:i32::4:i16|i32::6:i16::8:i32
+;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,0:i32::4:i16\|i32::6:i16::8:i32
;RUN: dsaopt %s -dsa-local -analyze -enable-type-inference-opts -check-type=func:obj,0:i32::4:i32::8:i32
%struct.StructType1 = type { i32, i32, i32 }
Modified: poolalloc/trunk/test/dsa/types/union_arrays.ll
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/types/union_arrays.ll?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/types/union_arrays.ll (original)
+++ poolalloc/trunk/test/dsa/types/union_arrays.ll Thu Aug 2 14:10:30 2012
@@ -4,7 +4,7 @@
;RUN: dsaopt %s -dsa-local -analyze -check-type=func:obj,FoldedVOID
;RUN: dsaopt %s -dsa-local -analyze -enable-type-inference-opts -check-type=func:obj,FoldedVOID
;RUN: adsaopt %s -mem2reg -simplify-gep -mergearrgep -dce -o %t.bc
-;RUN: dsaopt %t.bc -dsa-local -analyze -enable-type-inference-opts -check-type=func:obj,0:i32|\\\[10xi32\\\]::40:i16|\\\[10xi16\\\]::60:i32|\\\[10xi32\\\]
+;RUN: dsaopt %t.bc -dsa-local -analyze -enable-type-inference-opts -check-type=func:obj,0:i32\|\[10xi32\]::40:i16\|\[10xi16\]::60:i32\|\[10xi32\]
%struct.StructType1 = type { [10 x i32], [10 x i16], [10 x i32] }
%struct.StructType2 = type { [10 x i32], [10 x i32], [10 x i32] }
Removed: poolalloc/trunk/test/dsa/var_arg/dg.exp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/var_arg/dg.exp?rev=161200&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/var_arg/dg.exp (original)
+++ poolalloc/trunk/test/dsa/var_arg/dg.exp (removed)
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
Added: poolalloc/trunk/test/dsa/var_arg/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/var_arg/lit.local.cfg?rev=161201&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/var_arg/lit.local.cfg (added)
+++ poolalloc/trunk/test/dsa/var_arg/lit.local.cfg Thu Aug 2 14:10:30 2012
@@ -0,0 +1 @@
+config.suffixes = ['.ll', '.c', '.cpp']
Modified: poolalloc/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/lit.cfg?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/lit.cfg (original)
+++ poolalloc/trunk/test/lit.cfg Thu Aug 2 14:10:30 2012
@@ -9,17 +9,7 @@
# name: The name of this test suite.
config.name = 'PoolAlloc/DSA'
-# testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.TclTest()
-
-# suffixes: A list of file extensions to treat as test files, this is actually
-# set by on_clone().
-config.suffixes = []
-
-# test_source_root: The root path where tests are located.
-config.test_source_root = os.path.dirname(__file__)
-
-# Tweak PATH for Win32
+# Tweak PATH for Win32 to decide to use bash.exe or not.
if sys.platform in ['win32']:
# Seek sane tools in directories and set to $PATH.
path = getattr(config, 'lit_tools_dir', None)
@@ -31,6 +21,26 @@
config.environment['PATH']))
config.environment['PATH'] = path
+# testFormat: The test format to use to interpret tests.
+execute_external = (not sys.platform in ['win32']
+ or lit.getBashPath() not in [None, ""])
+config.test_format = lit.formats.ShTest(execute_external)
+
+# To ignore test output on stderr so it doesn't trigger failures uncomment this:
+#config.test_format = lit.formats.TclTest(ignoreStdErr=True)
+
+# suffixes: A list of file extensions to treat as test files, this is actually
+# set by on_clone().
+config.suffixes = []
+
+# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
+# subdirectories contain auxiliary inputs for various tests in their parent
+# directories.
+config.excludes = ['Inputs']
+
+# test_source_root: The root path where tests are located.
+config.test_source_root = os.path.dirname(__file__)
+
# test_exec_root: The root path where tests should be run.
llvm_obj_root = getattr(config, 'llvm_obj_root', None)
proj_obj_root = getattr(config, 'proj_obj_root', None)
@@ -139,18 +149,30 @@
###
-# Load site data from DejaGNU's site.exp.
-import re
-site_exp = {}
-# FIXME: Implement lit.site.cfg.
-for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
- m = re.match('set ([^ ]+) "(.*)"', line)
- if m:
- site_exp[m.group(1)] = m.group(2)
-
-# Add substitutions.
-for sub in ['link', 'shlibext', 'ocamlopt', 'llvmshlibdir']:
- config.substitutions.append(('%' + sub, site_exp[sub]))
+# When running under valgrind, we mangle '-vg' or '-vg_leak' onto the end of the
+# triple so we can check it with XFAIL and XTARGET.
+config.target_triple += lit.valgrindTriple
+
+# Process jit implementation option
+jit_impl_cfg = lit.params.get('jit_impl', None)
+if jit_impl_cfg == 'mcjit':
+ # When running with mcjit, mangle -mcjit into target triple
+ # and add -use-mcjit flag to lli invocation
+ if 'i686' in config.target_triple:
+ config.target_triple += jit_impl_cfg + '-ia32'
+ elif 'x86_64' in config.target_triple:
+ config.target_triple += jit_impl_cfg + '-ia64'
+ else:
+ config.target_triple += jit_impl_cfg
+
+ config.substitutions.append( ('%lli', 'lli -use-mcjit') )
+else:
+ config.substitutions.append( ('%lli', 'lli') )
+
+# Add site-specific substitutions.
+config.substitutions.append( ('%ocamlopt', config.ocamlopt_executable) )
+config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
+config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
# For each occurrence of an llvm tool name as its own word, replace it
# with the full path to the build directory holding that tool. This
@@ -202,78 +224,6 @@
break
config.substitutions.append((pattern, substitution))
-excludes = []
-
-# Provide target_triple for use in XFAIL and XTARGET.
-config.target_triple = site_exp['target_triplet']
-
-# When running under valgrind, we mangle '-vg' or '-vg_leak' onto the end of the
-# triple so we can check it with XFAIL and XTARGET.
-config.target_triple += lit.valgrindTriple
-
-# Provide llvm_supports_target for use in local configs.
-targets = set(site_exp["TARGETS_TO_BUILD"].split())
-def llvm_supports_target(name):
- return name in targets
-
-def llvm_supports_darwin_and_target(name):
- return 'darwin' in config.target_triple and llvm_supports_target(name)
-
-bindings = set([s.strip() for s in site_exp['llvm_bindings'].split(',')])
-def llvm_supports_binding(name):
- return name.strip() in bindings
-
-# Provide on_clone hook for reading 'dg.exp'.
-import os
-simpleLibData = re.compile(r"""load_lib llvm.exp
-
-RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]""",
- re.MULTILINE)
-conditionalLibData = re.compile(r"""load_lib llvm.exp
-
-if.*\[ ?(llvm[^ ]*) ([^ ]*) ?\].*{
- *RunLLVMTests \[lsort \[glob -nocomplain \$srcdir/\$subdir/\*\.(.*)\]\]
-\}""", re.MULTILINE)
-def on_clone(parent, cfg, for_path):
- def addSuffixes(match):
- if match[0] == '{' and match[-1] == '}':
- cfg.suffixes = ['.' + s for s in match[1:-1].split(',')]
- else:
- cfg.suffixes = ['.' + match]
-
- libPath = os.path.join(os.path.dirname(for_path),
- 'dg.exp')
- if not os.path.exists(libPath):
- cfg.unsupported = True
- return
-
- # Reset unsupported, in case we inherited it.
- cfg.unsupported = False
- lib = open(libPath).read().strip()
-
- # Check for a simple library.
- m = simpleLibData.match(lib)
- if m:
- addSuffixes(m.group(1))
- return
-
- # Check for a conditional test set.
- m = conditionalLibData.match(lib)
- if m:
- funcname,arg,match = m.groups()
- addSuffixes(match)
-
- func = globals().get(funcname)
- if not func:
- lit.error('unsupported predicate %r' % funcname)
- elif not func(arg):
- cfg.unsupported = True
- return
- # Otherwise, give up.
- lit.error('unable to understand %r:\n%s' % (libPath, lib))
-
-config.on_clone = on_clone
-
### Features
# Shell execution
@@ -292,8 +242,13 @@
# llc knows whether he is compiled with -DNDEBUG.
import subprocess
-llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
+try:
+ llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
stdout = subprocess.PIPE)
+except OSError, why:
+ print "Could not find llc in " + llvm_tools_dir
+ exit(42)
+
if re.search(r'with assertions', llc_cmd.stdout.read()):
config.available_features.add('asserts')
llc_cmd.wait()
Modified: poolalloc/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/lit.site.cfg.in?rev=161201&r1=161200&r2=161201&view=diff
==============================================================================
--- poolalloc/trunk/test/lit.site.cfg.in (original)
+++ poolalloc/trunk/test/lit.site.cfg.in Thu Aug 2 14:10:30 2012
@@ -3,9 +3,21 @@
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvmgcc_dir = "@LLVMGCCDIR@"
config.proj_src_root = "@PROJ_SRC_ROOT@"
config.proj_obj_root = "@PROJ_OBJ_ROOT@"
+config.target_triple = "@TARGET_TRIPLE@"
+config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_shlib_ext = "@SHLIBEXT@"
+config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
+config.ocamlopt_executable = "@OCAMLOPT@"
+config.enable_shared = @ENABLE_SHARED@
+config.enable_assertions = @ENABLE_ASSERTIONS@
+config.targets_to_build = "@TARGETS_TO_BUILD@"
+config.llvm_bindings = "@LLVM_BINDINGS@"
+config.host_os = "@HOST_OS@"
+config.host_arch = "@HOST_ARCH@"
+
# Let the main config do the real work.
lit.load_config(config, "@PROJ_SRC_ROOT@/test/lit.cfg")
More information about the llvm-commits
mailing list