Changes

Summary

  1. [Analysis] ImportedFunctionsInliningStatistics.h - add <memory> and remove unused <string> include. NFCI. (details)
  2. [NFC][SCEV] Assert that we don't try to create SCEVPtrToIntExpr of a non-integral pointer (details)
  3. [NFC][SCEVExpander][LoopDistribute] Regenerate scev-inserted-runtime-check.ll check lines (details)
  4. [NFC][SCEVExpander][LoopDistribute] Add test for SCEVPtrToIntExpr in SCEVExpander::generateOverflowCheck() (details)
  5. [SCEVExpander] generateOverflowCheck(): explicitly PtrToInt the Start (details)
  6. [NFCI][SCEVExpander] Extract GetOptimalInsertionPointForCastOf() helper (details)
  7. [SCEVExpander] GetOptimalInsertionPointForCastOf(): gracefully handle Constant's (details)
  8. [SCEVExpander] Expand explicit PtrToInt casts just like we would implicit ones (details)
  9. [SCEVExpander] ReuseOrCreateCast(): use IRBuilder to actually create the cast (details)
  10. [polly] Fix check-polly after SCEVExpander PtrToInt fixes (details)
  11. [clang] NFC: Fix range-based for loop warnings related to decl lookup (details)
  12. [AIX] Diagnose thinLTO usage in clang on AIX. (details)
  13. fix comment typo to cycle bots (details)
  14. [LowerConstantIntrinsics] avoid crashing on alloca with unexpected operand type (details)
  15. [lldb] Support "absolute memory address" images in crashlog.py (details)
Commit ddcdeae358685f941c3520e01b0a8e86e3aca04b by llvm-dev
[Analysis] ImportedFunctionsInliningStatistics.h - add <memory> and remove unused <string> include. NFCI.

Move <string> include to ImportedFunctionsInliningStatistics.cpp and add missing <memory> include as we have explicit uses of std::unique_ptr in the header.
The file was modifiedllvm/include/llvm/Analysis/Utils/ImportedFunctionsInliningStatistics.h
The file was modifiedllvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
Commit 41c22acc22a54ceb78dc863470b8819052d31d77 by lebedev.ri
[NFC][SCEV] Assert that we don't try to create SCEVPtrToIntExpr of a non-integral pointer

ptr<->int casts are only valid for integral pointes,
defensively assert that we don't try to break that here.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 0ea5fdbdef97b7bdd41755241ea524622cc8932e by lebedev.ri
[NFC][SCEVExpander][LoopDistribute] Regenerate scev-inserted-runtime-check.ll check lines
The file was modifiedllvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
Commit 016c5771b2cbf198b9bfe469634e5f301cc06083 by lebedev.ri
[NFC][SCEVExpander][LoopDistribute] Add test for SCEVPtrToIntExpr in SCEVExpander::generateOverflowCheck()

We shouldn't end up with ptrtoint-of-getelementptr there.
The file was modifiedllvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
Commit 73f60e398890941521d55868705c0b539ed80f94 by lebedev.ri
[SCEVExpander] generateOverflowCheck(): explicitly PtrToInt the Start

Currently, InsertNoopCastOfTo() would implicitly insert that cast,
but now that we have SCEVPtrToIntExpr, i'm hoping we could stop
InsertNoopCastOfTo() from doing that. But first all users must be fixed.
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
The file was modifiedllvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
Commit b8a3705896d254682a4ba36dd79a436ec4a917d4 by lebedev.ri
[NFCI][SCEVExpander] Extract GetOptimalInsertionPointForCastOf() helper
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
Commit 442c408e0e4a4d794752e710a362a5449d585432 by lebedev.ri
[SCEVExpander] GetOptimalInsertionPointForCastOf(): gracefully handle Constant's

I guess this case hasn't come up thus far, and i'm not sure if it can
really happen for the existing usages, thus no test in *this* commit.

But, the following commit adds test coverage,
there we'd expirience a crash without this fix.
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Commit ecc9d7e913eec96816499d0a328c6134281f8aad by lebedev.ri
[SCEVExpander] Expand explicit PtrToInt casts just like we would implicit ones

I.e., use GetOptimalInsertionPointForCastOf() helper to get the insertion
point, and try to reuse casts first.
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
The file was modifiedllvm/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
Commit d746fefb6ffde82bc6ea4e2ccf6c637ee521423e by lebedev.ri
[SCEVExpander] ReuseOrCreateCast(): use IRBuilder to actually create the cast

In particular, this allows to create constant expressions
instead of IR Instruction's if the argumen is a constant.
The file was modifiedllvm/test/Transforms/LoopDistribute/scev-inserted-runtime-check.ll
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Commit 2aff4f7f5772f186eb04898ef2e2b143d9e3cbe7 by lebedev.ri
[polly] Fix check-polly after SCEVExpander PtrToInt fixes
The file was modifiedpolly/test/ScopInfo/int2ptr_ptr2int.ll
The file was modifiedpolly/test/ScopInfo/int2ptr_ptr2int_2.ll
Commit 6a72ed239cc3f30c1149721f07de463b4b459b16 by Jan Svoboda
[clang] NFC: Fix range-based for loop warnings related to decl lookup
The file was modifiedclang/lib/CodeGen/CGObjCGNU.cpp
The file was modifiedclang/lib/CodeGen/CGCUDANV.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/lib/CodeGen/CGBlocks.cpp
The file was modifiedclang/lib/CodeGen/CGObjCMac.cpp
The file was modifiedclang/lib/Sema/SemaCodeComplete.cpp
Commit 369c0e0f48dd3585566d251cc99955dbdeed84a1 by wyehia
[AIX] Diagnose thinLTO usage in clang on AIX.

Reviewed By: Xiangling Liao

Differential Revision: https://reviews.llvm.org/D100350
The file was modifiedclang/lib/Driver/Driver.cpp
The file was addedclang/test/Driver/aix-unsupported-features.c
Commit 0871ce354772ad46a0af83a5f8659b6c20663fe4 by thakis
fix comment typo to cycle bots
The file was modifiedlld/ELF/Driver.cpp
Commit 9d43f6d7cee8887cb2a7a2442dffa4ef21ef4446 by spatel
[LowerConstantIntrinsics] avoid crashing on alloca with unexpected operand type

The test here is reduced from the fuzzer-generated crasher in:
https://llvm.org/PR50023
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33395

I don't know if this is the best or complete solution, but the
zext of the i42 type appears to match the behavior if we run a
weird type example like this through the IR optimizer with -O1.

Differential Revision: https://reviews.llvm.org/D100766
The file was modifiedllvm/test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll
The file was modifiedllvm/lib/Analysis/MemoryBuiltins.cpp
Commit 2cbd3b04feaaaff7fab4c6500476839a23180886 by Jonas Devlieghere
[lldb] Support "absolute memory address" images in crashlog.py

The binary image list contains the following entry when a frame is not
found in any know binary image:

  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }

Note that this object is missing the name and path keys. This patch
makes the JSON parser resilient against their absence.
The file was modifiedlldb/examples/python/crashlog.py