[PATCH] D11200: Improve merging of stores from static constructors in GlobalOpt

Anthony Pesch inolen at gmail.com
Mon Jul 20 10:23:32 PDT 2015


inolen updated this revision to Diff 30169.
inolen added a comment.

Round 2 of the patch here.

I've stopped mixing stores to the global and stores to a GEP of a global in the map. It made sorting and merging more confusing than it needed to be. I believe this should address the comments around the poor wording.

The map now stores instances of GEPOperator, no more casting Constants in the merge function.

GetGlobalForPointer has been updated to match the logic inside of isSimpleEnoughPointerToCommit.

Regarding the comment on a change in functionality, I don't believe there is any there. EvaluateStoreInto appears to have the same logic for Array / Vector types copied inside of the Structure type block.

Added llvm_unreachable in places instead of assert(false).


Repository:
  rL LLVM

http://reviews.llvm.org/D11200

Files:
  lib/Transforms/IPO/GlobalOpt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11200.30169.patch
Type: text/x-patch
Size: 13035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150720/30c27a7e/attachment.bin>


More information about the llvm-commits mailing list