Displaying 15 results from an estimated 15 matches for "madechang".
Did you mean:
madechange
2011 Oct 08
0
[LLVMdev] Initializing GC roots
...p://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCStrategy.cpp?annotate=123170#l174
More invasively, you could consider adding a hook to GCStrategy which replaces the indicated call to ConstantPointerNull::get in LowerIntrinsics::InsertRootInitializers:
// Add root initializers.
bool MadeChange = false;
for (AllocaInst **I = Roots, **E = Roots + Count; I != E; ++I)
if (!InitedRoots.count(*I)) {
====> StoreInst* SI = new StoreInst(ConstantPointerNull::get(cast<PointerType>(
====> cast<PointerType>((*I)->getType())->getElementType())),...
2011 Oct 06
2
[LLVMdev] Initializing GC roots
Hello all,
I set: InitRoots = true; in my gc plugin as i want the roots to be
initialized to the "null" value.
Is there a way to define which value should be the initial one? For
example, i would like to initialize my roots to -5 (tagged, null value
for the GC in my runtime system) instead of 0.
Ofcourse, i could do it in the frontend (storing -5 to all GC roots),
but i was wondering
2015 Sep 13
3
RFC: faster simplifyInstructionsInBlock/SimplifyInstructions pass
...parent block.
if (I->getParent())
I->eraseFromParent();
return true;
}
return false;
}
// A faster version of SimplifyInstructionsInBlock, designed for a whole
// function. Modelled after DeadCodeEliminationPass.
static bool simplifyAndDCEFunction(Function &F) {
bool MadeChange = false;
const DataLayout &DL = F.getParent()->getDataLayout();
SmallSetVector<Instruction *, 16> WorkList;
// Iterate over the original function, only adding insts to the worklist
// if they actually need to be revisited. This avoids having to pre-init
// the worklist with...
2015 May 05
1
[LLVMdev] Naryreassociate vs reassociate
On Tue, May 5, 2015 at 10:20 AM, Jingyue Wu <jingyue at google.com> wrote:
> Hi Daniel,
>
> I presume you mean, instead of assigning function arguments distinct ranks
> (http://llvm.org/docs/doxygen/html/Reassociate_8cpp_source.html#l00282), we
> should group function arguments in favor of existing pairings.
Existing = pairings reassociate already chose before
*not*
existing
2018 Jun 29
2
Cleaning up ‘br i1 false’ cases in CodeGenPrepare
...his issue. Is this reasonable ?
My simple fix (without any indentation changes) is:
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -316,7 +316,9 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
SunkAddrs.clear();
if (!DisableBranchOpts) {
+ MadeChange = true;
+ while (MadeChange) {
MadeChange = false;
SmallPtrSet<BasicBlock*, 8> WorkList;
for (BasicBlock &BB : F) {
@@ -352,6 +354,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
EverMadeChange |= MadeChange;
}
+ }
if (!DisableGCOpts) {
SmallVec...
2008 Nov 07
2
[LLVMdev] non-pointer gcroot
...nitedRoots.count(*I)) {
const Type* Ty = cast<PointerType>((*I)->getType())->getElementType();
if (Ty->getTypeID() == Type::PointerTyID) {
new StoreInst(ConstantPointerNull::get(cast<PointerType>(Ty)),
*I, IP);
} else {
// todo; something here
}
MadeChange = true;
}
...
thanks,
scott
2016 Aug 24
2
LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
Hi Félix,
Sanjoy Das wrote:
> Félix Cloutier via llvm-dev wrote:
> > Assuming that this is a bug, what are the next steps?
>
> Looks like you already have a very small test case -- have you tried
> sticking it in a debugger to see why SCCP thinks removing the call is
> okay?
>
> Alternatively, file a bug at llvm.org/bugs and someone will get to it.
The third
2019 Jun 04
2
is this a bug in PruneEH?
...w BB.
BasicBlock *New = BB->splitBasicBlock(I);
// Remove the uncond branch and add an unreachable.
BB->getInstList().pop_back();
new UnreachableInst(BB->getContext(), &*BB);
DeleteBasicBlock(New, CG); // Delete the new BB.
MadeChange = true;
++NumUnreach;
break;
}
The nested if in SimplifyFunction() will essentially eliminate the call to f2() in the definition of f1() in the source that is being compiled. Here is the before and after pass IR dumps:
*** IR Dump Before Remove unused exception handli...
2009 Feb 19
0
[LLVMdev] Bug in BranchFolding.cpp:OptimizeBlock
...Pred->ReplaceUsesOfBlockWith(MBB, FallThrough);
}
// If MBB was the target of a jump table, update jump tables to go
to the
// fallthrough instead.
MBB->getParent()->getJumpTableInfo()->
ReplaceMBBInJumpTables(MBB, FallThrough);
MadeChange = true;
}
return;
}
The problem with this section of code is that FallThrough is not
guaranteed to be a successor of MBB or even a descendent of MBB.
The bitcode I've attached is a case where there are 5 basic blocks,
where the first four end with conditional branches to an e...
2009 Mar 20
0
[LLVMdev] GC interface suggestions
...PointerType>(
- cast<PointerType>((*I)->getType())->getElementType())),
- *I, IP);
+ const PointerType *PT = cast<PointerType>((*I)->getType());
+ new StoreInst(Constant::getNullValue(PT->getElementType()), *I, IP);
MadeChange = true;
+ InitedRoots.insert(*I);
}
Secondly, it would be great to have the ability to add custom safe points similarly to how the GC interface can specify custom read/write barriers and custom roots. Being able to specify safe points at the IR level is hugely preferable to doing it at...
2007 Jul 12
0
[LLVMdev] [PATCH] trivial: remove unused variable
...locations in the function
/// end block
bool FDSE::handleEndBlock(BasicBlock& BB, SetVector<Instruction*>& possiblyDead) {
- AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
MemoryDependenceAnalysis &MD = getAnalysis<MemoryDependenceAnalysis>();
bool MadeChange = false;
--
:wq
2008 Nov 08
0
[LLVMdev] non-pointer gcroot
...= cast<PointerType>((*I)->getType())-
> >getElementType();
> if (Ty->getTypeID() == Type::PointerTyID) {
> new StoreInst(ConstantPointerNull::get(cast<PointerType>(Ty)),
> *I, IP);
> } else {
> // todo; something here
> }
> MadeChange = true;
> }
> ...
Hi Scott,
Using the new support for first-class aggregate values, you should be
able to rewrite the above code to use Constant::getNullValue
regardless of the type of the alloca. There needn't be a special-case
for !isa<PointerType>((*I)->getType()...
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message -----
> From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Vaivaswatha Nagaraj" <vn at compilertree.com>
> Cc: "LLVM Dev" <llvm-dev at lists.llvm.org>
> Sent: Thursday, December 3, 2015 4:41:46 AM
> Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA
>
>
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
...patcherPass::PassName = "MakeDispatcherPass";
//
// Public methods.
//
bool MakeDispatcherPass::runOnFunction( Function& currFunction )
{
DEBUG( std::cerr << PassName << ": Processing " << currFunction.getName()
<< " ...\n" );
bool madeChange = true;
// Because of changes which we will make in control flow graph it is
necessary
// to get rid of temporary variables used outside their parent basic
block.
ReduceTempVarsLifetime( currFunction );
// Replace all SwitchInst instructions with chained branch instructions
/...
2016 Aug 24
2
LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
...(Inst->getType()->isVoidTy() || isa<TerminatorInst>(Inst))
> continue;
>
> if (tryToReplaceInstWithConstant(Solver, Inst,
> true /* shouldEraseFromParent */)) {
> // Hey, we just changed something!
> MadeChanges = true;
> ++NumInstRemoved;
> }
>
> It should not be passing in true for shouldEraseFromParent. I think
> the right fix here is to not have the shouldEraseFromParent parameter
> at all, but in tryToReplaceInstWithConstant to do:
>
> // replace Inst with co...