On 11/21/2013 12:01 PM, Kalle Raiskila wrote:
> Just a quick question (haven't read the source yet), how is the
> fine-tuning of the codegen, i.e. march/mcpu/mtune options, handled now
> in the API mode?

GetTargetMachine (borrowed from opt) handles the TargetMachine creation
for the WG compilation phase (call_pocl_workgroup()).

The call_pobl_build() uses the cmdline parsing (so we
can push also the user-defined options to it directly):

   ss << "-triple=" << device->llvm_target_triplet << " ";
   if (device->llvm_cpu != NULL)
     ss << "-target-cpu " << device->llvm_cpu << " ";
   ss << user_options << " ";

those flags set up some machine defaults.

Later on it also sets processor info to TargetOptions:

  clang::TargetOptions &ta = pocl_build.getTargetOpts();
   ta.Triple = device->llvm_target_triplet;
   if (device->llvm_cpu != NULL)
     ta.CPU = device->llvm_cpu;

The latter part might be redundant now, but I left it there so
the places it can be changed are clearly visible and tweakable,
predicting you might get some pains at least with getting
ARM working.

-- 
Pekka

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to