Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9210557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:06:25+00:00 2026-06-18T01:06:25+00:00

I have some problems of finding dependencies. I want to get the corresponding Alloca

  • 0

I have some problems of finding dependencies. I want to get the corresponding Alloca from every Load (corresponding from the point of view of the variable used, meaning that the Load is using a variable based/dependent on the Alloca or Allocas).

Hence, I have a chain like : Alloca -> Load(1) -> ... -> Computation where the variable might be changed -> Store(new_var) -> ... -> Load(n)

“Computation where the variable is changed” means that : I might have Alloca(a), c=a+7000*b[32], Load(c).

First, I tried to use methods from AliasAnalysis class.
The plan was the following: after I get all the must-aliases, I categorize them into 2 :

  1. category A : aliases with allocas
  2. category B: aliases without allocas

For category A, is straight ahead for what I need.
For category B, I check if there is an instruction where the variable is used also from an instruction from the aliases of category A. If it is, it is ok.

For some methods I cannot use Alloca, so I try to find dependencies among Loads (I have all the Load instructions in an array loadInstrArray) and then check if some Load use the same variable as an Alloca.

But the following gave me no result at all (and they should, I have dependencies in my target test code – meaning that Load j is used multiple times in my code, so the pointers should be must-alias) :

  1. if( AA.isMustAlias(Loci,Locj) ) – no results
  2. if( AA.alias(Loci,Locj) ) – wrong results, like “LOAD %2 = load i32* %j, align 4 IS DEPENDENT ON %3 = load i32* %c, align 4“

where j is totally independent from c

3″. if( AA.getModRefInfo(allocaInstrArray[j],Loci) ) – no results

where Loci is AliasAnalysis::Location from a Load, allocaInstrArray is an array with all allocas

Second, I tried to use methods from DependencyAnalysis class.

  1. if (DA.depends(loadInstrArray[i],loadInstrArray[j],false)) – no results

Third, I tried methods from MemoryDependenceAnalysis class – the existing pass http://llvm.org/docs/doxygen/html/MemDepPrinter_8cpp_source.html .

  1. I have wrong results, like : %1 = load i32* %j, align 4 IS Clobber FROM: store i32 0, i32* %c, align 4
  2. then I tried to get only DEF (not clobber), since I only need to see the correspondent Alloca for every Load. I don’t have any results for Loads. I also checked with getDef() method, Loads being dependent on themselves.
  3. I have to mention that I commented line 00131, since I had an unsolved segfault and not the parameters are the problem.

What do you think I should focus on, what approach is better to take into account and what to eliminate?

Thank you a lot for your time !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:06:26+00:00Added an answer on June 18, 2026 at 1:06 am

    In addition, you should check if all the time the ICMP operands are referring to a Load instruction. If not, seek recursive for Load instructions from both ICMP operands (0 and 1). There might be other intermediate operations between Loads and ICMP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I Have some problems finding the right information about this and would be
Maybe it's a stupid question, but I have some problems with finding the proper
I have some trouble finding appropriate patterns for what I want to do. I
I have some problems with finding and replacing words in PHP files, especially when
I have a problem finding references to this subject and would appreciate some help.
Right now I have some troubles. I'm finding a way to solve one problem.
i have some problems with a Query seem IN dosen't work with Group_concat, that
I have some problems with Javascript. In fact, I'm just newbie in that script
I have some problems with header() function. It works and doesn't work at the
I have some problems with my first Open Graph custom action: I've created a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.