Re: [cfe-users] question about loop unrolling

2018-06-27 Thread George Burgess IV via cfe-users
It may be that clang added the `optnone` attribute to main when you built it in (b): https://godbolt.org/g/WhM1UA . optnone, as the name implies, requests that optimizations are skipped for a given function. If this is the case, removing the optnone might make (b) do what you want. For (c), I'd in

[cfe-users] question about loop unrolling

2018-06-26 Thread luck.caile via cfe-users
test.cpp: int main() { int ret = 0; for (int i = 0; i < 100; i++) { ret += i; } return ret; } Hi, I’m new to clang/llvm recently and interested in doing some stuff in optimization passes. I tried to play above simple test with clang and see if I could get expected llvm IR by enabling llvm l