intel / intel/generic-register-operation-optimizer
Bonus instructions
- Dominant language
- C++
- Stars
- 65
- Forks
- 11
- Avg merge
- 8h 59m
- Merged PRs (30d)
- 4
Description
Including `groov/write.hpp` results in extra instructions.
Using arm-none-eabi-g++
```c++
// #include
#include
#include
struct concurrency_policy {
template
static inline auto call_in_critical_section(F &&f, auto &&...) -> decltype(auto) {
return std::forward(f)();
}
};
template <> inline auto conc::injected_policy<> = concurrency_policy{};
int main() {}
```
results in the assembly:
```asm
main:
mov r0, #0
bx lr
```
Adding `groov/write.hpp` (uncomment above), results some additional things coming in:
```asm
main:
mov r0, #0
bx lr
_GLOBAL__sub_I_main:
ldr r3, .L5
ldr r2, [r3]
tst r2, #1
moveq r2, #1
streq r2, [r3]
bx lr
.L5:
.word guard variable for fmt::v11::format_facet::id
```
Contributor guide
Assessment
This issue has not been assessed yet.