Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does inferattrs run before and after lowering? #59

Open
VictorYing opened this issue Mar 17, 2018 · 1 comment
Open

Why does inferattrs run before and after lowering? #59

VictorYing opened this issue Mar 17, 2018 · 1 comment

Comments

@VictorYing
Copy link
Contributor

The -inferattrs pass is run both before and after lowering:

MPM.add(createInferFunctionAttrsLegacyPass());

I am wondering why this is. Note that this is distinct from the -functionattrs pass that can deduce attributes based on the contents of functions. The -inferattrs pass only infers attributes of library API declarations based on the name and signature, using the big list here:

bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) {

I don't see anything CilkABI-related in the list, so I'm wondering: how does -inferattrs help lowering? Is that pass actually unneeded and can it be removed?

@wsmoses
Copy link
Owner

wsmoses commented Mar 22, 2018

At one point this was necessary to ensure certain properties about the reference pipeline being true, though I don't believe that's presently the case so it probably can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants