After 1e3c6fc7cb9d we're seeing an increase in stack size in function foo() in the attached example.
Platform: linux native.
Compile with: clang -O2.
The stack size increases from 192 to 304, and when looking at an IR dump, we see in the version before the above mentioned commit:
# *** IR Dump Before Merge disjoint stack slots (stack-coloring) ***:
# Machine code for function foo: IsSSA, TracksLiveness
Frame Objects:
fi#0: size=16, align=8, at location [SP+8]
fi#1: size=176, align=8, at location [SP+8]
fi#2: size=112, align=1, at location [SP+8]
...
# *** IR Dump After Merge disjoint stack slots (stack-coloring) ***:
# Machine code for function foo: IsSSA, TracksLiveness
Frame Objects:
fi#0: size=16, align=8, at location [SP+8]
fi#1: size=176, align=8, at location [SP+8]
fi#2: dead
whereas in the version after the change we see
# *** IR Dump Before Merge disjoint stack slots (stack-coloring) ***:
# Machine code for function foo: IsSSA, TracksLiveness
Frame Objects:
fi#0: size=16, align=8, at location [SP+8]
fi#1: size=176, align=8, at location [SP+8]
fi#2: size=112, align=1, at location [SP+8]
...
# *** IR Dump After Merge disjoint stack slots (stack-coloring) ***:
# Machine code for function foo: IsSSA, TracksLiveness
Frame Objects:
fi#0: size=16, align=8, at location [SP+8]
fi#1: size=176, align=8, at location [SP+8]
fi#2: size=112, align=1, at location [SP+8]
The change itself seems to be unrelated, as it affects jump threading, leading to a slightly different layout of BBs throughout the function.
t.c.txt
(Apparently you can't attach a plain .c file, so I had to call it t.c.txt)
After 1e3c6fc7cb9d we're seeing an increase in stack size in function foo() in the attached example.
Platform: linux native. Compile with: clang -O2.
The stack size increases from 192 to 304, and when looking at an IR dump, we see in the version before the above mentioned commit:
whereas in the version after the change we see
The change itself seems to be unrelated, as it affects jump threading, leading to a slightly different layout of BBs throughout the function. t.c.txt (Apparently you can't attach a plain .c file, so I had to call it t.c.txt)