Extend 'readonly' and 'readnone' to work on function arguments as well as
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185735 91177308-0d34-0410-b5e6-96231b3b80d8
InstCombine: typo in or_icmp_eq_B_0_icmp_ult_A_B test


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185737 91177308-0d34-0410-b5e6-96231b3b80d8
Fix annotation of unlink. Should fix builder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185738 91177308-0d34-0410-b5e6-96231b3b80d8
Fix language.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185739 91177308-0d34-0410-b5e6-96231b3b80d8
[objc-arc] Refactor runtime entrypoint declaration entrypoint creation.

This is the first patch in a series of 3 patches which clean up how we create
runtime function declarations in the ARC optimizer when they do not exist
already in the IR.

Currently we have a bunch of duplicated code in ObjCARCOpts, ObjCARCContract
that does this. This patch refactors that code into a separate class called
ARCRuntimeEntryPoints which lazily creates the declarations for said
entrypoints.

The next two patches will consist of the work of refactoring
ObjCARCContract/ObjCARCOpts to use this new code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185740 91177308-0d34-0410-b5e6-96231b3b80d8
[objc-arc] Updated ObjCARCOpts to use ARCRuntimeEntryPoints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185741 91177308-0d34-0410-b5e6-96231b3b80d8
[objc-arc] Updated ObjCARCContract to use ARCRuntimeEntryPoints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185742 91177308-0d34-0410-b5e6-96231b3b80d8
Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185743 91177308-0d34-0410-b5e6-96231b3b80d8
[objc-arc] Renamed Module => TheModule in ARCRuntimeEntryPoints. Also did some small cleanups.

This fixes an issue that came up due to -fpermissive on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185744 91177308-0d34-0410-b5e6-96231b3b80d8
[objc-arc] Performed some small cleanups in ARCRuntimeEntryPoints and added an llvm_unreachable after the switch to quiet -Wreturn_type errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185746 91177308-0d34-0410-b5e6-96231b3b80d8
isKnownToBeAPowerOfTwo: Fix a typo in a comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185748 91177308-0d34-0410-b5e6-96231b3b80d8
[llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185751 91177308-0d34-0410-b5e6-96231b3b80d8
MC: Implement COFF .linkonce directive

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185753 91177308-0d34-0410-b5e6-96231b3b80d8
Stop putting operations after a tail call.

This prevents the emission of DAG-generated vreg definitions after a
tail call be dropping them entirely (on the grounds that nothing could
use them anyway, and they interfere with O0 CodeGen).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185754 91177308-0d34-0410-b5e6-96231b3b80d8
DAGCombiner: Don't drop extension behavior when shrinking a load when unsafe.

ReduceLoadWidth unconditionally drops extensions from loads. Limit it to the
case when all of the bits the extension would otherwise produce are dropped by
the shrink. It would be possible to shrink the load in more cases by merging
the extensions, but this isn't trivial and a very rare case. I left a TODO for
that case.

Fixes PR16551.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185755 91177308-0d34-0410-b5e6-96231b3b80d8