[PATCH] XCore target: add support to build MultiSource/Benchmarks/SciMark2-C

Daniel Dunbar daniel at zuster.org
Mon Mar 10 12:47:21 PDT 2014


If we don't use the seconds() function for anything meaningful, I'd rather
just ditch it for all platforms than have a platform specific ifdef.

 - Daniel


On Mon, Mar 10, 2014 at 4:16 AM, robert lytton <robert at xmos.com> wrote:

>   The clock() function was wrapping, hence negative stopwatch elapse times
> were negating the Mflop calculations.
>   As the Mflop calculations are disabled, clock() has been replaced by a
> simple counter.
>
> Hi ddunbar,
>
> http://llvm-reviews.chandlerc.com/D2771
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D2771?vs=7069&id=7686#toc
>
> Files:
>   MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
>
> Index: MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
> ===================================================================
> --- MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
> +++ MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
> @@ -3,7 +3,12 @@
>
>  double seconds()
>  {
> +#ifdef __XS1B__
> +    static double t = 0.0;
> +    return ++t;
> +#else
>          return ((double) clock()) / (double) CLOCKS_PER_SEC;
> +#endif
>  }
>
>  void Stopwtach_reset(Stopwatch Q)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140310/060cb081/attachment.html>


More information about the llvm-commits mailing list