Permalink
Browse files

Merge branch 'restructure'

  • Loading branch information...
2 parents a870759 + eb4512c commit c25b154592b9d14ffe7f48136c661b69fdc4ed11 Alexander Bernauer committed Oct 1, 2012
Showing with 2,618 additions and 2,930 deletions.
  1. +7 −7 applications/contiki/coap/bench.results
  2. BIN applications/contiki/plots/cpu.png
  3. +5 −5 applications/contiki/plots/number.txt
  4. BIN applications/contiki/plots/pt_ram.png
  5. BIN applications/contiki/plots/pt_text.png
  6. BIN applications/contiki/plots/ram.png
  7. BIN applications/contiki/plots/text.png
  8. +7 −7 applications/contiki/rpc1/bench.results
  9. +7 −7 applications/contiki/rpc2/bench.results
  10. +7 −7 applications/contiki/rpc3/bench.results
  11. +7 −7 applications/contiki/rpc4/bench.results
  12. +2 −2 ocram/src/Ocram/Analysis/Filter.hs
  13. +2 −3 ocram/src/Ocram/Backend.hs
  14. +2 −3 ocram/src/Ocram/Backend/EStack.hs
  15. +2 −3 ocram/src/Ocram/Backend/TStack.hs
  16. +69 −38 ocram/src/Ocram/Backend/Test.hs
  17. +37 −24 ocram/src/Ocram/Backend/ThreadExecutionFunction.hs
  18. +0 −20 ocram/src/Ocram/Backend/Util.hs
  19. +0 −2 ocram/src/Ocram/Intermediate.hs
  20. +32 −33 ocram/src/Ocram/Intermediate/BooleanShortCircuiting.hs
  21. +45 −29 ocram/src/Ocram/Intermediate/BuildBasicBlocks.hs
  22. +14 −2 ocram/src/Ocram/Intermediate/CollectDeclarations.hs
  23. +10 −6 ocram/src/Ocram/Intermediate/CriticalVariables.hs
  24. +48 −56 ocram/src/Ocram/Intermediate/DesugarControlStructures.hs
  25. +6 −8 ocram/src/Ocram/Intermediate/NormalizeCriticalCalls.hs
  26. +5 −12 ocram/src/Ocram/Intermediate/Optimize.hs
  27. +12 −2 ocram/src/Ocram/Intermediate/Representation.hs
  28. +0 −61 ocram/src/Ocram/Intermediate/SequencializeBody.hs
  29. +2,287 −2,581 ocram/src/Ocram/Intermediate/Test.hs
  30. +5 −5 ocram/src/Ocram/Main.hs
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 266 43604 8298 286 220 705905
-# gen 232 44620 8360 306 222 717994
+# gen 232 44614 8358 306 222 717899
# tl 242 44906 8868 292 216 789221
# pal nan 950 0 30 nan nan
-# (nat)/(gen) -12.78 2.33 0.75 6.99 0.91 1.71
-# (nat)/((gen)-(pal)) nan 0.15 0.75 -3.50 nan nan
-# (gen)/(tl) 4.31 0.64 6.08 -4.58 -2.70 9.92
+# (nat)/(gen) -12.78 2.32 0.72 6.99 0.91 1.70
+# (nat)/((gen)-(pal)) nan 0.14 0.72 -3.50 nan nan
+# (gen)/(tl) 4.31 0.65 6.10 -4.58 -2.70 9.93
(dp0
(S'coap'
p1
@@ -92,12 +92,12 @@ s(g1
g9
g17
tp26
-I8360
+I8358
s(g1
g9
g19
tp27
-I717994
+I717899
s(g1
g12
g17
@@ -117,7 +117,7 @@ s(g1
g9
g3
tp31
-I44620
+I44614
s(g1
g14
g19
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -2,7 +2,7 @@
cpu
===
overhead: tl: max: 11.80
-overhead: gen: max: 1.71
+overhead: gen: max: 1.70
loc
===
@@ -24,10 +24,10 @@ slope: gen_nopal: 559.33
ram
===
-overhead: bss: max: 1.02
-overhead: ram: max: 1.03
+overhead: bss: max: 0.99
+overhead: ram: max: 1.00
text
====
-overhead: nopal: max: 0.72
-overhead: pal: max: 2.88
+overhead: nopal: max: 0.70
+overhead: pal: max: 2.86
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 135 43822 7496 234 304 1280418
-# gen 126 44736 7550 240 304 1283286
+# gen 126 44730 7548 240 304 1283700
# tl 132 45030 7902 236 304 1326874
# pal nan 902 0 20 nan nan
-# (nat)/(gen) -6.67 2.09 0.72 2.56 0.00 0.22
-# (nat)/((gen)-(pal)) nan 0.03 0.72 -5.98 nan nan
-# (gen)/(tl) 4.76 0.66 4.66 -1.67 0.00 3.40
+# (nat)/(gen) -6.67 2.07 0.69 2.56 0.00 0.26
+# (nat)/((gen)-(pal)) nan 0.01 0.69 -5.98 nan nan
+# (gen)/(tl) 4.76 0.67 4.69 -1.67 0.00 3.36
(dp0
(S'rpc1'
p1
@@ -14,7 +14,7 @@ p2
S'bss'
p3
tp4
-I7550
+I7548
s(g1
S'pal'
p5
@@ -102,7 +102,7 @@ s(g1
g2
g6
tp28
-I1283286
+I1283700
s(g1
g11
g19
@@ -117,7 +117,7 @@ s(g1
g2
g12
tp31
-I44736
+I44730
s(g1
g8
g17
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 155 44008 7644 244 304 743637
-# gen 143 45274 7722 250 304 747950
+# gen 143 45268 7720 250 304 747760
# tl 151 45108 8212 236 304 775814
# pal nan 950 0 30 nan nan
-# (nat)/(gen) -7.74 2.88 1.02 2.46 0.00 0.58
-# (nat)/((gen)-(pal)) nan 0.72 1.02 -9.84 nan nan
-# (gen)/(tl) 5.59 -0.37 6.35 -5.60 0.00 3.73
+# (nat)/(gen) -7.74 2.86 0.99 2.46 0.00 0.55
+# (nat)/((gen)-(pal)) nan 0.70 0.99 -9.84 nan nan
+# (gen)/(tl) 5.59 -0.35 6.37 -5.60 0.00 3.75
(dp0
(S'rpc2'
p1
@@ -38,7 +38,7 @@ S'gen'
p11
g5
tp12
-I7722
+I7720
s(g1
g7
S'cpu'
@@ -49,7 +49,7 @@ s(g1
g11
g13
tp15
-I747950
+I747760
s(g1
g2
g8
@@ -65,7 +65,7 @@ s(g1
g11
g17
tp19
-I45274
+I45268
s(g1
g2
g13
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 175 44206 7792 254 304 2524917
-# gen 160 45958 7894 260 304 2538274
+# gen 160 45952 7892 260 304 2538029
# tl 170 45242 8522 236 320 2652958
# pal nan 998 0 40 nan nan
-# (nat)/(gen) -8.57 3.96 1.31 2.36 0.00 0.53
-# (nat)/((gen)-(pal)) nan 1.71 1.31 -13.39 nan nan
-# (gen)/(tl) 6.25 -1.56 7.96 -9.23 5.26 4.52
+# (nat)/(gen) -8.57 3.95 1.28 2.36 0.00 0.52
+# (nat)/((gen)-(pal)) nan 1.69 1.28 -13.39 nan nan
+# (gen)/(tl) 6.25 -1.55 7.98 -9.23 5.26 4.53
(dp0
(S'rpc3'
p1
@@ -67,7 +67,7 @@ g8
S'bss'
p20
tp21
-I7894
+I7892
s(g1
g2
g6
@@ -87,7 +87,7 @@ s(g1
g8
g13
tp25
-I45958
+I45952
s(g1
g15
g9
@@ -122,7 +122,7 @@ s(g1
g8
g3
tp32
-I2538274
+I2538029
s(g1
g5
g11
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 195 44384 7940 264 304 3145233
-# gen 177 46558 8066 270 304 3163807
+# gen 177 46552 8064 270 304 3163355
# tl 189 45332 8832 236 304 3320473
# pal nan 1046 0 50 nan nan
-# (nat)/(gen) -9.23 4.90 1.59 2.27 0.00 0.59
-# (nat)/((gen)-(pal)) nan 2.54 1.59 -16.67 nan nan
-# (gen)/(tl) 6.78 -2.63 9.50 -12.59 0.00 4.95
+# (nat)/(gen) -9.23 4.88 1.56 2.27 0.00 0.58
+# (nat)/((gen)-(pal)) nan 2.53 1.56 -16.67 nan nan
+# (gen)/(tl) 6.78 -2.62 9.52 -12.59 0.00 4.97
(dp0
(S'rpc4'
p1
@@ -86,7 +86,7 @@ s(g1
g21
g13
tp24
-I8066
+I8064
s(g1
g5
g18
@@ -117,7 +117,7 @@ s(g1
g21
g18
tp31
-I3163807
+I3163355
s(g1
g2
g27
@@ -132,7 +132,7 @@ s(g1
g21
g3
tp34
-I46558
+I46552
s(g1
g5
g27
@@ -112,14 +112,14 @@ check_sanity ast = failOrPass $ everything (++) (mkQ [] saneExtDecls `extQ` sane
-- ...which must start with a statement...
((CBlockStmt stmt):_) <- Just items
-- ...that has to be a case(es) or a default statement.
- (guard . flt) stmt
+ guard $ flt stmt
-- And finally make sure that there is at most one default
-- statement and that no case(es) statement follows.
let
allcases = filter flt $ mapMaybe extract items
dfltcases = findIndices isDefault allcases
- guard (null dfltcases || head dfltcases == length allcases)
+ guard (null dfltcases || head dfltcases == (length allcases) - 1)
in case test of
Nothing -> [newError IllFormedSwitch Nothing (Just ni)]
Just () -> []
@@ -12,9 +12,8 @@ import Ocram.Analysis (Analysis(..))
import Ocram.Backend.EStack
import Ocram.Backend.ThreadExecutionFunction
import Ocram.Backend.TStack
-import Ocram.Backend.Util (makeVarDecl)
import Ocram.Debug (enrich_node_info, CTranslUnit')
-import Ocram.Intermediate (Function(..))
+import Ocram.Intermediate (Function(..), Variable(..))
import Ocram.Names (tframe)
import Ocram.Symbols (Symbol, symbol)
@@ -55,4 +54,4 @@ blockingFunctionDeclarations = map go . M.elems
declr' = CDeclr Nothing [CPtrDeclr [] un] Nothing [] un
staticVariables :: M.Map Symbol Function -> [CDecl] -- {{{2
-staticVariables = map makeVarDecl . M.fold (\fun vs -> fun_stVars fun ++ vs) []
+staticVariables = M.fold (\fun vs -> map var_decl (fun_stVars fun) ++ vs) []
@@ -9,8 +9,7 @@ module Ocram.Backend.EStack
import Control.Monad ((<=<))
import Data.Maybe (mapMaybe)
import Ocram.Analysis (CallGraph, dependency_list, call_order, start_functions)
-import Ocram.Backend.Util (makeVarDecl)
-import Ocram.Intermediate (Function(..), fun_name)
+import Ocram.Intermediate (Function(..), fun_name, Variable(..))
import Language.C.Data.Ident (Ident, internalIdent)
import Language.C.Data.Node (undefNode, NodeInfo)
import Language.C.Syntax.AST
@@ -50,7 +49,7 @@ estackFrame fun
frame =
CDecl [CStorageSpec (CTypedef un), CTypeSpec (CSUType (CStruct CStructTag Nothing (Just uncriticalVariables) [] un) un)] [(Just (CDeclr (Just (ii (eframe name))) [] Nothing [] un), Nothing, Nothing)] un
- uncriticalVariables = map makeVarDecl (fun_ncVars fun)
+ uncriticalVariables = map var_decl (fun_ncVars fun)
hasUncriticalVars :: Function -> Bool
hasUncriticalVars = not . null . fun_ncVars
@@ -11,8 +11,7 @@ import Language.C.Data.Node (undefNode, NodeInfo)
import Language.C.Syntax.AST
import Ocram.Analysis (CallGraph)
import Ocram.Analysis (get_callees, is_start, dependency_list, start_functions)
-import Ocram.Backend.Util (makeVarDecl)
-import Ocram.Intermediate (Function(..), fun_name)
+import Ocram.Intermediate (Function(..), fun_name, Variable(..))
import Ocram.Names (tframe, contVar, resVar, tstackVar, frameUnion)
import Ocram.Query (return_type_fd, return_type_cd, function_parameters_cd)
import Ocram.Symbols (Symbol)
@@ -30,7 +29,7 @@ create_tstacks cg bf cf = (frames, stacks)
Nothing -> case M.lookup fname bf of
Nothing -> $abort "non-critical function in dependency list?"
Just decl -> (fname, tstackFrame cg (return_type_cd decl) fname (function_parameters_cd decl))
- Just fun -> (fname, tstackFrame cg (return_type_fd (fun_def fun)) fname (map makeVarDecl (fun_cVars fun)))
+ Just fun -> (fname, tstackFrame cg (return_type_fd (fun_def fun)) fname (map var_decl (fun_cVars fun)))
tstackInstance :: Function -> CDecl -- {{{2
tstackInstance fun = stack
Oops, something went wrong.

0 comments on commit c25b154

Please sign in to comment.