Displaying 8 results from an estimated 8 matches for "ep_optimizerlast".
2018 Jun 25
2
How to include a opt pass in clang driver
Hi Eli,
I have tried that:
static void registerMyPass(const PassManagerBuilder &,
llvm::legacy::PassManagerBase &PM) {
PM.add(new MyPass());
}
static RegisterStandardPasses
RegisterMyPass(PassManagerBuilder::EP_OptimizerLast,
registerMyPass);
It still couldn't find my pass.
Regards,
Soham Sinha
PhD Student, Department of Computer Science
Boston University
On Mon, Jun 25, 2018 at 3:58 PM Friedman, Eli <efriedma at codeaurora.org>
wrote:
> On 6/25/2018 1:38 PM, Soham Sinha via...
2012 Oct 17
2
[LLVMdev] please advise on PassManager
...crash).
This happens only at -O0; at -O1 we get the correct order of events for
some reason (foo gets inlined, then foo and bar are instrumented).
The code looks like this:
tools/clang/lib/CodeGen/BackendUtil.cpp
if (LangOpts.AddressSanitizer) {
PMBuilder.addExtension(PassManagerBuilder::EP_OptimizerLast,
addAddressSanitizerPass);
PMBuilder.addExtension(PassManagerBuilder::EP_EnabledOnOptLevel0,
addAddressSanitizerPass);
}
lib/Transforms/IPO/PassManagerBuilder.cpp
void PassManagerBuilder::populateModulePassManager(PassManagerBase...
2018 Jun 25
2
How to include a opt pass in clang driver
Hello,
I have written a pass for the IR and I can run it with opt -load
lib/LLVMMyPass.so -mypass -myarguments -S -o output.ll < output.bc
I have registered my pass with the following code:
static RegisterPass<MyPass>
X("mypass", "MyPass Pass (with getAnalysisUsage implemented)");
How do I include the same pass in the clang driver. I tried running the
pass:
clang
2016 Jul 15
2
RFC: Coroutine Optimization Passes
...on pass CoroElide run by the main IPO
optimization at EP_ScalarOptimizerLate extension point.
CoroEarly Pass: (Function Pass @ EP_EarlyAsPossible)
---------------
Pretty boring pass that lowers coroutine intrinsics that are not needed for
later coroutine passes.
CoroCleanup Pass: (Function Pass @ EP_OptimizerLast)
--------------
Another boring pass that lowers all remaining coroutine intrinsics that were not
processed by earlier coroutine passes.
Questions / Concerns / Thoughts:
================================
Coroutine attribute or not.
---------------------------
I added a AttrKind::coroutine to flag t...
2016 Dec 07
4
Debug Locations for Optimized Code
I don't see how ASan and debuggers are different. It feels like both need reasonably accurate source location attribution for any instruction. ASan just happens to care more about loads and stores than interactive stepping debuggers.
Actually they are pretty different in their requirements.
ASan cares about *accurate* source location info for *specific* instructions, the ones that do
2020 Jan 15
4
Finding callees of a function
I searched the doxygen documentation and could not find a solution to my
task:
In a ModulePass running at EP_OptimizerLast, if I have a function F like in:
bool Foo:runOnModule(Module &M) {
LLVMContext &C = M.getContext();
for (auto &F : M) {
// magic here
if I want to know from which function (callee) each function is called -
how can I do this?
(so that I e.g. have a "Function *call...
2013 Jul 28
0
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
...OptLevelO3) {
Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp (revision 187135)
+++ lib/Transforms/IPO/PassManagerBuilder.cpp (working copy)
@@ -294,10 +294,78 @@
addExtensionsToPM(EP_OptimizerLast, MPM);
}
-void PassManagerBuilder::populateLTOPassManager(PassManagerBase &PM,
+void PassManagerBuilder::populatePreIPOPassMgr(PassManagerBase &MPM) {
+ // If all optimizations are disabled, just run the always-inline pass.
+ if (OptLevel == 0) {
+ if (Inliner) {
+ MPM.add(Inli...
2013 Jul 18
3
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
Andy and I briefly discussed this the other day, we have not yet got
chance to list a detailed pass order
for the pre- and post- IPO scalar optimizations.
This is wish-list in our mind:
pre-IPO: based on the ordering he propose, get rid of the inlining (or
just inline tiny func), get rid of
all loop xforms...
post-IPO: get rid of inlining, or maybe we still need it, only