Commit 18d68780 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #183 from undingen/isAlloc

Fix isAllocCall check
parents 84bda3fd 1296ca93
...@@ -212,13 +212,6 @@ public: ...@@ -212,13 +212,6 @@ public:
if (isAllocCall(F->getName())) if (isAllocCall(F->getName()))
return NoAlias; return NoAlias;
// if (F->getName() == "malloc")
// return NoAlias;
//
// if (F->getName() == "_ZN6pyston2gc4Heap10allocSmallEmPPNS0_5BlockES4_") {
// return NoAlias;
//}
if (F->getName() == "_ZN6pyston2gc13runCollectionEv") { if (F->getName() == "_ZN6pyston2gc13runCollectionEv") {
assert(0); assert(0);
return NoAlias; return NoAlias;
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
namespace pyston { namespace pyston {
bool isAllocCall(const std::string& name) { bool isAllocCall(const llvm::StringRef name) {
if (name == "malloc") if (name == "malloc")
return true; return true;
if (name == "_ZN6pyston2gc4Heap10allocSmallEmPPNS0_5BlockES4_") if (name == "_ZN6pyston2gc4Heap10allocSmallEmi")
return true; return true;
return false; return false;
......
...@@ -19,11 +19,12 @@ ...@@ -19,11 +19,12 @@
namespace llvm { namespace llvm {
class CallInst; class CallInst;
class StringRef;
} }
namespace pyston { namespace pyston {
bool isAllocCall(const std::string& name); bool isAllocCall(const llvm::StringRef name);
bool isAllocCall(const llvm::CallInst* CI); bool isAllocCall(const llvm::CallInst* CI);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment