@@ -122,6 +122,11 @@ flag dev
122122 manual: True
123123 default: False
124124
125+flag has-llvm
126+ description: Use llvm backend for better performance
127+ manual: True
128+ default: False
129+
125130flag no-charts
126131 description: Disable chart generation
127132 manual: True
@@ -212,6 +217,9 @@ library
212217 default-language: Haskell2010
213218 ghc-options: -Wall -fspec-constr-recursive=10
214219
220+ if flag(has-llvm)
221+ ghc-options: -fllvm
222+
215223 if flag(streamk)
216224 cpp-options: -DUSE_STREAMK_ONLY
217225
@@ -458,6 +466,10 @@ benchmark linear
458466 other-modules: LinearOps
459467 default-language: Haskell2010
460468 ghc-options: -O2 -Wall -with-rtsopts "-T" -fspec-constr-recursive=10
469+
470+ if flag(has-llvm)
471+ ghc-options: -fllvm
472+
461473 if flag(dev)
462474 ghc-options: -Wmissed-specialisations
463475 -Wall-missed-specialisations
@@ -488,6 +500,10 @@ benchmark linear-async
488500 other-modules: LinearOps
489501 default-language: Haskell2010
490502 ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
503+
504+ if flag(has-llvm)
505+ ghc-options: -fllvm
506+
491507 cpp-options: -DLINEAR_ASYNC
492508 if flag(dev)
493509 ghc-options: -Wmissed-specialisations
@@ -519,6 +535,10 @@ benchmark linear-rate
519535 other-modules: LinearOps
520536 default-language: Haskell2010
521537 ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
538+
539+ if flag(has-llvm)
540+ ghc-options: -fllvm
541+
522542 if flag(dev)
523543 ghc-options: -Wmissed-specialisations
524544 -Wall-missed-specialisations
@@ -549,6 +569,10 @@ benchmark nested
549569 other-modules: NestedOps
550570 default-language: Haskell2010
551571 ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
572+
573+ if flag(has-llvm)
574+ ghc-options: -fllvm
575+
552576 if flag(dev)
553577 cpp-options: -DDEVBUILD
554578 ghc-options: -Wmissed-specialisations
@@ -580,6 +604,10 @@ benchmark array
580604 other-modules: ArrayOps
581605 default-language: Haskell2010
582606 ghc-options: -O2 -Wall -with-rtsopts "-T" -fspec-constr-recursive=10
607+
608+ if flag(has-llvm)
609+ ghc-options: -fllvm
610+
583611 if flag(dev)
584612 cpp-options: -DDEVBUILD
585613 ghc-options: -Wmissed-specialisations
@@ -610,6 +638,10 @@ benchmark fileio
610638 main-is: FileIO.hs
611639 default-language: Haskell2010
612640 ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
641+
642+ if flag(has-llvm)
643+ ghc-options: -fllvm
644+
613645 if flag(dev)
614646 cpp-options: -DDEVBUILD
615647 ghc-options: -Wmissed-specialisations
@@ -663,6 +695,10 @@ benchmark base
663695
664696 default-language: Haskell2010
665697 ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
698+
699+ if flag(has-llvm)
700+ ghc-options: -fllvm
701+
666702 if flag(dev)
667703 ghc-options: -Wmissed-specialisations
668704 -Wall-missed-specialisations
@@ -725,6 +761,9 @@ executable nano-bench
725761 default-language: Haskell2010
726762 ghc-options: -O2 -Wall -with-rtsopts "-T"
727763
764+ if flag(has-llvm)
765+ ghc-options: -fllvm
766+
728767 if flag(dev)
729768 buildable: True
730769 build-depends:
@@ -754,6 +793,9 @@ executable adaptive
754793 default-language: Haskell2010
755794 ghc-options: -O2 -Wall -with-rtsopts "-T"
756795
796+ if flag(has-llvm)
797+ ghc-options: -fllvm
798+
757799 if flag(dev)
758800 buildable: True
759801 build-depends: