[llvm] r258841 - [ScheduleDAGInstrs] Simplify logic to improve readability. NFC.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 11:33:58 PST 2016


Author: mcrosier
Date: Tue Jan 26 13:33:57 2016
New Revision: 258841

URL: http://llvm.org/viewvc/llvm-project?rev=258841&view=rev
Log:
[ScheduleDAGInstrs] Simplify logic to improve readability. NFC.

The call to isInvariantLoad() already returns false for non-load instructions.

Modified:
    llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp

Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=258841&r1=258840&r2=258841&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Tue Jan 26 13:33:57 2016
@@ -519,8 +519,7 @@ void ScheduleDAGInstrs::addVRegUseDeps(S
 /// (like a call or something with unmodeled side effects).
 static inline bool isGlobalMemoryObject(AliasAnalysis *AA, MachineInstr *MI) {
   return MI->isCall() || MI->hasUnmodeledSideEffects() ||
-         (MI->hasOrderedMemoryRef() &&
-          (!MI->mayLoad() || !MI->isInvariantLoad(AA)));
+         (MI->hasOrderedMemoryRef() && !MI->isInvariantLoad(AA));
 }
 
 // This MI might have either incomplete info, or known to be unsafe




More information about the llvm-commits mailing list