On Wed, May 23, 2007 at 12:23:38AM -0700, Chris Lattner wrote:> On Fri, 4 May 2007, Florian Brandner wrote: > > i had a look at the SelectionDAG based schedulers. it seems that > > aliasing loads/stores are chained together by the DAGCombiner. after > > scheduling, when the MachineInstrs are created, the alias information > > cannot be used anymore in the current framework. is this correct? > > Right. The original Value*'s are preserved in the DAG, but dropped when > MachineInstrs are created. We could add a machineoperand to capture this > Value* if desired.Another benefit of keeping the original Value*'s (and offsets) around is it would provide more information that could be used for verbose asm output and MachineInstr-level dumps, which would be quite nice. Dan -- Dan Gohman, Cray Inc.
Florian Brandner
2007-May-24 07:09 UTC
[LLVMdev] alias information on machine instructions
Dan Gohman wrote:> On Wed, May 23, 2007 at 12:23:38AM -0700, Chris Lattner wrote: >> On Fri, 4 May 2007, Florian Brandner wrote: >>> i had a look at the SelectionDAG based schedulers. it seems that >>> aliasing loads/stores are chained together by the DAGCombiner. after >>> scheduling, when the MachineInstrs are created, the alias information >>> cannot be used anymore in the current framework. is this correct? >> Right. The original Value*'s are preserved in the DAG, but dropped when >> MachineInstrs are created. We could add a machineoperand to capture this >> Value* if desired. > > Another benefit of keeping the original Value*'s (and offsets) around is it > would provide more information that could be used for verbose asm output > and MachineInstr-level dumps, which would be quite nice. >i'll do this and post a patch, unless someone else is already working on this. florian
Florian Brandner
2007-Jun-15 14:16 UTC
[LLVMdev] alias information on machine instructions
hi, Florian Brandner wrote:> Dan Gohman wrote: >> On Wed, May 23, 2007 at 12:23:38AM -0700, Chris Lattner wrote: >>> Right. The original Value*'s are preserved in the DAG, but dropped when >>> MachineInstrs are created. We could add a machineoperand to capture this >>> Value* if desired. >> Another benefit of keeping the original Value*'s (and offsets) around is it >> would provide more information that could be used for verbose asm output >> and MachineInstr-level dumps, which would be quite nice. >> > > i'll do this and post a patch, unless someone else is already working on > this. >i have extended the DAG instruction selector and scheduler to preserve Value*'s. the values are attached to machine instructions as a separate operand list (at least for now). for now this looks very good. but i found that the alias analysis is not as good as expected. the problem seems to be the codegenprepare pass. GEP instructions are lowered to integer calculations (e.g. ptrtoint, add, inttoptr). this causes the (basic) alias analysis to answer MayAlias for most queries. this is also a problem for the DAG combiner, when the -combiner-global-alias-analysis switch is given to llc. any ideas how to handle this? florian
Apparently Analagous Threads
- [LLVMdev] alias information on machine instructions
- [LLVMdev] alias information on machine instructions
- [LLVMdev] alias information on machine instructions
- [LLVMdev] alias information on machine instructions
- [LLVMdev] alias information on machine instructions