[cfe-commits] [PATCH] Foundation for Transform registration infrastructure

Vane, Edwin edwin.vane at intel.com
Thu Dec 20 06:39:12 PST 2012


I wasn't planning on dynamically loading transforms. Yesterday when I tried turning a transform into a static library to link into cpp11-migrate I was reminded that unused global variables like the RegisterTransform<...> vars won't get included in the link. My next goal is just to set up the build system to slurp through subdirectories adding all sources to the executable as one monolithic entity. I'm not sure how this is any less complex than using tablegen although I admit I don't have much experience with it.

-----Original Message-----
From: Manuel Klimek [mailto:klimek at google.com] 
Sent: Thursday, December 20, 2012 2:43 AM
To: klimek at google.com; Vane, Edwin
Cc: cfe-commits at cs.uiuc.edu; gribozavr at gmail.com; silvas at purdue.edu
Subject: Re: [PATCH] Foundation for Transform registration infrastructure


  Sean's main point is my primary question: why do we need to load stuff dynamically?

  I would expect to have a Transform class at some point, and have main basically look like:
  if (Flag1)
    Transforms.push_back(new T1);
  ...
  and then do something with the vector of transforms we've built - that wouldn't need any plugin infrastructure.

  PS: regarding my rants - many people in llvm disagree with my positions here :) There's a lot of taste and personal preference to them, so if you agree with my reasoning, cool, but always feel free to argue if you don't agree :) I'm happy to learn new points of view

http://llvm-reviews.chandlerc.com/D221




More information about the cfe-commits mailing list