[PATCH] Add a callback to FunctionPass to enable skipping execution on a per-function basis

Marcello Maggioni hayarms at gmail.com
Wed Apr 8 19:21:20 PDT 2015


On the targets I work on I have an IR pass that does a transformation that is general across the targets that support a certain feature .

The idea is to run the pass only if we detect that our subtarget has that particular feature and needs the transformation , which was done by adding conditionally the pass in the targetmachine after querying the subtarget. That is not possible now because of the dependency on the function. The subtarget needs to be queried in the pass, which means pulling a lot of target specific code into the pass.

That would be pretty bad and before seeing this I was trying to find an alternative approach.


http://reviews.llvm.org/D8717

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list