Segment solidity detection/optimization.