HomePhabricator

[Attributor] Cleanup `IRPosition::getArgNo` usages

Authored by jdoerfert on Sep 5 2020, 11:20 AM.

Description

[Attributor] Cleanup IRPosition::getArgNo usages

As we handle callback calls we need to disambiguate the call site
argument number from the callee argument number. While always equal in
non-callback calls, a callback comes with a partial parameter-argument
mapping so there is no implicit correspondence. Here we split
IRPosition::getArgNo() into two public functions, getCallSiteArgNo()
and getCalleeArgNo(). Usages are adjusted to pick the right one for
their purpose. This fixed some problems that would have been exposed as
we more aggressively optimize callbacks.

Details

Committed
jdoerfertSep 8 2020, 10:52 PM
Parents
rGc0ab901bddd5: [Attributor] Selectively look at the callee even when there are operand bundles
Branches
Unknown
Tags
Unknown