[PATCH v2 0/3] fix false "crazy programmer" warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The goal of this series is to get rid of false "crazy programmer"
warnings. This warning is issued when a cycle is detected in
the address calculation of memory operations. Such cycle can
happen when simplifying phi-nodes dealing with uninitialized
variables.

However the very same diagnostic can also be emitted if we try
to simplify phi-nodes inside an unreachable loop (because localy
it's exactly the same situation: since the loop is unreachable
it's very possible that the induction variables have no more
an initial value). Of course, since this situation is only
the consequence of trying to simplify code that is not reachable
while the original may very well not contain any unitialized var,
this diagnostic should not be emitted in this situation.

The solution is to kill potential unreachable BBs before
trying to simplify them, each time a parent is removed
from a BB.

---

Changes since v1:
- split the patch in 3, the first 2 being small preparatory
  patches, the third being the meat.
- try to avoid to have to call kill_unreachable_bbs() in the
  rare situations where the BB having a parent removed still
  contains another parent and thus can't be unreachable.

Luc Van Oostenryck (3):
  introduce REPEAT_CFG_CLEANUP
  let kill_unreachable_bbs() clear REPEAT_CFG_CLEANUP
  fix: kill unreachable BBs after killing a child

 flow.c                      |  2 ++
 flow.h                      |  1 +
 linearize.c                 |  5 ++++-
 validation/crazy02-not-so.c | 22 ++++++++++++++++++++++
 4 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 validation/crazy02-not-so.c

-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux