[llvm-dev] Regarding Usage of opt
Mehdi Amini via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 4 08:40:01 PST 2016
> On Mar 4, 2016, at 12:44 AM, Chengnian Sun via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
> I am new to llvm, and recently am playing with opt. I want to use opt to apply one optimization pass to a .bc file. However, I encounter some problems which I failed to find the answers on the internet. Any suggestions are highly appreciated.
>
> Question 1:
>
> For example, I issued the following command
>
> $: opt-trunk -si-lower-control-flow t.c_00.bc -o t.c_01.bc
>
This pass is a *machine function* pass, it does not operates on the LLVM IR but on on MIs (machine instructions), i.e. after instruction selection. You cannot run it with opt and there is no easy way to run it in isolation.
> Then I got the following error,
>
> -------------------------------------------------------------- Error Start --------------------------------------------------------------
> Pass 'SI Lower control flow pseudo instructions' is not initialized.
>
> Verify if there is a pass dependency cycle.
>
> Required Passes:
>
> opt-trunk: /tmp/llvm-builder/llvm-source-trunk/lib/IR/LegacyPassManager.cpp:668: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed.
>
>
>
> -------------------------------------------------------------- Error End --------------------------------------------------------------
> Question 2:
>
> Some passes depend on other dependencies. Is there any convenient way to get the dependency for a specific pass?
>
Not than I know of (other than reading the source code, which is fortunately very easy: look for getAnalysisUsage())
--
Mehdi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160304/e1a38432/attachment.html>
More information about the llvm-dev
mailing list