On Tuesday 12 October 2004 14:01, Chris Lattner wrote:> Okay, it's pretty simple. Given two sets (e.g. std::set), it walks > through one of them. For each element in the set it checks to see if the > other contains the element. if not it removes it.This is a N log(M) algorithm. Why don't we use the set_intersection algorithm which runs in N+M time? -- Alkis
On Tue, 12 Oct 2004, Alkis Evlogimenos wrote:> On Tuesday 12 October 2004 14:01, Chris Lattner wrote: > > Okay, it's pretty simple. �Given two sets (e.g. std::set), it walks > > through one of them. �For each element in the set it checks to see if the > > other contains the element. �if not it removes it. > > This is a N log(M) algorithm. Why don't we use the set_intersection > algorithm which runs in N+M time?I would have no problem with that :) -Chris -- http://llvm.org/ http://nondot.org/sabre/
Here is my code, (GV is a GlobalVariable*): GV = new GlobalVariable(AI->getType(), false, GlobalValue::InternalLinkage, 0, "temp_glob", &M); I tell it to make it with internal linkage, but when I run the pass it makes them external: %temp_glob = external global [10 x int]* ; <[10 x int]**> [#uses=2] %temp_glob = external global [10 x float]* ; <[10 x float]**> [#uses=2] and of course I get the broken module error because they aren't external: Global is external, but doesn't have external linkage! [10 x int]** %temp_glob Global is external, but doesn't have external linkage! [10 x float]** %temp_glob Anyone know what I am doing wrong?