summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [InferAddressSpaces] Fix assertion about null pointerYaxun Liu2017-07-071-1/+2
| | | | | | | | | | | | | InferAddressSpaces does not check address space in collectFlatAddressExpressions, which causes values with non flat address space put into Postorder and causes assertion in cloneValueWithNewAddressSpace. This patch fixes assertion in OpenCL 2.0 conformance test generic_address_space subtest for amdgcn target. Differential Revision: https://reviews.llvm.org/D34991 llvm-svn: 307349
* [Constants] If we already have a ConstantInt*, prefer to use ↵Craig Topper2017-07-061-1/+1
| | | | | | | | isZero/isOne/isMinusOne instead of isNullValue/isOneValue/isAllOnesValue inherited from Constant. NFCI Going through the Constant methods requires redetermining that the Constant is a ConstantInt and then calling isZero/isOne/isMinusOne. llvm-svn: 307292
* InferAddressSpaces: Avoid assertion failure with replacing identicalNirav Dave2017-06-081-0/+7
| | | | | | | | | | | | | | | cloned constexpr Have cloneConstantExprWithNewAddressSpaces return nullptr when returning initial ConstantExpr. Reviewers: arsenm Subscribers: jholewinski, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D33995 llvm-svn: 304975
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* Rename WeakVH to WeakTrackingVH; NFCSanjoy Das2017-05-011-11/+11
| | | | | | This relands r301424. llvm-svn: 301812
* InferAddressSpaces: Search constant expressions for addrspacecastsMatt Arsenault2017-04-281-12/+48
| | | | | | | These are pretty common when using local memory, and the 64-bit generic addressing is much more expensive to compute. llvm-svn: 301711
* InferAddressSpaces: Avoid looking up deleted valuesMatt Arsenault2017-04-281-3/+10
| | | | | | | | | | | While looking at pure addressing expressions, it's possible for the value to appear later in Postorder. I haven't been able to come up with a testcase where this exhibits an actual issue, but if you insert a dump before the value map lookup, a few testcases crash. llvm-svn: 301705
* InferAddressSpaces: Infer from just addrspacecastsMatt Arsenault2017-04-281-0/+12
| | | | | | | | Eliminates some more cases where some subset of the addressing computation remains flat. Some cases with addrspacecasts in nested constant expressions are still left behind however. llvm-svn: 301704
* InferAddressSpaces: Use reference arguments instead of pointersMatt Arsenault2017-04-241-15/+15
| | | | llvm-svn: 301276
* InferAddressSpaces: Remove redundant assertMatt Arsenault2017-04-241-1/+0
| | | | | | | This is just asserting all the operations are handled in the switch, which the unreachable already handles. llvm-svn: 301270
* InferAddressSpaces: Infer for just GEPsMatt Arsenault2017-04-211-3/+7
| | | | | | | | | | | Fixes leaving intermediate flat addressing computations where a GEP instruction's source is a constant expression. Still leaves behind a trivial addrspacecast + gep pair that instcombine is able to handle, which ideally could be folded here directly. llvm-svn: 301044
* AMDGPU: Add all atomicrmw fields to atomic.inc/decMatt Arsenault2017-03-301-2/+8
| | | | | | Add scope, order, isVolatile llvm-svn: 299122
* Bug 31948: Fix assertion when bitcasting constantexpr pointersMatt Arsenault2017-02-171-0/+6
| | | | llvm-svn: 295387
* InferAddressSpaces: Handle more cases with constant select operandsMatt Arsenault2017-02-021-11/+63
| | | | llvm-svn: 293859
* InferAddressSpaces: clang-format some thingsMatt Arsenault2017-02-021-35/+35
| | | | llvm-svn: 293843
* InferAddressSpaces: Handle selectMatt Arsenault2017-02-011-0/+8
| | | | | | | This fails to handle some cases where one of the inputs is a constant to be fixed in a later commit. llvm-svn: 293723
* InferAddressSpaces: Remove dead declarationMatt Arsenault2017-01-311-1/+0
| | | | llvm-svn: 293720
* InferAddressSpaces: Avoid double map lookupMatt Arsenault2017-01-311-6/+4
| | | | llvm-svn: 293719
* InferAddressSpaces: Fix broken casting of constantsMatt Arsenault2017-01-311-2/+7
| | | | llvm-svn: 293718
* InferAddressSpaces: Rename constantMatt Arsenault2017-01-311-6/+6
| | | | llvm-svn: 293594
* InferAddressSpaces: Handle icmpMatt Arsenault2017-01-311-8/+64
| | | | llvm-svn: 293593
* InferAddressSpaces: Support memory intrinsicsMatt Arsenault2017-01-311-14/+146
| | | | llvm-svn: 293587
* InferAddressSpaces: Support atomicsMatt Arsenault2017-01-311-16/+44
| | | | llvm-svn: 293584
* InferAddressSpaces: Don't replace volatile usersMatt Arsenault2017-01-311-2/+5
| | | | llvm-svn: 293582
* NVPTX: Move InferAddressSpaces to generic codeMatt Arsenault2017-01-311-0/+610
llvm-svn: 293579
OpenPOWER on IntegriCloud