1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Sanjoy Das
506f4f8e68 [GMR/OperandBundles] Teach getModRefBehavior about operand bundles
In general, memory restrictions on a called function (e.g. readnone)
cannot be transferred to a CallSite that has operand bundles.  It is
possible to make this inference smarter, but lets fix the behavior to be
correct first.

llvm-svn: 260193
2016-02-09 02:31:47 +00:00
Sanjoy Das
987d70ed26 [MergeFunctions] Use II instead of CI for InvokeInst; NFC
Using `CI` is slightly misleading.

llvm-svn: 255529
2015-12-14 19:11:45 +00:00
Sanjoy Das
97417780af Teach MergeFunctions about operand bundles
llvm-svn: 255528
2015-12-14 19:11:40 +00:00
Sanjoy Das
46fedab671 Teach haveSameSpecialState about operand bundles
llvm-svn: 255527
2015-12-14 19:11:35 +00:00
Sanjoy Das
99ca015392 [OperandBundles] Treat "deopt" operand bundles specially
Teach LLVM optimize to more precisely in the presence of "deopt" operand
bundles.  "deopt" operand bundles imply that the call they're attached
to is at least `readonly` (i.e. they don't imply clobber semantics), and
they don't capture their bundle operands.

llvm-svn: 254118
2015-11-26 01:16:05 +00:00
Sanjoy Das
6b6a5c9388 [FunctionAttrs] Add handling for operand bundles
Summary:
Teach the FunctionAttrs to do the right thing for IR with operand
bundles.

Reviewers: reames, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14408

llvm-svn: 252387
2015-11-07 01:56:00 +00:00
Sanjoy Das
b36621a78e [CaptureTracking] Support operand bundles conservatively
Summary:
Earlier CaptureTracking would assume all "interesting" operands to a
call or invoke were its arguments.  With operand bundles this is no
longer true.

Note: an earlier change got `doesNotCapture` working correctly with
operand bundles.

This change uses DSE to test the changes to CaptureTracking.  DSE is a
vehicle for testing only, and is not directly involved in this change.

Reviewers: reames, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14306

llvm-svn: 252095
2015-11-04 23:21:06 +00:00
Sanjoy Das
b9b521e21e [Inliner] Don't inline through callsites with operand bundles
Summary:
This change teaches the LLVM inliner to not inline through callsites
with unknown operand bundles.  Currently all operand bundles are
"unknown" operand bundles but in the near future we will add support for
inlining through some select kinds of operand bundles.

Reviewers: reames, chandlerc, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14001

llvm-svn: 251141
2015-10-23 20:09:55 +00:00
Sanjoy Das
b7c31d3a27 [OperandBundles] Teach AliasAnalysis about operand bundles
Summary:
If a `CallSite` has operand bundles, then do not peek into the called
function to get a more precise `ModRef` answer.

This is tested using `argmemonly`, `-basicaa` and `-gvn`; but the
functionality is not specific to any of these.

Depends on D13961

Reviewers: reames, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13962

llvm-svn: 250974
2015-10-22 03:12:51 +00:00
Sanjoy Das
de9991d3c2 [OperandBundles] Make function attributes conservatively correct
Summary:
This makes attribute accessors on `CallInst` and `InvokeInst` do the
(conservatively) right thing.  This essentially involves, in some
cases, *not* falling back querying the attributes on the called
`llvm::Function` when operand bundles are present.

Attributes locally present on the `CallInst` or `InvokeInst` will still
override operand bundle semantics.  The LangRef has been amended to
reflect this.  Note: this change does not do anything prevent
`-function-attrs` from inferring `CallSite` local attributes after
inspecting the called function -- that will be done as a separate
change.

I've used `-adce` and `-early-cse` to test these changes.  There is
nothing special about these passes (and they did not require any
changes) except that they seemed be the easiest way to write the tests.

This change does not add deal with `argmemonly`.  That's a later change
because alias analysis requires a related fix before `argmemonly` can be
tested.

Reviewers: reames, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13961

llvm-svn: 250973
2015-10-22 03:12:22 +00:00