OSDN Git Service

Rename function to more accurately reflect what it does.
authorEric Christopher <echristo@gmail.com>
Sat, 20 Jun 2020 21:37:29 +0000 (14:37 -0700)
committerEric Christopher <echristo@gmail.com>
Sat, 20 Jun 2020 21:37:29 +0000 (14:37 -0700)
llvm/lib/Transforms/Scalar/GVNSink.cpp

index 1e3cc59..dfb4b7e 100644 (file)
@@ -581,7 +581,7 @@ public:
 private:
   ValueTable VN;
 
-  bool isInstructionSinkable(Instruction *I) {
+  bool shouldAvoidSinkingInstruction(Instruction *I) {
     // These instructions may change or break semantics if moved.
     if (isa<PHINode>(I) || I->isEHPad() || isa<AllocaInst>(I) ||
         I->getType()->isTokenTy())
@@ -673,7 +673,7 @@ Optional<SinkingInstructionCandidate> GVNSink::analyzeInstructionForSinking(
       NewInsts.push_back(I);
   }
   for (auto *I : NewInsts)
-    if (isInstructionSinkable(I))
+    if (shouldAvoidSinkingInstruction(I))
       return None;
 
   // If we've restricted the incoming blocks, restrict all needed PHIs also