SuccessChanges

Summary

  1. [Attributor] Deduce the "returned" argument attribute Deduce the "returned" argument attribute by collecting all potentially returned values. Not only the unique return value, if any, can be used by subsequent attributes but also the set of all potentially returned values as well as the mapping from returned values to return instructions that they originate from (see AAReturnedValues::checkForallReturnedValues). Change in statistics (-stats) for LLVM-TS + Spec2006, totaling ~19% more "returned" arguments. ADDED: attributor NumAttributesManifested n/a -> 637 ADDED: attributor NumAttributesValidFixpoint n/a -> 25545 ADDED: attributor NumFnArgumentReturned n/a -> 637 ADDED: attributor NumFnKnownReturns n/a -> 25545 ADDED: attributor NumFnUniqueReturned n/a -> 14118 CHANGED: deadargelim NumRetValsEliminated 470 -> 449 ( -4.468%) REMOVED: functionattrs NumReturned 535 -> n/a CHANGED: indvars NumElimIdentity 138 -> 164 ( +18.841%) Reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames, efriedma, chandlerc Subscribers: hiraditya, bollu, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59919
Revision 365407 by jdoerfert:
[Attributor] Deduce the "returned" argument attribute

Deduce the "returned" argument attribute by collecting all potentially
returned values.

Not only the unique return value, if any, can be used by subsequent
attributes but also the set of all potentially returned values as well
as the mapping from returned values to return instructions that they
originate from (see AAReturnedValues::checkForallReturnedValues).

Change in statistics (-stats) for LLVM-TS + Spec2006, totaling ~19% more "returned" arguments.

  ADDED: attributor                   NumAttributesManifested                  n/a ->        637
  ADDED: attributor                   NumAttributesValidFixpoint               n/a ->      25545
  ADDED: attributor                   NumFnArgumentReturned                    n/a ->        637
  ADDED: attributor                   NumFnKnownReturns                        n/a ->      25545
  ADDED: attributor                   NumFnUniqueReturned                      n/a ->      14118
CHANGED: deadargelim                  NumRetValsEliminated                     470 ->        449 (    -4.468%)
REMOVED: functionattrs                NumReturned                              535 ->        n/a
CHANGED: indvars                      NumElimIdentity                          138 ->        164 (   +18.841%)

Reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames, efriedma, chandlerc

Subscribers: hiraditya, bollu, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D59919
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/IPO/Attributor.htrunk/include/llvm/Transforms/IPO/Attributor.h
The file was modified/llvm/trunk/lib/Transforms/IPO/Attributor.cpptrunk/lib/Transforms/IPO/Attributor.cpp
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/arg_nocapture.lltrunk/test/Transforms/FunctionAttrs/arg_nocapture.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/arg_returned.lltrunk/test/Transforms/FunctionAttrs/arg_returned.ll
The file was modified/llvm/trunk/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.lltrunk/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll

Summary

  1. [cxx2a] P0624R2 fix: only lambdas with no lambda-capture are default-constructible and assignable. This is a fix for rG864949 which only disabled default construction and assignment for lambdas with capture-defaults, where the C++2a draft disables them for lambdas with any lambda-capture at all. Patch by Logan Smith! Differential Revision: https://reviews.llvm.org/D64058
  2. [Frontend] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h This fixes a modules issue: error: declaration of 'bitc' must be imported from module 'Clang_Serialization.ASTBitCodes' before it is required Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_SETBID, Record);
Revision 365406 by dblaikie:
[cxx2a] P0624R2 fix: only lambdas with no lambda-capture are default-constructible and assignable.

This is a fix for rG864949 which only disabled default construction and
assignment for lambdas with capture-defaults, where the C++2a draft
disables them for lambdas with any lambda-capture at all.

Patch by Logan Smith!

Differential Revision: https://reviews.llvm.org/D64058
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/DeclCXX.cpptrunk/lib/AST/DeclCXX.cpp
The file was modified/cfe/trunk/lib/Sema/SemaDeclCXX.cpptrunk/lib/Sema/SemaDeclCXX.cpp
The file was modified/cfe/trunk/test/SemaCXX/cxx2a-lambda-default-ctor-assign.cpptrunk/test/SemaCXX/cxx2a-lambda-default-ctor-assign.cpp
Revision 365405 by thegameg:
[Frontend] Explicitly include Bitstream/BitCodes.h and BitstreamWriter.h

This fixes a modules issue:

error: declaration of 'bitc' must be imported from module
'Clang_Serialization.ASTBitCodes' before it is required
Stream.EmitRecord(llvm::bitc::BLOCKINFO_CODE_SETBID, Record);
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpptrunk/lib/Frontend/SerializedDiagnosticPrinter.cpp