Optimizer - So, UD chains are broken
Disabled broken code and added some notes, which are probably broken as well but fuck it.
This commit is contained in:
parent
fac8de1fde
commit
35d3098917
1 changed files with 25 additions and 0 deletions
25
c-opopt.cc
25
c-opopt.cc
|
@ -634,6 +634,30 @@ void T_OptData::buildUseDefineChains(
|
|||
BUDCAddEntries_( udPerInstr , i , false , r.defines );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* So this whole heap of code below is wrong. It wouldn't work correctly
|
||||
* in all cases (although it does with the current test code, but that's
|
||||
* irrelevant).
|
||||
*
|
||||
* A block B from the CFG has instr{B}+1 points (1 point before each
|
||||
* instruction, and 1 point at the end of the block).
|
||||
*
|
||||
* Uses should be assigned to the point preceding the instruction; defs
|
||||
* and kills should be assigned to the point that follows it, before
|
||||
* any uses (it may be simpler to have 2 points / instruction?)
|
||||
*
|
||||
* defs from I0 defs from I1
|
||||
* \/ \/
|
||||
* P00 -> I0 -> P01 -> P10 -> I1 -> I11 -> PBE
|
||||
* /\ /\ /\
|
||||
* uses from I0 uses from I1 defs/kills from block end
|
||||
*
|
||||
* Entering/exiting functions is a bit of a PITA:
|
||||
* - call instructions define function arguments;
|
||||
* - return edges kill locals
|
||||
*/
|
||||
#if 0
|
||||
// Walk the graph from the entry point until all reachable nodes
|
||||
// have been covered and keeping track of active definitions. When
|
||||
// the flow diverges, we need to store the state before the
|
||||
|
@ -785,6 +809,7 @@ void T_OptData::buildUseDefineChains(
|
|||
|
||||
// 30 if next block is an end of function, kill locals
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue