This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Test automatic variable initialization
ClosedPublic

Authored by jfb on Aug 6 2018, 2:28 PM.

Details

Summary

r337887 started using memset for automatic variable initialization where sensible. A follow-up discussion leads me to believe that we should better test automatic variable initialization, and that there are probably follow-up patches in clang and LLVM to improve codegen. It’ll be important to measure -O0 compile time, and figure out which transforms should be in the frontend versus the backend.

This patch is just a test of the current behavior, no questions asked. Follow-up patches will tune the code generation.

rdar://problem/42981573

Diff Detail

Repository
rC Clang

Event Timeline

jfb created this revision.Aug 6 2018, 2:28 PM
jfb added a comment.Aug 6 2018, 2:55 PM

I'm honestly not sure there's anything to review here since it's just showing us what the current behavior is. LMK if I'm not testing something that I should.

I'd much rather test current behavior as one patch first, because then the follow-ups show a clear before / after diff instead of leaving you guessing as to what the previous behavior was.

rsmith accepted this revision.Aug 6 2018, 6:34 PM
This revision is now accepted and ready to land.Aug 6 2018, 6:34 PM
This revision was automatically updated to reflect the committed changes.
jfb added a comment.Aug 7 2018, 11:01 AM

Further fixes in r339090 and r339093.