[LLVMbugs] [Bug 11268] CPP backend not support some new instructions (such as atomicrmw)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Nov 4 08:05:31 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11268
eXtremal <css20 at mail.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #2 from eXtremal <css20 at mail.ru> 2011-11-04 10:05:31 CDT ---
r143406 contains error - instructions creation without linking it with basic
block. This patch may fix it:
diff --git a/src/lib/Target/CppBackend/CPPBackend.cpp
b/src/lib/Target/CppBackend/CPPBackend.cpp
index 17ca23a..394ea2b 100644
--- a/src/lib/Target/CppBackend/CPPBackend.cpp
+++ b/src/lib/Target/CppBackend/CPPBackend.cpp
@@ -1492,7 +1492,7 @@ void CppWriter::printInstruction(const Instruction *I,
StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope());
Out << "FenceInst* " << iName
<< " = new FenceInst(mod->getContext(), "
- << Ordering << ", " << CrossThread
+ << Ordering << ", " << CrossThread << ", " << bbname
<< ");";
break;
}
@@ -1503,7 +1503,7 @@ void CppWriter::printInstruction(const Instruction *I,
Out << "AtomicCmpXchgInst* " << iName
<< " = new AtomicCmpXchgInst("
<< opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", "
- << Ordering << ", " << CrossThread
+ << Ordering << ", " << CrossThread << ", " << bbname
<< ");";
nl(Out) << iName << "->setName(\"";
printEscapedString(cxi->getName());
@@ -1533,7 +1533,7 @@ void CppWriter::printInstruction(const Instruction *I,
<< " = new AtomicRMWInst("
<< Operation << ", "
<< opNames[0] << ", " << opNames[1] << ", "
- << Ordering << ", " << CrossThread
+ << Ordering << ", " << CrossThread << ", " << bbname
<< ");";
nl(Out) << iName << "->setName(\"";
printEscapedString(rmwi->getName());
This is recommendation only, not fully tested.
What about adding atomics support to CppBackEnd in llvm 3.0 before final
release?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list