Sanjoy Das
e6bca0eecb
Rename WeakVH to WeakTrackingVH; NFC
...
This relands r301424.
llvm-svn: 301812
2017-05-01 17:07:49 +00:00
Matt Arsenault
e0f9e984fd
InferAddressSpaces: Search constant expressions for addrspacecasts
...
These are pretty common when using local memory, and the 64-bit generic
addressing is much more expensive to compute.
llvm-svn: 301711
2017-04-28 22:52:41 +00:00
Matt Arsenault
c20ccd2c02
InferAddressSpaces: Avoid looking up deleted values
...
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
2017-04-28 22:18:19 +00:00
Matt Arsenault
a1e734050c
InferAddressSpaces: Infer from just addrspacecasts
...
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
2017-04-28 22:18:08 +00:00
Matt Arsenault
6d7f01e3d8
InferAddressSpaces: Use reference arguments instead of pointers
...
llvm-svn: 301276
2017-04-24 23:42:41 +00:00
Matt Arsenault
e8d0539f20
InferAddressSpaces: Remove redundant assert
...
This is just asserting all the operations are handled in the
switch, which the unreachable already handles.
llvm-svn: 301270
2017-04-24 23:02:57 +00:00
Matt Arsenault
c07bda7b87
InferAddressSpaces: Infer for just GEPs
...
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
2017-04-21 21:35:04 +00:00
Matt Arsenault
79f837c254
AMDGPU: Add all atomicrmw fields to atomic.inc/dec
...
Add scope, order, isVolatile
llvm-svn: 299122
2017-03-30 22:21:40 +00:00
Matt Arsenault
c18b67745b
Bug 31948: Fix assertion when bitcasting constantexpr pointers
...
llvm-svn: 295387
2017-02-17 00:32:19 +00:00
Matt Arsenault
300836098f
InferAddressSpaces: Handle more cases with constant select operands
...
llvm-svn: 293859
2017-02-02 03:37:22 +00:00
Matt Arsenault
db6e9e89a9
InferAddressSpaces: clang-format some things
...
llvm-svn: 293843
2017-02-02 00:28:25 +00:00
Matt Arsenault
bdd59e6879
InferAddressSpaces: Handle select
...
This fails to handle some cases where one of the inputs is
a constant to be fixed in a later commit.
llvm-svn: 293723
2017-02-01 00:08:53 +00:00
Matt Arsenault
864fbacb4a
InferAddressSpaces: Remove dead declaration
...
llvm-svn: 293720
2017-01-31 23:57:20 +00:00
Matt Arsenault
517a290e4f
InferAddressSpaces: Avoid double map lookup
...
llvm-svn: 293719
2017-01-31 23:48:44 +00:00
Matt Arsenault
2a46d81038
InferAddressSpaces: Fix broken casting of constants
...
llvm-svn: 293718
2017-01-31 23:48:40 +00:00
Matt Arsenault
973c4aebad
InferAddressSpaces: Rename constant
...
llvm-svn: 293594
2017-01-31 02:17:41 +00:00
Matt Arsenault
72f259b8eb
InferAddressSpaces: Handle icmp
...
llvm-svn: 293593
2017-01-31 02:17:32 +00:00
Matt Arsenault
6d5a8d48fd
InferAddressSpaces: Support memory intrinsics
...
llvm-svn: 293587
2017-01-31 01:56:57 +00:00
Matt Arsenault
6c907a9bb3
InferAddressSpaces: Support atomics
...
llvm-svn: 293584
2017-01-31 01:40:38 +00:00
Matt Arsenault
d89a6e11a7
InferAddressSpaces: Don't replace volatile users
...
llvm-svn: 293582
2017-01-31 01:30:16 +00:00
Matt Arsenault
850657a439
NVPTX: Move InferAddressSpaces to generic code
...
llvm-svn: 293579
2017-01-31 01:10:58 +00:00