Displaying 8 results from an estimated 8 matches for "const_succ_iterator".
2017 May 02
2
When to use auto instead of iterator/const_iterator?
...LLVM source code, sometimes I am wondering when should we
use auto instead of iterator/const_iterator.
I want to use the patch [1] I sent before as an example. Could someone give
me advice/guideline here? Also, I have another
question. Sometimes the for-loop uses const_iterator, say
for (SUnit::const_succ_iterator I = SU->Succs.begin(), E =
SU->Succs.end();
I != E; ++I)
if (I->isCtrl())
NumberDeps++;
Can we rewrite above code as,
for (auto &Succ : SU->Succs)
if (Succ.isCtrl())
NumberDeps++;
Or do we need to use `const auto &` instead, like this
for...
2014 Dec 14
2
[LLVMdev] ScheduleDAGInstrs.cpp
...found the problem somewhere else. I was a bit confused and missed the fact that adjustChainDeps() is called a few lines down and does just what I wanted :-)
I would like to instead ask another question:
Why is I->isCtrl() used in code like
// Iterate over chain dependencies only.
for (SUnit::const_succ_iterator I = SUb->Succs.begin(), E = SUb->Succs.end();
I != E; ++I)
if (I->isCtrl())
iterateChainSucc (AA, MFI, SUa, I->getSUnit(), ExitSU, Depth, Visited);
?
I thought only chain edges are relevant, and would instead use
if (J->getKind() == SDep::Order)
I got strange edges, fro...
2013 Mar 15
0
[LLVMdev] write a simple MachineFunctionPass
...rgetMachine::addPassesToEmitFile and similar routines, so
they cannot generally be run from the *opt* or *bugpoint* commands."...So
how I can run a MachineFunctionPass? In the end, I just want to apply a DFS
on a CFG of a function. And I need oriented edges and wanted to use
MachineBasicBlock::const_succ_iterator. It is there a way to get the CFG
with oriented edges by using a FunctionPass?
Thank you !
On Fri, Mar 15, 2013 at 1:30 PM, Alexandru Ionut Diaconescu <
alexandruionutdiaconescu at gmail.com> wrote:
> Hello everyone,
>
> I have written several complex passes till now, but I cannot...
2013 Mar 15
2
[LLVMdev] write a simple MachineFunctionPass
Hello everyone,
I have written several complex passes till now, but I cannot write a
MachineFunctionPass pass. It just gives me segfault. Hence I reduced the
pass to the following form :
using namespace llvm;
namespace {
class CFGexplorator : public MachineFunctionPass {
public:
static char ID; // Pass identification, replacement for typeid
CFGexplorator() : MachineFunctionPass(ID)
2014 Dec 16
3
[LLVMdev] ScheduleDAGInstrs.cpp
...> confused and missed the fact that adjustChainDeps() is called a few
> lines down and does just what I wanted :-)
>
> I would like to instead ask another question:
>
> Why is I->isCtrl() used in code like
>
> // Iterate over chain dependencies only.
> for (SUnit::const_succ_iterator I = SUb->Succs.begin(), E = SUb->Succs.end();
> I != E; ++I)
> if (I->isCtrl())
> iterateChainSucc (AA, MFI, SUa, I->getSUnit(), ExitSU, Depth,
> Visited);
>
> ?
>
> I thought only chain edges are relevant, and would instead use if
> (J->getKind...
2014 Dec 08
3
[LLVMdev] ScheduleDAGInstrs.cpp
Hi,
Can anyone help me to understand the ScheduleDAGInstrs::buildSchedGraph() method?
I find the handling of AliasChain is disturbing since:
1. A new alias chain add deps to all possibly aliasing SUs, and then clears those lists.
2. When AliasChain is present, the addChainDependency() method is called,
but the target hook areMemAccessesTriviallyDisjoint() called inside
2006 Jul 05
0
[LLVMdev] Critical edges
...locks.size() > 0;
}
bool CriticalEdgeRemoval_Fer::is_critical_edge
(const MachineBasicBlock & src, const MachineBasicBlock & dst) {
unsigned num_succ = 0;
unsigned num_pred = 0;
bool src_has_many_succ = false;
bool dst_has_many_pred = false;
for(MachineBasicBlock::const_succ_iterator succ = src.succ_begin();
succ != src.succ_end(); succ++) {
num_succ++;
if(num_succ > 1) {
src_has_many_succ = true;
break;
}
}
for(MachineBasicBlock::const_pred_iterator pred = dst.pred_begin();...
2006 Jul 04
2
[LLVMdev] Critical edges
On Tue, 4 Jul 2006, Fernando Magno Quintao Pereira wrote:
> However, it does not remove all the critical edges. I am getting a very
> weird dataflow graph (even without the Break Critical edges pass). The
> dataflow generated by MachineFunction::dump() for the program below is
> given here:
> http://compilers.cs.ucla.edu/fernando/projects/soc/images/loop_no_crit2.pdf
...
> The