search for: numfunct

Displaying 8 results from an estimated 8 matches for "numfunct".

Did you mean: numpunct
2004 Jun 07
1
Lazy Evaluation?
Hello, I've stumbled upon following problem, when trying to overload the methods for group Math for an S4-class which contains functions as slots. setClass("NumFunction", representation = list(fun = "function")) NumFunction <- function(f) new("NumFunction", fun = f) square <- function(x) x^2 NF <- NumFunction(square) setMethod("Math", "NumFunction", function(x){...
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...]); - M.getFunctionList().erase(DeadFunctions[i]); + // Might have deleted the body of an available externally function that + // is still referenced. Leave the declaration. + if (DeadFunctions[i]->use_empty()) + M.getFunctionList().erase(DeadFunctions[i]); } NumFunctions += DeadFunctions.size(); Changed = true; @@ -171,7 +174,10 @@ bool GlobalDCE::runOnModule(Module &M) { if (!DeadGlobalVars.empty()) { for (unsigned i = 0, e = DeadGlobalVars.size(); i != e; ++i) { RemoveUnusedGlobalValue(*DeadGlobalVars[i]); - M.getGlobalList().eras...
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...; + // Might have deleted the body of an available externally function >> that >> + // is still referenced. Leave the declaration. >> + if (DeadFunctions[i]->use_empty()) >> + M.getFunctionList().erase(DeadFunctions[i]); >> } >> NumFunctions += DeadFunctions.size(); >> Changed = true; >> @@ -171,7 +174,10 @@ bool GlobalDCE::runOnModule(Module &M) { >> if (!DeadGlobalVars.empty()) { >> for (unsigned i = 0, e = DeadGlobalVars.size(); i != e; ++i) { >> RemoveUnusedGlobalValue(*Dead...
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2015 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Agreed. Although I assume you mean invoke the new pass under a >> ThinLTO-only option so that avail extern are not dropped in the >> compile pass before the LTO link? > > > No, this pass
2015 Jun 03
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...gt; >> function >> >> that >> >> + // is still referenced. Leave the declaration. >> >> + if (DeadFunctions[i]->use_empty()) >> >> + M.getFunctionList().erase(DeadFunctions[i]); >> >> } >> >> NumFunctions += DeadFunctions.size(); >> >> Changed = true; >> >> @@ -171,7 +174,10 @@ bool GlobalDCE::runOnModule(Module &M) { >> >> if (!DeadGlobalVars.empty()) { >> >> for (unsigned i = 0, e = DeadGlobalVars.size(); i != e; ++i) { >>...
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...de "llvm/Transforms/Utils/CtorUtils.h" +#include "llvm/Transforms/Utils/GlobalStatus.h" +#include "llvm/Pass.h" +using namespace llvm; + +#define DEBUG_TYPE "elimavailextern" + +STATISTIC(NumAliases , "Number of global aliases removed"); +STATISTIC(NumFunctions, "Number of functions removed"); +STATISTIC(NumVariables, "Number of global variables removed"); + +namespace { + struct ElimAvailExtern : public ModulePass { + static char ID; // Pass identification, replacement for typeid + ElimAvailExtern() : ModulePass(ID) { +...
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...ls.h" +#include "llvm/Transforms/Utils/Local.h" +#include "llvm/ADT/Triple.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Format.h" +#include "llvm/Support/raw_os_ostream.h" + +using namespace llvm; + +namespace llvm { + +STATISTIC(NumFunctions, "Total number of functions"); +STATISTIC(NumUnsafeStackFunctions, "Number of functions with unsafe stack"); +STATISTIC(NumUnsafeStackRestorePointsFunctions, + "Number of functions that use setjmp or exceptions"); + +STATISTIC(NumAllocas, "Total numbe...