[llvm-commits] [patch] "TargetTransform" as an API between codegen and IR-level passes

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Oct 10 11:45:40 PDT 2012

On Oct 10, 2012, at 10:49 AM, Nadav Rotem <nrotem at apple.com> wrote:

> ping.
> <TargetTransform_tools.diff><TargetTransform_everything.diff><TargetTransform_Infra.diff><TargetTransform_Passes.diff>

Hi Nadav,

I like the general direction you're taking with this design. Some comments below.
+  TargetTransformInfo *getTargetTransformInfo() {
+    return new TargetTransformInfo(
+                              new ScalarTargetTransformImpl(getTargetLowering()),
+                              new VectorTargetTransformImpl());
+  }

The object ownership seems a bit strange here. The other get* methods on TargetMachine return pointers to objects managed by the TM instance. Should this one do the same?

It looks like these objects are leaking.


More information about the llvm-commits mailing list