Since there will be no more a 1:1 correspondence between statements and basic blocks, we would like to get rid of the method getStmtFor(BB)
and its uses. Here we remove one of its uses in ScopInfo by fetching the statement in which the call instruction lies.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Hello Sir,
I know you said to fetch the domain of the BB (CI->getParent()) without needing to pass a statement for it in getDomainConditions. But I was wondering why this solution is wrong?
Intrinsic::assume (the CI) is an ignored intrinsic, it will not be contained in any ScopStmt. getStmtFor(CI) therefore will necessarily return nullptr once getStmtFor(Instruction*) is implemented properly.
@Meinersbur : I got the basic block of the call instruction, if it belongs to the scop and the region's entry block if not. Im really not sure what is the reason of the failure of these 5 tests.
@grosser : Sorry for the long delay here. The server has to be manually reset after the slightest power fluctuation.
Could you upload the patch with context please (git diff -U999999)?
Use .copy() instead of .get().
Oh, I overlooked. Since we will be freeing the domain (take), we need a reference counted copy! Thank you.
lib/Analysis/ScopInfo.cpp | ||
---|---|---|
2267 ↗ | (On Diff #108109) | We must ensure that DomainMap[BB] is a valid entry, it is possibly not assigned. In particular, if BB is in the middle of a non-affine subregion, it could be empty. I think those assumptions should be ignored. Can you add a bail-out for that (not call buildConditionSets/continue) or add an assert()? (I think this wasn't handled correctly before anyway, so an assert would be fine) |