[PATCH] D53030: [MicroBenchmark] Add initial LoopInterchange test/benchmark.
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 16 16:17:57 PDT 2018
MatzeB added inline comments.
================
Comment at: MicroBenchmarks/LoopInterchange/main.cpp:25
+ A[i][j] += 1;
+ y += A[i][j];
+ }
----------------
I think `y` may overflow here and trigger UB, you should probably use an unsigned variable for it.
================
Comment at: MicroBenchmarks/LoopInterchange/main.cpp:39
+ // Run kernels once, to test functionality.
+ std::ofstream myfile ("./LoopInterchange.txt");
+ if (myfile.is_open()) {
----------------
Does this need the `./` in front of the path? I would also recommend to abort if the output file cannot be written instead of continuing silently.
Repository:
rT test-suite
https://reviews.llvm.org/D53030
More information about the llvm-commits
mailing list