search for: getdefaultdest

Displaying 5 results from an estimated 5 matches for "getdefaultdest".

2006 May 17
0
[LLVMdev] Obfuscation with LLVM
...hing to the basic block // corresponding to the condition of this case or to // the basic block checking the next case. BranchInst* branchInst = new BranchInst( switchInst->getSuccessor( caseIdx ), nextCaseBlock, setCondInst, caseBlock ); } else if( switchInst->getDefaultDest() != 0 ) { BranchInst* branchInst = new BranchInst( switchInst->getDefaultDest(), caseBlock ); } return caseBlock; } void MakeDispatcherPass::ReduceTempVarsLifetime( Function& function ) { BasicBlock* entryBB = &function.getEntryBlock(); typedef std::vector...
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast infrastructure to handle this. On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: > On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >> TypeLoc casting looks bogus. >> >> TypeLoc derived types return true from classof when the dynamic type >>
2012 Nov 30
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
...amp; SI(cast<SwitchInst>(I)); + const SwitchInst& SI(cast<SwitchInst>(I)); // Special case switch instruction to get formatting nice and correct. Out << ' '; writeOperand(SI.getCondition(), true); Out << ", "; writeOperand(SI.getDefaultDest(), true); Out << " ["; - for (SwitchInst::CaseIt i = SI.case_begin(), e = SI.case_end(); + for (SwitchInst::ConstCaseIt i = SI.case_begin(), e = SI.case_end(); i != e; ++i) { Out << "\n "; writeOperand(i.getCaseValue(), true); In...
2012 Sep 26
0
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
...dStyleFunctions) > + Vals64.push_back(VE.getValueID(SI.getCondition())); > + else > + Vals64.push_back(InstID - VE.getValueID(SI.getCondition())); Shouldn't you use a "push" method like PushValue for this too? > Vals64.push_back(VE.getValueID(SI.getDefaultDest())); > Vals64.push_back(SI.getNumCases()); > for (SwitchInst::CaseIt i = SI.case_begin(), e = SI.case_end(); ... > @@ -1358,8 +1392,13 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, > PushValueAndType(CI.getCalledValue(), InstID, Vals, VE);...
2012 Sep 26
9
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
Hi all, I've been looking into how to make llvm bitcode files smaller. There is one simple change that appears to shrink linked bitcode files by about 15%. See this spreadsheet for some rough data: https://docs.google.com/spreadsheet/ccc?key=0AjRrJHQc4_bddEtJdjdIek5fMDdIdFFIZldZXzdWa0E The change is in how operand ids are encoded in bitcode files. Rather than use an "absolute