Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CodeGenOpenCL/constant-addr-space-globals.cl | ||
---|---|---|
3 ↗ | (On Diff #57527) | Where does this come from? It doesn't look like Clang adds this, and this test does not appear to enable any optimizations. |
test/CodeGenOpenCL/str_literals.cl | ||
8–9 ↗ | (On Diff #57527) | Likewise. |
test/SemaOpenCL/extern.cl | ||
4 ↗ | (On Diff #57527) | Likewise. |
test/CodeGenOpenCL/constant-addr-space-globals.cl | ||
---|---|---|
3 ↗ | (On Diff #57527) | OpenCL enables optimizations by default in the frontend, see getOptimizationLevel in lib/Frontend/CompilerInvocation.cpp. It does seem a little weird that we're doing this in the frontend, this should probably be a driver feature. I must apologise for me-from-5-years-ago who implemented this in r120876. In the meantime, maybe we should be adding -cl-opt-disable to the OpenCL codegen tests. |
Adding -cl-opt-disable to the tests seems fine as an alternative short-term approach; LGTM with that approach (either as part of this change or a separate change before/after). In the long term, I agree that it would be better if the driver specified the relevant -O flag here.