Skip to content
Commit 98bfe26b authored by Sanjoy Das's avatar Sanjoy Das
Browse files

[FunctionAttrs] Remove a loop, NFC refactor

Summary:
Remove the loop over the uses of the CallSite in ArgumentUsesTracker.
Since we have the `Use *` for actual argument operand, we can just use
pointer subtraction.

The time complexity remains the same though (except for a vararg
argument) -- `std::advance` is O(UseIndex) for the ArgumentList
iterator.

The real motivation is to make a later change adding support for operand
bundles simpler.

Reviewers: reames, chandlerc, nlewycky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14363

llvm-svn: 252141
parent a40450cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment