[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-05-10 Thread Strahinja Petrovic via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL331979: This patch provides that bitfields are splitted even in case (authored by spetrovic, committed by ). Herald added

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-05-10 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39053#1093977, @asb wrote: > Just wanted to explicitly say that I'm happy the updated patch reflects the > changes to docs and comments I requested. @hfinkel - are you happy for this > to land now? Yes, go ahead. Some of these benefits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-05-09 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Just wanted to explicitly say that I'm happy the updated patch reflects the changes to docs and comments I requested. @hfinkel - are you happy for this to land now? https://reviews.llvm.org/D39053 ___ cfe-commits mailing list

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-05-09 Thread Ana Pazos via Phabricator via cfe-commits
apazos added a comment. Thanks for updating the patch, @spetrovic. Can we have this committed? This patch has shown to produce code size improvements for a number of targets (Mips, X86, ARM, RISC-V). https://reviews.llvm.org/D39053 ___ cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-25 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic updated this revision to Diff 143918. spetrovic added a comment. Comments addressed https://reviews.llvm.org/D39053 Files: include/clang/Driver/Options.td lib/CodeGen/CGRecordLayoutBuilder.cpp test/CodeGenCXX/finegrain-bitfield-type.cpp Index:

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Here is a test case which improves with this patch (for RISCV target). It is able to detect load/store halfword for size 16 bitfields. struct st { int a:1; int b:8; int c:11; int d:12; int e:16; int f:16; int g:16; } S; void foo(int

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-19 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. Hi @spetrovic - I think Hal Finkel's earlier request to update the comments of IsBetterAsSingleFieldRun remains unaddressed. It looks like at least the comment string immediately before `auto IsBetterAsSingleFieldRun` needs to be updated to reflect the changed behaviour.

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. With this patch we get ~1800 bytes improvement on one of our internal codebases. I also ran spec2000/spec2006 validations (for RISCV) and there were no regressions. There were also no code size improvements seen in spec. https://reviews.llvm.org/D39053

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Added @apazos and myself a reviewers since this is something we would be interested in getting to work. https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-16 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-03-29 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-03-08 Thread Petar Jovanovic via Phabricator via cfe-commits
petarj added a comment. Is everyone OK with the patch now? https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-01-22 Thread Wei Mi via Phabricator via cfe-commits
wmi added a comment. Thanks for the size evaluation. I regarded the change as a natural and limited extension to the current fine-grain bitfield access mode, so I feel ok with the change. Hal, what do you think? https://reviews.llvm.org/D39053

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-01-19 Thread Petar Jovanovic via Phabricator via cfe-commits
petarj added a comment. This sounds as a valid improvement. Can we have this code committed? https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-12-21 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-12-11 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-11-29 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. I tried to compile some important libraries for X86 and MIPS64 within Chromium with clang/llvm. I have compared results between LLVM trunk, and LLVM trunk with my patch. There is code size improvement on many libraries, here are some results: - X86 libframe

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-11-13 Thread Wei Mi via Phabricator via cfe-commits
wmi added a comment. I think it may be hard to fix the problem in backend. It will face the same issue of store-to-load forwarding if at some places the transformation happens but at some other places somehow it doesn't. But I am not sure whether it is acceptable to add more finegrain bitfield

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-11-07 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-11-01 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. I was looking if I can reslove this problem in backend. Example: C code: typedef struct { unsigned int f1 : 28; unsigned int f2 : 4; unsigned int f3 : 12; } S5; void foo(S5 *cmd) { cmd->f3 = 5; } . ll file (without the patch):

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-10-26 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39053#906513, @spetrovic wrote: > Well, basically I'm just expanding the existing algorithm, why should we > split fields just in case when current field is integer, > I'm not resolving specific problem with unaligned loads/stores on MIPS.

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-10-25 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. Well, basically I'm just expanding the existing algorithm, why should we split fields just in case when current field is integer, I'm not resolving specific problem with unaligned loads/stores on MIPS. In this example: typedef struct { unsigned int f1 : 28;

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-10-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > With this patch we avoid unaligned loads and stores, at least on MIPS > architecture. Can you please explain the nature of the problematic situations? Also, this patch does not update the comments that describe the splitting algorithm. That should be improved. If

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-10-18 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic created this revision. Herald added subscribers: arichardson, sdardis. This patch provides that bitfields are splitted even in case when current field is not legal integer type. For Example, struct S3 { unsigned long a1:28; unsigned long a2:4; unsigned long a3:12; }; struct