search for: currentcsr

Displaying 2 results from an estimated 2 matches for "currentcsr".

Did you mean: currentcsrs
2018 Apr 10
0
Issue with shrink wrapping
...nto any issues with this? Marking blocks containing `isReturn` instructions as used will basically make shrink-wrapping to fail all the time. > > Does this look correct? Are there alternatives? Another thing we could do is to add SP (through TLI.getStackPointerRegisterToSaveRestore) to the CurrentCSRs set (and probably rename the set). > > Shouldn't `ShrinkWrap::useOrDefCSROrFI` also check whether or not > `MachineInstr::Frame{Setup,Destroy}` flags are set? It’s not perfectly clear what the flag is used for and whether all targets use it for the same purpose. There has been some...
2018 Apr 09
2
Issue with shrink wrapping
Hello, So, I have this testcase: void f(int n, int x[]) { if (n < 0) return; int a[n]; for (int i = 0; i < n; i++) a[i] = x[n - i - 1]; for (int i = 0; i < n; i++) x[i] = a[i] + 1; } that, compiled with -O1/-Os for AArch64 and X86, generates machine code, which fails to properly restore the stack pointer upon function return.