[llvm-commits] [llvm] r69408 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Dale Johannesen
dalej at apple.com
Fri Apr 17 17:09:40 PDT 2009
Author: johannes
Date: Fri Apr 17 19:09:40 2009
New Revision: 69408
URL: http://llvm.org/viewvc/llvm-project?rev=69408&view=rev
Log:
Inline asm's were still introducing bogus dependencies;
my earlier patch to this code only fixed half of it.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=69408&r1=69407&r2=69408&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Apr 17 19:09:40 2009
@@ -5111,7 +5111,9 @@
/// ConstraintOperands - Information about all of the constraints.
std::vector<SDISelAsmOperandInfo> ConstraintOperands;
- SDValue Chain = getRoot();
+ // We won't need to flush pending loads if this asm doesn't touch
+ // memory and is nonvolatile.
+ SDValue Chain = IA->hasSideEffects() ? getRoot() : DAG.getRoot();
SDValue Flag;
std::set<unsigned> OutputRegs, InputRegs;
@@ -5122,6 +5124,10 @@
ConstraintInfos = IA->ParseConstraints();
bool hasMemory = hasInlineAsmMemConstraint(ConstraintInfos, TLI);
+ // Flush pending loads if this touches memory (includes clobbering it).
+ // It's possible this is overly conservative.
+ if (hasMemory)
+ Chain = getRoot();
unsigned ArgNo = 0; // ArgNo - The argument of the CallInst.
unsigned ResNo = 0; // ResNo - The result number of the next output.
More information about the llvm-commits
mailing list