[PATCH] D14552: Teach the inliner to track deoptimization state

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 14:31:52 PST 2015


reames added a comment.

Responses to minor comments inline.

In http://reviews.llvm.org/D14552#286638, @sanjoy wrote:

> - Change `OperandBundleDef` such that it can (alternative to containing an `std::string` tag name) contain an integral tag ID


Seems useful.  SGTM

> 

> 

> - Change `CALLSITE_DELEGATE_SETTER` and `CALLSITE_DELEGATE_GETTER` to use the safer `do { ... } while (false)` idiom


SGTM

> 

> 

> - Introduce an iterator for `getOperandBundleAt(I)` and use that as much as possible


Not sure this is worth it.


================
Comment at: lib/IR/Instructions.cpp:301
@@ +300,3 @@
+CallInst *CallInst::cloneWithOperandBundles(ArrayRef<OperandBundleDef> OpB) {
+  CallSite Self(this);
+  std::vector<Value *> Args(Self.arg_begin(), Self.arg_end());
----------------
Yes.

================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:1153
@@ -1140,1 +1152,3 @@
 
+    if (CS.hasOperandBundles()) {
+      auto ParentDeopt = CS.getOperandBundleAt(0);
----------------
Makes sense.

================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:1187
@@ +1186,3 @@
+        I->getParent()->getInstList().insert(I->getIterator(), NewI);
+
+        // Note: the RAUW does the appropriate fixup in VMap, so we need to do
----------------
SGTM


http://reviews.llvm.org/D14552





More information about the llvm-commits mailing list