HomePhabricator

[CVP] Simplify and generalize switch handling

Authored by nikic on Dec 12 2020, 11:34 AM.

Description

[CVP] Simplify and generalize switch handling

CVP currently handles switches by checking an equality predicate
on all edges from predecessor blocks. Of course, this can only
work if the value being switched over is defined in a different block.

Replace this implementation with a call to getPredicateAt(), which
also does the predecessor edge predicate check (if not defined in
the same block), but can also do quite a bit more: It can reason
about phi-nodes by checking edge predicates for incoming values,
it can reason about assumes, and it can reason about block values.

As such, this makes the implementation both simpler and more
powerful. The compile-time impact on CTMark is in the noise.

Details

Committed
nikicDec 12 2020, 12:12 PM
Parents
rGa5c65de2953e: mac/arm: XFAIL the last 3 failing tests
Branches
Unknown
Tags
Unknown

Event Timeline

Suspicious code size regression (npm -03)

CMakeFiles/clamscan.dir/libclamav_nsis_bzlib.c.o	19KiB	21KiB (+9.60%